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

Re: "svn add *" and <at> sign in filename

From: 'Daniel Shahaf' <d.s_at_daniel.shahaf.name>
Date: Wed, 10 Jul 2013 20:56:58 +0300

Варфоломеев Игорь wrote on Wed, Jul 10, 2013 at 20:36:24 +0400:
> > From: 'Daniel Shahaf' [mailto:d.s_at_daniel.shahaf.name]
> > Sent: Wednesday, July 10, 2013 4:46 AM
> >
> > The glob is expanded by the shell, so svn sees ['svn', 'add', 'wc/B/@2.txt'], so
> > it parses out target 'wc/B/' with peg '2.txt' (this part is arguably a bug), and
> > stripping the slash off the end is normal (see
> > svn_dirent_canonicalize() in if you're curious).
>
> Em.. In fact, I think glob is expanded by the shell on Linux only.
> ( http://en.wikipedia.org/wiki/Glob_%28programming%29#Implementations )
> And it looks like svn "emulates" Linux-style wildcard expansion somehow.
> Maybe this is what issue 787 is all about.
> ( http://subversion.tigris.org/issues/show_bug.cgi?id=787 )
> One more related discussion:
> ( http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=236049 )
> I understand that making svn behave similar on both platforms is a good idea....
> I don't know how to fix this issue without breaking something else either...
> It looks like you're right and the safest way for a user is just not to use wildcards at all...
>
> I did a quick search through the issue tracker and didn't found anything similar...
> So, I've just submitted the issue http://subversion.tigris.org/issues/show_bug.cgi?id=4393 .
>

Sorry, that one is not a valid issue, for the reason I just said: the
wildcard is expanded (by the C runtime) so svn sees 'wc/@2.txt' in argv,
and the error message ("invalid peg") is correct. The recommended
workaround is to append an @ sign to *every* filename or URL you pass on
the svn command line.

BTW: have you tried using --targets? I'm not sure if we parse pegs from
the targets file, so that may fix your moves issue too.

Daniel

> Thanks for your answers!
>
Received on 2013-07-10 19:57:51 CEST

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.