upstream, branching, diverging, merging oh my!
John Arbash Meinel
john at arbash-meinel.com
Fri Jan 26 23:51:45 GMT 2007
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Bob Tanner wrote:
...
> 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
If you had changed it to:
bzr init
bzr add --file-ids-from ../mybranch
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?
My gut feeling says you want to do:
bzr branch -r 1 current upstream
cd upstream
bzr import ../openvpn-1.0.0.tar.gz .
bzr commit -m "version 1.0.0"
bzr import ../openvpn-1.0.1.tar.gz .
bzr commit -m "version 1.0.1"
...
(import is provide by bzrtools. You could also do "rm -r *; tar xvzf;
bzr add; ...)
This gives you a branch which tracks the upstream releases.
Now you just need to declare that your working branch has merged *some*
of them, but not all of them.
cd ../current
bzr merge -r LAST_MERGED ../upstream
# This will probably conflict, but all we really want is a record that
we consider them sync'd at that point.
bzr revert .
^- significant as it indicates to revert the tree
contents/conflicts, but not the pending merge
bzr commit -m "marking LAST_MERGED as merged from upstream"
- From here on out, you can do:
bzr merge ../upstream
And it should merge any new changes.
And when upstream releases a new tarball simply:
cd upstream
bzr import ../open-vpn-X.Y.Z.tar.gz
bzr commit -m "official version X.Y.Z"
cd ../current
bzr merge ../upstream
Some of this is discussed in:
http://bazaar-vcs.org/TrackingUpstream
John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFFupQRJdeBCYSNAAMRAoNTAKCuCXE/8EwK923iSJjN1TAV9Xt1lACfeW05
weivMktV1kHeYftcir9ctw0=
=LZaA
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list