this-Me
this-Me

Reputation: 2145

How to specify Filename with blanks in Subversion command prompt

I'm trying to execute a subversion related command line argument.

However it appears that it doesnt take the file name has blanks

Ex: User Guide Version 1.0.doc

I tried enclosing in double quotes "User Guide Version 1.0.doc"

and within square braces '[]' in vain [User Guide Version 1.0.doc]

Am i missing something

Upvotes: 3

Views: 4621

Answers (3)

Volker Stolz
Volker Stolz

Reputation: 7402

On the command line, using single quotes should do the trick: 'file name'.

Update: The second argument to svn co must be a PATH, not a filename!

$ svn help co

checkout (co): Check out a working copy from a repository. usage: checkout URL[@REV]... [PATH]

If specified, REV determines in which revision the URL is first
looked up.

If PATH is omitted, the basename of the URL will be used as the destination. If multiple URLs are given each will be checked out into a sub-directory of PATH, with the name of the sub-directory being the basename of the URL.

Upvotes: 1

Wim Coenen
Wim Coenen

Reputation: 66733

You should simply do this:

svn checkout https://vatsa.com/svn/dcs/branches/doc

This will create a local working copy folder named "doc" in the current working directory.

Your mistake was that you gave a file name as the last argument. You can only checkout folders, not individual files.

The first argument after svn checkout is the URL of the folder in the repository. The second argument is optional, and is used to specify the name of the local working copy folder in case you don't want to use the same folder name as in the repository or if you want to specify a location other than in the current working directory.

Finally, seeing a branch named "doc" makes me wonder whether you've misunderstood what branches are for. See the explanation What's a Branch in the SVN book. Branches are for concurrently maintaining different copies of your whole project, not for organizing different components (like source and documentation) of the same project.

Upvotes: 1

Kevin Shea
Kevin Shea

Reputation: 920

On windows cmd prompt, you need to use double quotes and on unixes you can use either.

svn add "my file"

and

C:\kev>svn co file:///kev/dummy dummy2

A dummy2\User Guide Version 1.0.doc

Checked out revision 1.

works perfectly on windows for me. Could you supply svn output to help if you're still having problems?

Upvotes: 5

Related Questions