You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Masaru Tsuchiyama <m....@gmail.com> on 2007/11/07 23:56:13 UTC

start-commit.bat

Hello

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.

1. create test repository
	D:\tmp> svnadmin create test

2. create start-commit.bat at d:\tmp2\tmp\hooks.
	# start-commit.bat
    	echo "%1" >  out.txt
	echo "%2" >> out.txt
	echo "%3" >> out.txt

	exit 1

3. checkout from the repository
	D:\tmp>svn co file:///D:/tmp/test tmptmp
	Checked out revision 0.

4. add a file to working copy.
	D:\tmp\tmptmp>dir > dir.txt

	D:\tmp\tmptmp>svn add dir.txt
	A         dir.txt

5. commit it
	D:\tmp\tmptmp>svn ci -m "add dir.txt"
	svn: Commit failed (details follow):
	svn: 'start-commit' hook failed (exited with a non-zero exitcode
	of 1).  No error output was produced by the hook.

6. check out.txt
	D:\tmp\tmptmp>type out.txt
	"D:\tmp\test"
	"tsuchiyama"
	"depth"

7. change start-commit.bat
	# start-commit.bat
    	echo "%1" >  out.txt
	echo "%2" >> out.txt
	echo "%3" >> out.txt
	echo "%4" >> out.txt
	echo "%5" >> out.txt

	exit 1

8. commit again
	D:\tmp\tmptmp>svn ci -m "add dir.txt"
	svn: Commit failed (details follow):
	svn: 'start-commit' hook failed (exited with a non-zero exitcode
	of 1).  No error output was produced by the hook.

9. check out.txt
	D:\tmp\tmptmp>type out.txt
	"D:\tmp\test"
	"tsuchiyama"
	"depth"
	"mergeinfo"
	"log-revprops"


I make test.bat.
	echo "%1"
	echo "%2"
	echo "%3"
	echo "%4"
	echo "%5"

Run with 5 parameters.
	D:\tmp\tmptmp>test.bat 1 2 3 4 5

	D:\tmp\tmptmp>echo "1"
	"1"

	D:\tmp\tmptmp>echo "2"
	"2"

	D:\tmp\tmptmp>echo "3"
	"3"

	D:\tmp\tmptmp>echo "4"
	"4"

	D:\tmp\tmptmp>echo "5"
	"5"

Run with 3 parametes (last parameter is separated with comma)
	D:\tmp\tmptmp>test.bat 1 2 3,4,5

	D:\tmp\tmptmp>echo "1"
	"1"

	D:\tmp\tmptmp>echo "2"
	"2"

	D:\tmp\tmptmp>echo "3"
	"3"

	D:\tmp\tmptmp>echo "4"
	"4"

	D:\tmp\tmptmp>echo "5"
	"5"

Run with 3 parametes (last parameter is separated with colon)
	D:\tmp\tmptmp>test.bat 1 2 3:4:5

	D:\tmp\tmptmp>echo "1"
	"1"

	D:\tmp\tmptmp>echo "2"
	"2"

	D:\tmp\tmptmp>echo "3:4:5"
	"3:4:5"

	D:\tmp\tmptmp>echo ""
	""

	D:\tmp\tmptmp>echo ""
	""

-- 
Masaru Tsuchiyama <m....@gmail.com>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: start-commit.bat

Posted by "Daniel L. Rall" <dl...@collab.net>.
On Wed, 14 Nov 2007, masaru tsuchiyama wrote:

> Hi Karl
> 
> Thank you for the commit.
> 
> I found two comment errors.
> See the attached patch.

Thanks Masaru, committed to trunk in r27820.

- Dan

Re: start-commit.bat

Posted by masaru tsuchiyama <m....@gmail.com>.
Hi Karl

Thank you for the commit.

I found two comment errors.
See the attached patch.

Regards.
Masaru.

