[RFC] Trying to get something better that revno:N:branch to deal with remote revs
Matthieu Moy
Matthieu.Moy at imag.fr
Tue Aug 15 06:09:40 BST 2006
John Arbash Meinel <john at arbash-meinel.com> writes:
>> $ 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)
Except for the fact that negative numbers are not managed in revno:N,
yes, it would work.
> 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.
If it's lazy enough, why not, but otherwise, you won't need all of the
RevisionTree in all cases. We're talking about diff, because this is
the most problematic command since it can take two revisions, but
"log" and others should accept the same syntax too.
--
Matthieu
More information about the bazaar
mailing list