I have a URL for a Subversion repository and on the command line on Ubuntu I want to just download a copy of the repository as you would do in Mercurial by typing:
hg clone http://svn.somerepository.com/somerepository/trunk/docs/
How do you "clone" a repository in SVN?
Also, I just want to get everything below the docs
folder - I don't want to start in the trunk - how would you do something like this:
svn clone http://svn.somerepository.com/somerepository/trunk/docs/
You want to perform what in SVN-land is called a "check out."
svn co http://svn.somerepository.com/somerepository/trunk/docs/
Note the main difference between SVN and distributed systems like Mercurial or Git is that SVN's "check out" command downloads only a copy of the most recent version of each file, whereas with hg clone
you will actually end up with a local copy of the repository's entire history as well. This has some implications for the way in which you work. For example, you need to have a network connection to the server in order to retrieve logs, perform diffs, etc.
If you just need to grab the current version, svn checkout
is all you need.
If you want a complete copy of the repository, including all previous versions, you can use svnsync
. It can copy a complete repository and incrementally download new commits. I don't think it can be restricted to subdirectories though.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With