Rethinking last-revision

Robert Collins robertc at robertcollins.net
Thu Mar 30 23:48:49 BST 2006


On Thu, 2006-03-30 at 09:47 -0500, Aaron Bentley wrote:
> I tried to implement my proxy branch for checkouts yesterday, and I ran
> into a snag:  my CheckoutBranch was creating a WorkingTree, and my
> WorkingTree was creating a CheckoutBranch, ad infinitum.
> 
> This sort of thing can be fixed, but not without pain, because it would
> mean altering, say, the Branch.open API.  The real problem is that the
> WorkingTree and CheckoutBranch both want to own the last-revision marker.

Can you enlarge on what CheckoutBranch is? I'm not clear on it...


> A related problem is that our format permits a BranchReference to have
> no last-revision marker, so only the vast majority of BranchReferences
> can be represented as CheckoutBranches.
> 
> I think it's a mistake to have two last-revision indicators per
> location.  It breaks our API, it breaks our UI, and it breaks our brains.

I think its unavoidable though, there are physically two things at the
one place, and trying to manage that well without representing what
exists is extremely hard. 

> As an alternative, I have previously suggested having lightweight
> branches that use a repository at an arbitrary location.  I gave up on
> that idea because it made it impossible to know which revisions in a
> repository were used by checkouts.  But it always seemed wrong to have
> two last-revision markers.
> 
> There are a few cases where it's desirable to update a branch without
> updating the associated tree, but they are rare, and I don't believe
> they are worth the cost to everyone else.  I think most people would
> rather update BOTH the branch and the working tree, if they want a
> working tree at all (and yes, we can die if there are uncommitted
> changes, or clobber, or merge).
> 
> For those few cases where it's desired to separate the branch and
> working tree's last-revision, we can simply put the tree inside the
> branch, or the branch inside the tree.  This simplifies the UI for those
> cases.

? I'm lost here.

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: 191 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060331/9b8198fc/attachment.pgp 


More information about the bazaar mailing list