[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: Karl Fogel <kfogel_at_red-bean.com>
Date: 2007-11-08 23:56:24 CET

Duncan Booth <duncan.booth@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
Received on Thu Nov 8 23:56:38 2007

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.