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

Re: cvs2svn.py patch

From: Marcus Comstedt <marcus_at_mc.pp.se>
Date: 2002-04-14 19:11:30 CEST

Arkadiusz Miskiewicz <misiek@pld.ORG.PL> writes:

> It's better than it was before. I've never seen a cvs file with single quotes
> in name but... ;) Anyway every character in file name could be escaped
> just to be sure but this isn't ,,beauty'' way.

No need to escape all characters. If the argument is enclosed in
single quotes, then only single quotes need to be escaped. Just do

      pipe = os.popen('co -q -p%s \'%s\'' %
                          (r, string.replace(f, "'","'\"'\"'")),
                      'r', 102400)

and it should be ok for all characters (although NUL characters could
still be a problem, but they are not valid in filenames anyway).

  // Marcus

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sun Apr 14 19:14:55 2002

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.