3

I want checkout a file in SVN but return that message to me "svn: E200007: URL 'svn://mcdssrv/repos/currecnt/class/MBackingBean.java' refers to a file, not a directiry". so, how can i resolve that?
My command is:
svn checkout svn://mcdssrv/repos/currecnt/class/MBackingBean.java d:\currecnt\class\MBackingBean.java

1

2 Answers 2

4

You can only checkout a directory, so:

svn checkout svn://mcdssrv/repos/currecnt/class/ d:\currecnt\class 

If you want to avoid too many files/nested directories, you can use the --depth files or --depth immediates option.

If you just want the file, and not edit it / check it back in later, use svn export:

svn export svn://mcdssrv/repos/currecnt/class/MBackingBean.java d:\currecnt\class 

[Edited] That being said, as someone (@jyotsna-saroha) commented below, TortoiseSVN manages to do it, and someone has proposed a clever workaround.

Basically, you have to do

svn --depth empty checkout svn://mcdssrv/repos/currecnt/class/ d:\currecnt\class cd d:\currecnt\class\ svn update MBackingBean.java 
Sign up to request clarification or add additional context in comments.

6 Comments

Checking out a single file is possible with TortoviseSVN gui client.
Thanks for your answer. EXPORT command add file to my system but exclude that from SVN. i want checkout one file to my system not a directory because some files in repository directory have problem. how can i do that? :(
I edited the answer to do this with command line or TortoiseSVN client, please take a look above.
It works, but i have a new problem with that command. The problem is: when i execute that command one time that's work correctly but when i execute that command for second time for another file in that folder previous file deleted how can i fix that?
As a side note, this process resulted in a .svn directory in the target directory. This would be '\current\class' using the example. This .svn directory was created even though a parent directory is already an SVN versioned directory.
|
1

Latest version(s) of TortoiseSVN allow to checkout a single file. You should try upgrading your TortoiseSVN and then try the same steps again.

1 Comment

Yes TortoiseSVN can do this in every version but i want do this in svn(command prompt)

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.