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

best way to specify filenames starting with a special character like "-" ?

From: C.A.T.Magic <c.a.t.magic_at_gmx.at>
Date: 2004-02-28 18:34:19 CET

Hi,

what is the -best- method to specify filenames starting with
a special character, e.g. a '-' character
when using some automated scripts?

assume a file in the repository is (! evil !) named "--something--":

(dos)
Test> svn add --something--
   svn: invalid option: --something--

(dos)
Test> svn add "--something--"
   svn: invalid option: --something--

or some weird experiment, using a CygWin shell:
Test$ svn add \"--something--\"
svn: Error resolving case of '""--something--"'

I found out that I could prefix all files with ./ and put it under quotes
or try to use the whole repository path to the file in quotes.
Test> svn add "./--something--"
but somehow this it still doesn't -feel- right to prefix everything that way.

is it possible extend/fix svn to use an extra flag like
Test> svn add --filename "--something--"

or (peferably) simply just to respect the extra quotes like
Test> svn add "--something--"

to ensure a script will 100% work with all kinds of filenames?

as far as i know "main( argc, argv )" gets input with quotes already stripped off it,
whereas "WinMain" gets the original commandline as a whole and leaves parsing
and splitting it to the application.

( my client platform is: WindowsNT/2000/XP, using both DOS and CygWin shell,
  server is on Suse Linux 9 )

======
c.a.t.
 
Received on Sat Feb 28 18:31:34 2004

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

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