How to get the diff between two arbitrary remote revisions?

Matthieu Moy Matthieu.Moy at imag.fr
Sat Nov 5 10:53:54 GMT 2005


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

>>> I've tried
>>>
>>>   bzr diff -r branch:$HOME/path/to/branch/,revno=2..branch:$HOME/path/to/branch/,revno=5

[...]

>>> There should IMO be a way to designate a particular revision in
>>> revision specs. The syntax I tried above makes sense to me.
>>>
>>>   bzr diff --branch $HOME/path/to/branch/ -r 2..5
>
> This would tend to say "give me the diff of the revisions in branch
> $HOME/path/to/branch (naming one 2 and one 5)".

This is what I meant here. I find the syntax more natural and concise,
however, it's not as complete, since you can't handle the case:

> This would not do the diff of the local tree against the other tree.

[...]

>> bzr diff /path/to/a/branch/,revno=1 /path/to/another/branch/,revno=1
>
> The problem is in general, diff says "diff these files against the last
> committed revision". So passing multiple locations is just saying,
> compare multiple files versus the last committed revision.

True. Perhaps

  bzr diff -r rev1 -r rev2

would also make sense. IIRC, this is how CVS does.

> I'm hesitant to support putting commas in paths, because people who come
> from arch are *very* likely to have files which start with commas.

Normally, they do not have imprortant files starting with commas,
since these files are junk by default (I think this one is even
hardcoded).

But there are other arguments against the comma. It's a shell
metacaracter (not active in many contexts, but ...), it's not very
readable, ...

> I'm more likely to change how the "branch:" namespace works.

I'd suggest something like this:

revision:42:/path/to/branch
revision:3:http://server/path/to/branch

There are probably other better ways to do this.

-- 
Matthieu




More information about the bazaar mailing list