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
- possible duplicate of Checkout one file from Subversioncrashmstr– crashmstr2014-03-31 12:55:57 +00:00Commented Mar 31, 2014 at 12:55
Add a comment |
2 Answers
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 6 Comments
Jyotsna Saroha
Checking out a single file is possible with TortoviseSVN gui client.
Soheil Mamdouhi
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? :(
Patrice M.
I edited the answer to do this with command line or TortoiseSVN client, please take a look above.
Soheil Mamdouhi
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?
Thoth
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.
|
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
Soheil Mamdouhi
Yes TortoiseSVN can do this in every version but i want do this in svn(command prompt)