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

ghozzy _ ghozzy at gmail.com
Tue Aug 15 15:25:08 BST 2006


Hi,

On 8/14/06, John Arbash Meinel <john at arbash-meinel.com> wrote:
>
> Matthieu Moy wrote:
> > Hi,
> >
> > In the past, I've brought this topic several times in this mailing
> > list. The basic problem is that the revision specifiers do not allow
> > one to deal with a remote revision. The typical problem is: take two
> > arbitrary remote revisions. bzrlib knows how to diff them, but up to
> > recently, it was not exported in the UI at all.
> >
> > There are roughly 3 ways to deal with it:
> >
> > 1) Extend the revisionspec to deal with remote locations. That's what
> >    I implemented allowing one to do "diff -r revno:42:http://branch.com/
> "
> >
> > 2) Extend URL to deal with revisions. There used to be a syntax for
> >    this which has been pulled out (http://location.com/path/@3 IIRC)
> >
> > 3) Keep URL and revision spec distinct, and ask both to be provided on
> >    the command line.


Getting into discussion late, and i see it already slipped into discussing
(1) way, extend the revisionspec to deal with remote locations. As far as it
goes, i see there are encoding/decoding issues that only complicate things.
I am, as a user, personally inclined to the (3) way, keep URL and
revisionspec distinct.
This would get rid of yet another encoding scheme while all that is needed
is to pass two strings into program. IMO trying to join the strings and
thinking of a way how to do it unambiguously is not the way to go.

> Well, the conclusion is that it's hard to get something easy to type
> > (no shell metacharacters) and unambiguous. Indeed, with branch:, there
> > are already ambiguities: I can have a branch whose name is
> > "foo..revid:bar", it's a valid directory name!
>
> ...
>
> >   $ bzr diff -r 3 -R 4 http://remote/branch
> >
> >
> > I'm willing to spend some time on an implementation if the team agrees
> > on a specification.
> >
> > Any comments/flames/better proposals are welcome.
>
> Especially with switching over to optparse, you will need to be careful
> if you want to create an argument that takes 2 parameters. If you really
> wanted, you could just use ' ' as the separator. So you would have:
>
> bzr diff -??? "3 http://remote/branch"
>
> space can occur in paths, though :)


I can think of one more way of specifying branch:
(given the "-b" switch is for specifying branch)

bzr diff -r 3 -b http://remote/branch -r 4 -b http://somewhere/else

This scheme does not use arguments with two parameters, does not need
anything escaped and is clear to type and read. However it requires parsing
of repeated options.

Just my two cents,
--
ghozzy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://lists.ubuntu.com/archives/bazaar/attachments/20060815/e8251187/attachment.htm 


More information about the bazaar mailing list