Does SVN have an equivalent for "hg clone" in Mercurial or "git clone" in Git?

I have the URL of the Subversion repository and on the command line on Ubuntu. I want to just download a copy of the repository, as in Mercurial, by typing:

hg clone http://svn.somerepository.com/somerepository/trunk/docs/ 
+4
source share
4 answers

You want to accomplish what is called β€œverify” in the SVN country.

 svn co http://svn.somerepository.com/somerepository/trunk/docs/ 

Note that the main difference between SVN and distributed systems such as Mercurial or Git is that the SVN "check out" command only downloads a copy of the latest version of each file, while with hg clone you actually end up with a local copy the entire history of the archive. This has some implications for the way you work. For example, for receiving logs, making differences, etc. You must have a network connection to the server.

+11
source

If you just need to take the current version, svn checkout is all you need.

If you want to get a full copy of the repository, including all previous versions, you can use svnsync . It can copy the full repository and gradually upload new commits. I do not think this can be limited to only subdirectories.

+5
source
  • You cannot clone a repository without administrator access to it (i.e. the ability to execute svnadmin ).
  • You can check the subtree with svn co http://....../docs
+4
source
 svn co svn://www.example.com/path/to/repository/... 

In which "co" is not suitable for a "checkout".

+2
source

Source: https://habr.com/ru/post/1301474/


All Articles