How can I use the svn export
command to get a single file from the repository?
I've tried this:
svn export e:\repositories\process\test.txt c:\
But I get this error:
svn: e:\repositories\process is not a working copy
How can I use the svn export
command to get a single file from the repository?
I've tried this:
svn export e:\repositories\process\test.txt c:\
But I get this error:
svn: e:\repositories\process is not a working copy
Guessing from your directory name, you are trying to access the repository on the local filesystem. You still need to use URL syntax to access it:
svn export file:///e:/repositories/process/test.txt c:\test.txt
You don't have to do this locally either. You can do it through a remote repository, for example:
svn export http://<repo>/process/test.txt /path/to/code/
For the substition impaired here is a real example from GitHub.com to a local directory:
svn ls https://github.com/rdcarp/playing-cards/trunk/PumpkinSoup.PlayingCards.Interfaces
svn export https://github.com/rdcarp/playing-cards/trunk/PumpkinSoup.PlayingCards.Interfaces /temp/SvnExport/Washburn
See: Download a single folder or directory from a GitHub repo for more details.
I know the OP was asking about doing the export from the command line, but just in case this is helpful to anyone else out there...
You could just let Eclipse (plus one of the plugins discussed here) do the work for you.
Obviously, downloading Eclipse just for doing a single export is overkill, but if you are already using it for development, you can also do an svn export
simply from your IDE's context menu when browsing an SVN repository.
Advantages:
Use SVN repository URL to export file to Local path.
svn export [-r rev] [--ignore-externals] URL Export_PATH
svn export http://<path>/test.txt C:\Temp-Folder