[MERGE] Add a global branch write lock to cmd_uncommit and avoid unnecessary Branch.revno calls

Robert Collins robertc at robertcollins.net
Sun Dec 2 22:16:30 GMT 2007


On Sun, 2007-12-02 at 15:51 -0600, John Arbash Meinel wrote:
> -----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.)

Isn't tree optional?

-Rob
-- 
GPG key available at: <http://www.robertcollins.net/keys.txt>.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20071203/4723a2fa/attachment.pgp 


More information about the bazaar mailing list