How to get the diff between two arbitrary remote revisions?

Matthieu Moy Matthieu.Moy at imag.fr
Wed Nov 9 08:22:50 GMT 2005


John A Meinel <john at arbash-meinel.com> writes:

> Matthieu Moy wrote:
>> 
>> depending on whether ../path/to/something and something/else are
>> files, or two different branches, this changes the meaning of the
>> command. I don't like this, I prefer the syntax to be unambiguous.
>
> It isn't perfect, but it isn't ambiguous. If you gave 2 paths that
> weren't branches, the above would fail.

The syntax itself is ambiguous. It only makes sense if you have some
knowledge about how the filesystem is organized (I mean, you have to
access the filesystem to know whether ../path/to/something is a branch
or not).

>> You'll have the same kind of problem with other commands, like cat.
>> You'll want to be able to do
>> 
>>   bzr cat -r 42 ../path/to/something
>
> I thought we already had this. In fact, "bzr cat" requires that you
> supply a -r option.

I was not talking about the -r, but about the ../path/to/something.

How do you get revision 42 of the file foobar from a remote branch if
revision 42 is not the latest.

> $ bzr cat testworkingtree.py
> bzr: ERROR: bzr cat requires a revision number

(I'm the one who posted a bug asking bzr cat without -r to do
something ;-).

> We do actually already have "bzr diff -r revno:10", just as a
> completeness thing.
> We could make the revno: namespace support adding a branch location.

Yes. I realized after posting this that revno: already existed.

Then, I'd do something like

  revno:10                  => assumes revno:10:$(bzr root)
  revno:10:/path/to/branch  => specify the branch explicitely.

-- 
Matthieu




More information about the bazaar mailing list