[MERGE] Add a global branch write lock to cmd_uncommit and avoid unnecessary Branch.revno calls
John Arbash Meinel
john at arbash-meinel.com
Sun Dec 2 21:51:26 GMT 2007
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Lukáš Lalinský wrote:
> This patch makes the initial phase of 'bzr uncommit' on packs about 2x
> faster:
>
> $ time echo 'n' | bzr uncommit >/dev/null
>
> real 0m7.579s
> user 0m7.308s
> sys 0m0.200s
>
> $ time echo 'n' | bzr uncommit >/dev/null
>
> real 0m3.927s
> user 0m3.764s
> sys 0m0.128s
>
> It could use some work to load only partial history when checking
> revision numbers on Branch6 branches, but that code is probably too deep
> in bzrlib for me.
>
> Lukas
This should be locking the tree, not the branch. Because if we
successfully uncommit, we have to update the tree's parent ids.
Otherwise it looks good. So
bb:tweak
(Also, in theory we could lock_read() if we are in --dry-run as an added
safety precaution, but I'm not sure of the specific merits of that.)
John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFHUyjeJdeBCYSNAAMRAhbsAKCjFdSV0A4cfCvLVm6X96WtrPi5HACgmafe
Tkzms1Dd/8r0Po20OZw7mpI=
=svik
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list