Branch.bind() raises DivergedBranches

John Arbash Meinel john at arbash-meinel.com
Fri Feb 23 03:01:11 GMT 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

At present, we don't have a clean way of taking and unbound branch and
turning it into a master branch when they have diverged.

Specifically, I'm talking about

$ bzr checkout sftp://master
$ cd master
$ bzr unbind
$ bzr commit -m "foo"
# Someone else commits to sftp://master
# At this point, I would *like* to change my local branch into being a
# checkout of the master with my commits being treated as local commits
# the way we talked about this was

$ bzr bind sftp://master
$ bzr update
# local commits are now merges
$ bzr commit -m "merge in local commits"

However the "bzr bind" command will fail with a DivergedBranches.

At one point, it made sense to do so, because Branch.bind() would
actually push and pull to try and make the branches identical. Since it
doesn't anymore, IMO we should not be raising DivergedBranches.

(The above scenario would be about the same if someone did a commit
- --local).

For now, I can do:

echo "sftp://master" > .bzr/branch/bound

which is pretty ugly.

I can do "bzr merge sftp://master; bzr bind; bzr update" I think. but
that is also pretty weird.

Thoughts?
John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFF3lj3JdeBCYSNAAMRAoUSAJ0SLPIMhbCSqnFEEwyD3Wqbrtc4VgCdHraZ
1xC0nsOlNRBATkijnpfEZZU=
=5WeX
-----END PGP SIGNATURE-----



More information about the bazaar mailing list