2007/11/13, Karl Fogel <kf...@red-bean.com>:
> "David Glasser" <gl...@davidglasser.net> writes:
> >> A comma works fine if the whole list is double-quoted, and we should
> >> probably be quoting all parameters anyway to handle spaces in paths,
> >> etc. if APR isn't already.
> >
> > This behavior disturbs me.  It implies that via a careful choice of
> > username or revprop name or something, Windows hooks can receive
> > arguments that are shifted one or more spaces.
> >
> > We should figure out if this causes any serious security problems.
>
> Yes.  Since the code in hooks is arbitrary, the question is really
> "Can we construct a hook in which arg shifting would cause a security
> problem?"  To which the answer is clearly yes; whether that would be a
> plausible hook script or not I don't know.
>
> Should we instead just check for platform-specific dangerous
> characters before passing any arguments to hook scripts?  That seems
> like the safest bet.
>

Re: start-commit.bat

Posted by Karl Fogel <kf...@red-bean.com>.
"David Glasser" <gl...@davidglasser.net> writes:
>> A comma works fine if the whole list is double-quoted, and we should
>> probably be quoting all parameters anyway to handle spaces in paths,
>> etc. if APR isn't already.
>
> This behavior disturbs me.  It implies that via a careful choice of
> username or revprop name or something, Windows hooks can receive
> arguments that are shifted one or more spaces.
>
> We should figure out if this causes any serious security problems.

Yes.  Since the code in hooks is arbitrary, the question is really
"Can we construct a hook in which arg shifting would cause a security
problem?"  To which the answer is clearly yes; whether that would be a
plausible hook script or not I don't know.

Should we instead just check for platform-specific dangerous
characters before passing any arguments to hook scripts?  That seems
like the safest bet.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: start-commit.bat

Posted by David Glasser <gl...@davidglasser.net>.
On 11/7/07, D.J. Heap <dj...@gmail.com> wrote:
> On Nov 7, 2007 5:18 PM, Karl Fogel <kf...@red-bean.com> wrote:
> [snip]
> > 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 ":" ?
>
>
> A comma works fine if the whole list is double-quoted, and we should
> probably be quoting all parameters anyway to handle spaces in paths,
> etc. if APR isn't already.

This behavior disturbs me.  It implies that via a careful choice of
username or revprop name or something, Windows hooks can receive
arguments that are shifted one or more spaces.

We should figure out if this causes any serious security problems.

--dave

-- 
David Glasser | glasser@davidglasser.net | http://www.davidglasser.net/

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: start-commit.bat

Posted by Karl Fogel <kf...@red-bean.com>.
Karl Fogel <kf...@red-bean.com> writes:
> "masaru tsuchiyama" <m....@gmail.com> writes:
>> It seems there is no objection to use colon instead of comma.
>> Could you commit it?
>
> Yes, I'm planning to, don't worry.  (Along with some other cleanups,
> especially to the HTTP header names that we're using for the new
> capabilities exchange.)

Okay, this is all done now.  See r27786 in particular.

-Karl

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: start-commit.bat

Posted by Karl Fogel <kf...@red-bean.com>.
"masaru tsuchiyama" <m....@gmail.com> writes:
> It seems there is no objection to use colon instead of comma.
> Could you commit it?

Yes, I'm planning to, don't worry.  (Along with some other cleanups,
especially to the HTTP header names that we're using for the new
capabilities exchange.)

>> 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 ":" ?
>
> I suggested colon, not semi-colon.

Oops, sorry for misremembering.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: start-commit.bat

Posted by masaru tsuchiyama <m....@gmail.com>.
Hi Karl.

It seems there is no objection to use colon instead of comma.
Could you commit it?

> 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 ":" ?

I suggested colon, not semi-colon.

Regards.
Masaru.


