[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: Michael Sweet <mike_at_easysw.com>
Date: 2005-11-03 15:33:58 CET

Julian Foad wrote:
> Michael Sweet wrote:
>> David Summers wrote:
>>>
>>> On Thu, 3 Nov 2005, Julian Foad wrote:
>>>
>>>>> svn diff %/branches/foo %%/trunk
>>>>
>>>> Unfortunately it's a Windows shell meta-character (for environment
>>>> variables etc., a bit like "$" in Unix).
>>>
>>> Oops, I keep forgetting about Windows CLI users, even though I use
>>> that a lot......
>>
>> And don't forget us brain-damaged csh/tcsh users, too! :)
>
> Do you (csh/tcsh users) have any problems with any of these suggestions,
> or did you just want us to remember that you exist?

:)

The % character is used to substitute the (background) job number
in csh/tcsh. Upon further research, the same mechanism is used in
bash, ksh, and the "real" sh, so if you used:

     svn diff %/branches/foo %/trunk

you'll end up substituting the process ID for the last command
that started with /branches/foo and /trunk, respectively (or get
a "no such job" error... :)

Also, sh/ksh/bash use it for some variable expansion stuff
(${parameter%word}, and bash adds math support where % is the
modulus operator...

-- 
______________________________________________________________________
Michael Sweet, Easy Software Products           mike at easysw dot com
Internet Printing and Document Software          http://www.easysw.com
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Nov 3 15:34:58 2005

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