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

Re: Problem with "svn add" command

From: David Weintraub <qazwart_at_gmail.com>
Date: Mon, 15 Mar 2010 17:23:44 -0400

A slash in front of a file name can be confused with a parameter. The
trick is to prefix files with a ./:

$ svn add ./-example.txt

That way, Subversion doesn't think the -example.txt are a series of
parameters to pass to the svn add command. If there's a space after
the dash and before the first "e" in example, you'll need quotes too:

$ svn add "./- example.txt"

On Mon, Mar 15, 2010 at 5:06 PM, Itamar O <itamarost_at_gmail.com> wrote:
> I might be doing something wrong here,
> but I have an unversioned file named "- example.txt" (don't ask why..),
> and when I 'svn add "- example.txt"' I get:
>   svn: invalid option character:
>   Type 'svn help' for usage.
> Seems that the add command thinks the initial "-" is an option prefix...
> This also occurs without the whitespace between "-" and "example.txt"
> (then I get "svn: invalid option character: e").
> Is there a way to work around this?
> Thanks,
> Itamar O.

David Weintraub
Received on 2010-03-15 22:24:14 CET

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