RFC: rollback commit in some situations

Robert Collins robertc at robertcollins.net
Thu Aug 14 06:55:48 BST 2008


On Thu, 2008-08-14 at 01:31 -0400, Aaron Bentley wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Robert Collins wrote:
> > On Thu, 2008-08-14 at 01:00 -0400, Aaron Bentley wrote:
> 
> >> It seems like it would be better to not reference the commit until we
> >> know it can't raise these exceptions.  Is that possible?
> > 
> > In general no (svn), but for bzr it seems possible - put it in the repo,
> > update the tree, update the branch tip. It does raise a different race
> > condition though - which is that if the tree change succeeds but the
> > branch change fails, you have a tree that is ahead of the branch
> > (equivalent to someone doing 'branch.uncommit()' while bound, without
> > your tree there to update in parallel).
> > 
> > I'm not sure which race is better :/.
> 
> I would think that a race that messes up a tree is better, because
> branches have more visibility than trees.  But I can live with either
> solution.
> 
> Do bear in mind that TreeTransform has some nice facilities for rolling
> back tree changes.

Commit doesn't do transforms, just update_basis_by_delta.

Trees are local, so there is a low chance that a network interrupt will
cause a tree basis change to fail compared to the chance that a network
interrupt will cause a branch update to fail. 

Uhm, I think I need to ponder this some more.

-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/20080814/ad9600ac/attachment-0001.pgp 


More information about the bazaar mailing list