[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Auto-subst of repository roots (was Re: svn diff branch woprking copy against mainline?)

From: Branko Čibej <brane_at_xbc.nu>
Date: 2005-11-03 04:52:16 CET

Julian Foad wrote:
> Branko Čibej wrote:
>>
>> Now that we do have it, this gets a big +1 from me.
>> Now let's decide about the colour of this bikeshed... I don't like
>> vermilion with pink spots; in
>>
>> svn diff +/branches/foo +/trunk
>>
>> the + doesn't seem obvious enough.
>
> Only because you're not used to it, I suspect.
>
>> We can't use two leading slashes, because that could be a valid UNC
>> path on Windows. We can't use #, because that's a shell
>> meta-character. How about one of:
>>
>> svn diff ++/branches/foo ++/trunk
>> svn diff %/branches/foo %/trunk
>> svn diff %%/branches/foo %%/trunk
>> svn diff @/branches/foo @/trunk
>> svn diff @@/branches/foo @@/trunk
>>
>> I'm leaning towards % because it's somewhat mnemonic, being a URL escape
>
> Unfortunately it's a Windows shell meta-character (for environment
> variables etc., a bit like "$" in Unix).
Heh, yes, but there are exceptions, one of them is that it doesn't
expand to anything if what follows isn't valid environment variable
name. So,

C:\Home\brane>dir %
 Volume in drive C is Root
 Volume Serial Number is BC70-B244

 Directory of C:\Home\brane\%

03.11.2005 04:46 <DIR> .
03.11.2005 04:46 <DIR> ..
03.11.2005 04:46 3 foo.txt
               1 File(s) 3 bytes
               2 Dir(s) 24.354.357.248 bytes free

C:\Home\brane>type %\foo.txt
bla

And, using Cygwin's "cat" just to prove that the form with slashes also
works fine,

C:\Home\brane>cat %/foo.txt
bla

So, no problems there. :)

>> I think @ would be too easy to confuse with the peg-rev syntax.
>
> Maybe, though it never appears at the beginning in that syntax and
> always does in this.
>
>> I don't think using a two-char prefix buys us much.
>
> Huh? A few lines above, you said "how about" "++" after saying "+"
> didn't seem obvious enough. But I agree a two-char prefix doesn't buy
> us much.
I was just making a list of examples, for comparison. I didn't intend to
imply they were actual proposals.

> Of course, the syntax doesn't have to be a prefix string. It could,
> for example, be parsed like an option, e.g. "--in-repo /trunk/foo", or
> implied by the command, e.g. "svn repo-diff /trunk/foo /branches/foo".
Yuck. If we do introduce a magic prefix that expands to the repos root,
then the libsvn_client functions should accept the syntax. Therefor it
can't be a command-line option.

-- Brane

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Nov 3 04:50:51 2005

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.