[RFC] Trying to get something better that revno:N:branch to deal with remote revs

John Arbash Meinel john at arbash-meinel.com
Mon Aug 14 22:17:54 BST 2006


Matthieu Moy wrote:
> John Arbash Meinel <john at arbash-meinel.com> writes:

...

> Well, ./ is the default in most cases. Indeed, I was incorrectly
> assuming that "bzr diff -r 4 ./branch" would diff revision 4 of local
> branch with head of ./branch, but you're right. Indeed,
> 
> $ bzr diff -r XXX ./branch
> 
> does basically the same as
> 
> $ cd ./branch; bzr diff -r XXX

Yeah, this is intentional so you can do 'bzr diff /another/branch'.
Though it is mostly a natural consequence of doing 'bzr diff
file/in/branch', because we have to figure out what tree
'file/in/branch' is in, and diff against that.

But all of this is really why 'bzr diff' is pretty convoluted
internally. And it still is missing the ability to diff without a
working tree. (Though maybe your bzr diff
-rrevno:-1:branch/one..revno:-1:branch/two would work)


> 
>>> 3) other ?
>> At best, it could mean 'bzr diff ./branch1;revno:4', which right now
>> means diff the working tree at ./branch1 against revno 4 of the same tree.
> 
> That means silently ignoring the ;revno:10 part. I don't like this.
> 
>> So we would need a general consensus before I would recommend
>> changing things.
> 
> For sure.
> 
>> One thing I think having revisions specs in URLs is that we need to
>> change the command parsing so that you could specify a given argument is
>> a URL + revisionspec (potentially).
>> Then converting from a path to objects would happen at a higher level,
>> making it more convenient for Command classes.
> 
> I was thinking of a Branch.open_containing_with_revspec(url+spec) that
> would return the branch object and the revision.
> 

Actually, if we just switched to dealing in 'Tree' objects it might work
better.
So you could get tree, relpath = Tree.open_from_spec(revspec), which may
return a WorkingTree, or a RevisionTree, etc.
Though you still have potential ambiguities when you are working with
relative paths inside a branch/working tree.
(and a set of nested branches really makes it crazy)

Which also goes back to some of our other ideas about making Tree a
lazily evaluated object. So that you can carry around a RevisionTree,
and ask it later for more information. Though somehow it has to be
associated with a Branch or at least a Repository.

I realize there isn't much of a conclusion here, just some ramblings.

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/20060814/fdb37e20/attachment.pgp 


More information about the bazaar mailing list