[MERGE/RFC] Use Branch.pull() to update master branch.
John Arbash Meinel
john at arbash-meinel.com
Wed Feb 25 18:07:19 GMT 2009
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Jelmer Vernooij wrote:
> The attached patch makes the commit code use Branch.pull() to update the
> master branch when committing to a bound branch.
>
> This is required for bzr-svn as it can't update just the repository, it
> has to update the branch as well. Previously it had some magic in the
> Repository.fetch() code to handle this, but that is vulnerable to race
> conditions. (#248289)
>
> Is Branch.pull() the right call here, or should I be adding something
> custom?
>
> Cheers,
>
> Jelmer
>
This might be ok. I think the main problem is that we can't update
self.last_revision until after the data has been fetched to the master.
So 'new_rev_id' doesn't *exist* in the source branch. So the code
as-written means that branches must support pull() with a revision that
is not in their ancestry.
BB:comment
John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAkmliNcACgkQJdeBCYSNAANuSgCfey/rg6RS09pFdZ4rEHdeys1W
1qAAoIvRtvNH3HOEzZv1dHnGCBwjiL/W
=qJy8
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list