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

RE: svn add question

From: WICKENS, Nicholas, GBM <Nicholas.WICKENS_at_rbos.com>
Date: 2007-01-03 17:10:52 CET

>> I was trying to use the svn add command and came across the following
>> which I can't find explained anywhere and was hoping someone could
>> answer for me.
>>
>> I am trying to add all the contents of a folder using the command:
>> svn add "myfolder\*" Calling this produces the following error:
>> svn: Can't check path 'MYFOLDER\*': The filename, directory
>> name, or volume
>> label syntax is incorrect
>> However when I remove the quotes then the command works fine.
>>
>> Is there a reason why it won't work with the quotes and is
>> there some other
>> syntax that I should be aware of?
>>
>
>These are two different commands: The asteriks(*) gets expanded to "all
files" by the shell. The quotes prevent
>this expansion. With quotes you're trying to add a folder named "*" in the
folder "MYFOLDER". Try creating such
>a folder in the windows commandline and you'll get the same error - windows
does not allow such a foldername.
>Without the quotes, however, the command gets expanded to "svn add
MYFOLDER\file1 MYFOLDER\file2 ..." wich leads
>to no problems as all filenames are valid.
>
>So this is not a svn issue at all, just a defined shell behaviour (unix
shells behave the same).
>
>You should be aware that svn add MYFOLDER\* overrides any svn:ignore
setting - the list of files gets expanded
>before it gets handed over to svn and you're thus *explicitly* telling svn
to add the file and it will happily
>fulfill your wishes.
>
>What you probably want is just "add all files in the folder MYFOLDER" -
just run "svn add MYFOLDER". If MYFOLDER
>is already under version controll, add the --force flag (svn add --force
MYFOLDER).

Thanks for the explanation it makes a lot of sense.

However your suggestion for adding the folder by using "svn add MYFOLDER"
won't work for me as the parent folder is not under subversion whilst
MYFOLDER is. If I try calling this (with or without the --force flag) I get
the following error:
svn: '.' is not a working copy
svn: Can't open file '.svn\entries': The system cannot find the path
specified.

Is there any work around to this?
Regards,
Nicholas

***********************************************************************************
The Royal Bank of Scotland plc. Registered in Scotland No 90312. Registered Office: 36 St Andrew Square, Edinburgh EH2 2YB.
Authorised and regulated by the Financial Services Authority
 
This e-mail message is confidential and for use by the
addressee only. If the message is received by anyone other
than the addressee, please return the message to the sender
by replying to it and then delete the message from your
computer. Internet e-mails are not necessarily secure. The
Royal Bank of Scotland plc does not accept responsibility for
changes made to this message after it was sent.

Whilst all reasonable care has been taken to avoid the
transmission of viruses, it is the responsibility of the recipient to
ensure that the onward transmission, opening or use of this
message and any attachments will not adversely affect its
systems or data. No responsibility is accepted by The
Royal Bank of Scotland plc in this regard and the recipient should carry
out such virus and other checks as it considers appropriate.
Visit our websites at:
www.rbs.com
www.rbsgc.com
www.rbsmarkets.com
***********************************************************************************

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Wed Jan 3 17:12:41 2007

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.