[MERGE] loosen the constraints on WorkingTree.set_last_revision.

Robert Collins robertc at robertcollins.net
Tue Aug 8 02:10:40 BST 2006


On Mon, 2006-08-07 at 20:30 -0400, Aaron Bentley wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Robert Collins wrote:
> > On Mon, 2006-08-07 at 19:07 -0400, Aaron Bentley wrote:
> >> Setting last_revision to a ghost we no longer consider it illegal for
> >> a
> >> working tree to refer to a revision not present in a branch.  Which
> >> means it's no longer safe to purge revisions from a repo when they're
> >> not referenced by the branches it contains. 
> > 
> > Huh? That does not follow. If the last revision of a tree *may* be a
> > ghost has no bearing on the policy for removing data from a repository -
> > that policy is still (AFAIK) 'only remove data that no *branches* refer
> > to.
> 
> That's only legitimate if having a last_revision not in the branch is an
> illegal state.  I'm not saying 'unreachable' here, but 'illegal'.  If
> it's not an illegal state, then you can destroy legitimate working trees
> with clean-my-repo, and that's very bad.

Perhaps we are talking past each other. I'm saying that creating a tree
whose last-revision is not in the branch, and not in the repo, is
supported behaviour *because* you can do it using the standard bzr
commands, without plugins. [ignoring that clean-my-repo does not exist,
it is after all planned].

I dont know what you mean by 'destroy' the tree though - its current
inventory is available, so if its first parent is not available, falling
back to using an emptytree as a the common ancestor for update (which is
how you get the tree back to a committable point after an uncommit on
the branch) seems reasonable to me.(And is how the baz-import workaround
works, though its not in the core (it should be)).
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/20060808/f36e4644/attachment.pgp 


More information about the bazaar mailing list