2007/11/9, Karl Fogel <kf...@red-bean.com>:
> Duncan Booth <du...@suttoncourtenay.org.uk> writes:
> > My point was that if APR quoted the arguments whether or not they have
> > spaces it would work for both shell commands and programs.
>
> ...but not on Unix, unfortunately.  Using the same example you (very
> helpfully) supplied:
>
>    $ cat foo.c
>    #include <stdio.h>
>
>    int main(int argc, char **argv) {
>        int i;
>        for (i = 0; i < argc; i++) {
>            printf("arg %d: %s\n", i, argv[i]);
>        };
>        return 0;
>    }
>    $ gcc -o foo foo.c
>    $ python
>    Python 2.4.4 (#2, Aug 16 2007, 02:03:40)
>    [GCC 4.1.3 20070812 (prerelease) (Debian 4.1.2-15)] on linux2
>    Type "help", "copyright", "credits" or "license" for more information.
>    >>> import os
>    >>> os.spawnl(os.P_WAIT, 'foo', 'foo', '1', '2', '3,4,5')
>    arg 0: foo
>    arg 1: 1
>    arg 2: 2
>    arg 3: 3,4,5
>    0
>    >>> os.spawnl(os.P_WAIT, 'foo', 'foo', '1', '2', '"3,4,5"')
>    arg 0: foo
>    arg 1: 1
>    arg 2: 2
>    arg 3: "3,4,5"
>    0
>    >>> os.spawnl(os.P_WAIT, 'foo, 'foo, '1 2 "3,4,5"')
>    os.spawnl(os.P_WAIT, 'foo', 'foo', '1 2 "3,4,5"')
>    arg 0: foo
>    arg 1: 1 2 "3,4,5"
>    0
>    >>>
>
> This means we should use colon as the separator, I think; that's the
> simplest solution.  If so, I'll make sure to document the limitation
> that capability strings must not contain colons (in svn_ra.h), and
> will change start-hook.tmpl of course.
>
> -Karl
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: dev-help@subversion.tigris.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: start-commit.bat

Posted by Karl Fogel <kf...@red-bean.com>.
Duncan Booth <du...@suttoncourtenay.org.uk> writes:
> My point was that if APR quoted the arguments whether or not they have 
> spaces it would work for both shell commands and programs.

...but not on Unix, unfortunately.  Using the same example you (very
helpfully) supplied:

   $ cat foo.c
   #include <stdio.h>
   
   int main(int argc, char **argv) {
       int i;
       for (i = 0; i < argc; i++) {
           printf("arg %d: %s\n", i, argv[i]);
       };
       return 0;
   }
   $ gcc -o foo foo.c
   $ python
   Python 2.4.4 (#2, Aug 16 2007, 02:03:40) 
   [GCC 4.1.3 20070812 (prerelease) (Debian 4.1.2-15)] on linux2
   Type "help", "copyright", "credits" or "license" for more information.
   >>> import os
   >>> os.spawnl(os.P_WAIT, 'foo', 'foo', '1', '2', '3,4,5')
   arg 0: foo
   arg 1: 1
   arg 2: 2
   arg 3: 3,4,5
   0
   >>> os.spawnl(os.P_WAIT, 'foo', 'foo', '1', '2', '"3,4,5"')
   arg 0: foo
   arg 1: 1
   arg 2: 2
   arg 3: "3,4,5"
   0
   >>> os.spawnl(os.P_WAIT, 'foo, 'foo, '1 2 "3,4,5"')
   os.spawnl(os.P_WAIT, 'foo', 'foo', '1 2 "3,4,5"')
   arg 0: foo
   arg 1: 1 2 "3,4,5"
   0
   >>> 

This means we should use colon as the separator, I think; that's the
simplest solution.  If so, I'll make sure to document the limitation
that capability strings must not contain colons (in svn_ra.h), and
will change start-hook.tmpl of course.

-Karl

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: start-commit.bat

Posted by Duncan Booth <du...@suttoncourtenay.org.uk>.
"D.J. Heap" <dj...@gmail.com> wrote:

>> It doesn't matter on windows: the double quotes are handled by the
>> application not the shell. Windows respects the quote marks when it is
>> looking for things like command separators, but the entire string is
>> passed through unaltered to the application, and the application then
>> has to parse the string. If it is a C runtime then argv is generated by
>> the runtime, not by the shell.
> [snip]
> 
> 
> And APR is automatically quoting arguments where has_spaces is
> true...but shell commands (not programs) will also get arguments split
> up by comma and semicolon and possibly other special characters (pipe,
> output redirector, etc) if they are not quoted, and APR is not
> handling those, it appears.  A colon works, though (ie, does not act
> as a argument separator in the shell).

My point was that if APR quoted the arguments whether or not they have 
spaces it would work for both shell commands and programs.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: start-commit.bat

Posted by "D.J. Heap" <dj...@gmail.com>.
On Nov 8, 2007 2:39 AM, Duncan Booth
<du...@suttoncourtenay.org.uk> wrote:
> Karl Fogel <kf...@red-bean.com> wrote:
>
> >> A comma works fine if the whole list is double-quoted, and we should
> >> probably be quoting all parameters anyway to handle spaces in paths,
> >> etc. if APR isn't already.
> >
> > Hmmm.  But this isn't going through a shell.  If we put double quotes
> > around something, then the double quotes will actually be there in the
> > argument, right?  That is, if you write your hook program in C, then
> > argv[3][0] == '"', no?
>
> No
>
> It doesn't matter on windows: the double quotes are handled by the
> application not the shell. Windows respects the quote marks when it is
> looking for things like command separators, but the entire string is
> passed through unaltered to the application, and the application then
> has to parse the string. If it is a C runtime then argv is generated by
> the runtime, not by the shell.
[snip]


And APR is automatically quoting arguments where has_spaces is
true...but shell commands (not programs) will also get arguments split
up by comma and semicolon and possibly other special characters (pipe,
output redirector, etc) if they are not quoted, and APR is not
handling those, it appears.  A colon works, though (ie, does not act
as a argument separator in the shell).

DJ

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: start-commit.bat

Posted by Duncan Booth <du...@suttoncourtenay.org.uk>.
Karl Fogel <kf...@red-bean.com> wrote:

>> A comma works fine if the whole list is double-quoted, and we should
>> probably be quoting all parameters anyway to handle spaces in paths,
>> etc. if APR isn't already.
> 
> Hmmm.  But this isn't going through a shell.  If we put double quotes
> around something, then the double quotes will actually be there in the
> argument, right?  That is, if you write your hook program in C, then
> argv[3][0] == '"', no?

No

It doesn't matter on windows: the double quotes are handled by the 
application not the shell. Windows respects the quote marks when it is 
looking for things like command separators, but the entire string is 
passed through unaltered to the application, and the application then 
has to parse the string. If it is a C runtime then argv is generated by 
the runtime, not by the shell.

e.g.

#include <stdio.h>

int main(int argc, char **argv) {
    int i;
    for (i = 0; i < argc; i++) {
        printf("arg %d: %s\n", i, argv[i]);
    };
    return 0;
}

... compiled to a.exe using MinGW or Microsoft C/C++, it doesn't matter 
...

C:\Temp>\python25\python
Python 2.5.1 (r251:54863, Apr 18 2007, 08:51:08) [MSC v.1310 32 bit 
(Intel)] on
win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> os.spawnl(os.P_WAIT, 'a.exe', 'a.exe', '1', '2', '3,4,5')
arg 0: a.exe
arg 1: 1
arg 2: 2
arg 3: 3,4,5
0
>>> os.spawnl(os.P_WAIT, 'a.exe', 'a.exe', '1', '2', '"3,4,5"')
arg 0: a.exe
arg 1: 1
arg 2: 2
arg 3: 3,4,5
0
>>> os.spawnl(os.P_WAIT, 'a.exe', 'a.exe', '1 2 "3,4,5"')
arg 0: a.exe
arg 1: 1
arg 2: 2
arg 3: 3,4,5
0
>>>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: start-commit.bat

Posted by Eric Gillespie <ep...@pretzelnet.org>.
Karl Fogel <kf...@red-bean.com> writes:

> "D.J. Heap" <dj...@gmail.com> writes:
> > A comma works fine if the whole list is double-quoted, and we should
> > probably be quoting all parameters anyway to handle spaces in paths,
> > etc. if APR isn't already.
> 
> Hmmm.  But this isn't going through a shell.  If we put double quotes
> around something, then the double quotes will actually be there in the
> argument, right?  That is, if you write your hook program in C, then
> argv[3][0] == '"', no?

Right; we don't want that.

-- 
Eric Gillespie <*> epg@pretzelnet.org

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: start-commit.bat

Posted by Karl Fogel <kf...@red-bean.com>.
"D.J. Heap" <dj...@gmail.com> writes:
> On Nov 7, 2007 5:18 PM, Karl Fogel <kf...@red-bean.com> wrote:
> [snip]
>> 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 ":" ?
>
> A comma works fine if the whole list is double-quoted, and we should
> probably be quoting all parameters anyway to handle spaces in paths,
> etc. if APR isn't already.

Hmmm.  But this isn't going through a shell.  If we put double quotes
around something, then the double quotes will actually be there in the
argument, right?  That is, if you write your hook program in C, then
argv[3][0] == '"', no?

In other words, is the behavior different depending on whether you
write start-commit.bat vs start-commit.c?  And if so, should be be
putting double quotes around args only conditionally?

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: start-commit.bat

Posted by "D.J. Heap" <dj...@gmail.com>.
On Nov 7, 2007 5:18 PM, Karl Fogel <kf...@red-bean.com> wrote:
[snip]
> 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 ":" ?


A comma works fine if the whole list is double-quoted, and we should
probably be quoting all parameters anyway to handle spaces in paths,
etc. if APR isn't already.

DJ

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: SVN repository - Log file -- Check the User

Posted by Blair Zajac <bl...@orcaware.com>.
Erik Huelsmann wrote:
> On 11/8/07, Adriano Nassi <ad...@historicalengineering.com> wrote:
>> Dear All,
>>
>> I am using SVN as repository and I am wondering in witch way I can
>> check who was the last one user that commit the data and when.
>>
>> Any suggestion ?
> 
> This sounds like a Subversion useage question. Please mail users@ for
> an answer as this list is about development of Subversion itself.

Adriano,

One more request, please don't reply to an existing thread to start a new 
thread.  See here why this isn't a good thing to do:

http://subversion.tigris.org/mailing-list-guidelines.html#fresh-post

Regards,
Blair

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: SVN repository - Log file -- Check the User

Posted by Erik Huelsmann <eh...@gmail.com>.
On 11/8/07, Adriano Nassi <ad...@historicalengineering.com> wrote:
> Dear All,
>
> I am using SVN as repository and I am wondering in witch way I can
> check who was the last one user that commit the data and when.
>
> Any suggestion ?

This sounds like a Subversion useage question. Please mail users@ for
an answer as this list is about development of Subversion itself.

bye,

Erik.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

SVN repository - Log file -- Check the User

Posted by Adriano Nassi <ad...@historicalengineering.com>.
Dear All,

I am using SVN as repository and I am wondering in witch way I can  
check who was the last one user that commit the data and when.

Any suggestion ?


Thank in advance,


Adriano.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: start-commit.bat

Posted by Mathias Weinert <we...@mccw.de>.
Eric Gillespie <ep...@pretzelnet.org> wrote:

> Karl Fogel <kf...@red-bean.com> writes:
>
>> Masaru Tsuchiyama <m....@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


Re: start-commit.bat

Posted by Eric Gillespie <ep...@pretzelnet.org>.
Karl Fogel <kf...@red-bean.com> writes:

> Masaru Tsuchiyama <m....@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

-- 
Eric Gillespie <*> epg@pretzelnet.org

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: start-commit.bat

Posted by Karl Fogel <kf...@red-bean.com>.
Masaru Tsuchiyama <m....@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 ":" ?

-Karl

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org