On 1/3/07, WICKENS, Nicholas, GBM <Nicholas.WICKENS@rbos.com> wrote:
> >> 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
> 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
In MYFOLDER (not its parent), try svn add . --force
svn:ignore will be honored by this, files that are managed by
Subversion will be skipped over, and unversioned files will be added.
To unsubscribe, e-mail: email@example.com
For additional commands, e-mail: firstname.lastname@example.org
Received on Wed Jan 3 17:19:22 2007