How to get the diff between two arbitrary remote revisions?
John A Meinel
john at arbash-meinel.com
Wed Nov 9 00:20:21 GMT 2005
Matthieu Moy wrote:
> John A Meinel <john at arbash-meinel.com> writes:
>
>> Actually, it would solve that with:
>>
>> bzr diff -r 100..-1 ../other/branch .
>
> OK, I didn't get that.
>
> I can see at least one problem with this: by just looking at the
> command line, I can't tell whether this will be an inter-branch diff
> or a diff limited to some files. See:
>
> bzr diff -r 100..-1 ../path/to/something something/else
>
> 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.
>
> 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.
$ bzr cat testworkingtree.py
bzr: ERROR: bzr cat requires a revision number
>
>> Otherwise, I would use something like:
>>
>> bzr diff -r branch:10:/other/branch .
>
> Since you're giving an identifier for a /revision/ and not a branch,
> I'd rather see
>
> bzr diff -r revision:10:/other/branch .
>
> or rev:... , or revno:... which would also solve the other problem
> (even on unix, you can have columns in filenames ...):
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.
We also could do something were each namespace consumes a certain
amount, and then returns the rest, so that you could have that absorbed
by another namespace.
I think there is at least one namespace that does this by itself, I
think it is the "ancestor:" namespace.
>
>> But you have to watch out for windows, where you have:
>>
>> bzr diff -r branch:c:/other/branch .
>
> Another advantage of this syntax is that it can be used, for example
> in emails, like
>
> "Hi dear maintainer, can you please merge
> revision:42:http://www.my.site.com/path/to/branch"
>
> As we used to say
>
> "Hi dear maintainer, can you please merge
> me at my.site.com--2005/bzr--main--0.6--patch-42"
>
> with Bazaar 1.
>
> (this syntax is regexp-matchable, cut-and-past-able, ...)
>
> (I should become a marketer ;-) ).
>
Yeah, there is some nice bits about that. Certainly something to think
about.
John
=:->
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 249 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20051108/f9620160/attachment.pgp
More information about the bazaar
mailing list