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

Matthieu Moy Matthieu.Moy at imag.fr
Mon Aug 14 18:11:13 BST 2006


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

> Well, there are two things at work here, Firefox and HTTP. This does work:
> http://bzr.arbash-meinel.com/foo;bar
> But if you go to here:
> http://bzr.arbash-meinel.com/
> And click on the link, you get:
> http://bzr.arbash-meinel.com/foo%3bbar

Yes, but that's cheating. The conversion happens in your Apache
directory listing.

If you get here http://www-verimag.imag.fr/~moy/tmp/link.html and
click the link, you'll get a ; in the URL.

IIRC, URL can be either in encoded form or in non-encoded form. In any
case, at the HTTP level, it's the encoded form. For example, GNU Arch
allowed only the non-encoded form on the command-line.

Indeed, as soon as you allow a mix, you've got some ambiguities,
because 'http://bzr.arbash-meinel.com/foo%3bbar' is valid both in
encoded and non-encoded form. But since everybody is already doing
like this, I have no real objection.

There's still a problem with locations which are not URL. I'd rather
avoid introducing this %3b encoding in actual filenames. One solution
is to say that this case is rare enough to allow forcing people to use
URLs instead.

> I think ';' is a lot less common than ','.

That's right. If we have to chose between URL;spec and URL,spec, I'd
definitely go for the first.

> Well, bash doesn't support that as well as zsh. :) But I also came from
> some history of using ',' to mark things as temporary that can be
> removed at a whim. And if you don't use {} then ',' rarely gets you into
> trouble.

There's just the old funny

$ rm -fr /home/foo/{,,file1,++dir2} 

to remove GNU Arch's temp files ;-)


I have one more question or point against URL;spec (I'm not opposed to
it, just not 100% convinced yet).

What meaning should be given to

$ bzr diff -r 4 ./branch1;revno:10

1) it's an error

2) it's bzr diff ./;revno:4 ./branch1;revno:10

3) other ?


I'm sure we can find a case-by-case semantics for this case of thing,
but I don't want the specification to be made of a set of nested if
statements (diff's interface is already pretty complex to define since
the same argument can be a file, a branch location or a tree
location).

Maybe the rule could be "It's forbidden to mix -r and URL;spec in a
command line". Indeed, URL;spec would be strictly more expressive than
-r, since "-r X..Y" can be rewritten "./;X ./;Y" while the opposite is
not true.

-- 
Matthieu




More information about the bazaar mailing list