switch to a past revision

John Arbash Meinel john at arbash-meinel.com
Mon Aug 7 17:03:20 BST 2006


Aaron Bentley wrote:

...

>>> I disagree, because if you are in a working tree, you want to know the
>>> current state of the tree, not the state of the branch.
>>>
>>> I think it should use the branch revno if there is no tree, but the tree
>>> should take precedence.
> 
> This sounds very inconsistent to me.  I would like people to be able to
> predict what bzr will do.
> 
> If you want to show the working tree revno by default, then I think it
> should fail if there's no working tree present, unless a --branch switch
> is given.
> 
> Aaron

I don't think it is that unpredictable that if I say:

bzr revno /path/to/branch

I get the branch revno
but if I give

bzr revno /path/to/tree

It gives me the revno of the working tree.

If you are accessing a remote branch + tree (such that you can't talk to
the actual tree), you will get the branch revno. But that is relevant,
because if you did a 'branch' or 'pull' from that location, that is the
revision you would get.

I'm not really looking for magic here. I suppose we could complain if a
working tree exists, but we can't access it to give the right revno.

I run 'bzr revno' inside a working tree to get its status (and more
importantly 'bzr log'). But I also use 'bzr revno http://...' and 'bzr
log ...' to get a basic sense of some remote branch.

I think when you are inside a tree, it is very confusing if the tree is
out of date but it is giving you the branch's revno + log.

I think we could provide a '--tree' and '--branch' flag to force it to
give one or the other so people can be explicit. But I think having a
reasonable default of 'give me a tree if you can, but otherwise a
branch' is very reasonable.

John
=:->

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 254 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060807/07ff959f/attachment.pgp 


More information about the bazaar mailing list