upstream, branching, diverging, merging oh my!
Alexander Belchenko
bialix at ukr.net
Fri Jan 26 23:48:28 GMT 2007
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Bob Tanner пишет:
> I know I've asked something similar to this in the past. But I still am
> struggling with how to make the following personal-stupidity right.
>
> Long time ago I "branched" openvpn (note the quotes). My idea of a "branch"
> was just to 'cp -r /usr/src/openvpn ~/projects/openvpn', and I happily
> started making the customization in ~/projects/openvpn.
>
> Along comes bzr and I think I'll make life easier. So I did something like
> this:
>
> cd ~/projects/openvpn
> bzr init
> bzr add
> bzr commit
> <countless hours hacking>
> bzr commit
> <countless hours hacking>
> bzr commit
>
>
> Of course openvpn progress didn't stop, upstream kept changing, but I
> ignored it in bliss, until today, when I realized I should be pulling
> upstream changes into my "branch". So:
>
> cd /usr/src/openvpn
> bzr init
> bzr add
> bzr commit
>
> I know enough about bzr to know I cannot do a normal 'bzr merge' to these
> repositories. There is no common ancestor.
>
> My gut tells me I should be able some how branch /usr/src/openvpn
> into /tmp/openvpn and merge my ~/project/openvpn changes into /tmp/openvpn
> and magically make /tmp/openvpn my ~/project/openvpn.
>
> Just copying the files from ~/project/openvpn into /tmp/openvpn causes a
> loss of changelog/history.
>
> Is there some way to do what I'm trying?
Because your branch is older than new fixes you could:
$ bzr branch ~/projects/openvpn ~/projects/openvpn.official -r1
copy new code from /usr/src/openvpn to ~/projects/openvpn.official
$ bzr add
$ bzr commit -m "new official version"
Now you have 2 diverged branches with common ancestor. You can
merge them without history losing.
And probably command 'import' from bzrtools could help you a bit when new version
is coming.
I hope this helps.
- --
Alexander
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFFupNLzYr338mxwCURAlOvAJ41GhYfu7frC1KZYGTwbSdw1aeOdQCffZOA
yIEPoFJwEkWRAOSLTZbs298=
=en/B
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list