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

Re: start-commit.bat

From: Mathias Weinert <wein_at_mccw.de>
Date: 2007-11-08 08:49:19 CET

Eric Gillespie <epg@pretzelnet.org> wrote:

> Karl Fogel <kfogel@red-bean.com> writes:
>
>> Masaru Tsuchiyama <m.tmatma@gmail.com> writes:
>> > Issue 2991 is supported on trunk.
>> > Then I tried this on Windows, but encountered a problem.
>> >
>> > CAPABILITIES parameter is a comma-separated list,
>> > but it seems that windows shell(cmd.exe) separates it by comma
>> > and passes them as separate parameters.
>>
>> Thank you for reporting this.
>>
>> Does anyone know what a portable separator char is? The original
>> issue suggested ";". Maybe I should have done that, but is there
>> anywhere where it causes a problem? What about plain colon ":" ?
>
> Good grief Windows! Looks like we're going to have to go with :
>
> C:\tmp>cat foo.bat
> @echo off
> echo first %1
> echo second %2
>
> C:\tmp>foo.bat 1,2
> first 1
> second 2
>
> C:\tmp>foo.bat 1;2
> first 1
> second 2
>
> C:\tmp>foo.bat 1:2
> first 1:2
> second
>

If you use Windows 2000 or Windows XP and the command extensions are
enabled you can do this:

C:\Temp>type foo.bat
@echo off
setlocal
set in=%*
:loop
for /f %%i in ("%in%") do set one=%%i
if "%one%"=="" then goto :EOF
echo %one%
set in2=%in:* =%
if "%in%"=="%in2%" goto :EOF
set in=%in2%
goto loop

C:\Temp>foo.bat 1 2,3 4;5
1
2,3
4;5

C:\Temp>

Maybe one can do somethin similar without the command extensions
enabled or with older versions of Windows.

Mathias

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Nov 8 08:49:30 2007

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