Melab
Melab

Reputation: 2822

How do I download an SVN repository?

What is the command to download an entire Subversion repository, i.e. the repository itself? I know that it is not svn checkout because that only downloads the head revision. I am looking for something similar to git clone or hg clone.

Upvotes: 1

Views: 7669

Answers (3)

Sheshan Gamage
Sheshan Gamage

Reputation: 634

I was trying to get it without installing i was able to do it by running wget. use the below command to download the svn repo

wget -m -np http://myproject.googlecode.com/svn/myproject/trunk/

Upvotes: 1

Andrew Edgecombe
Andrew Edgecombe

Reputation: 40372

As @Chris has said, SVN is not a distributed version control system, so downloading the entire repository is something done relatively infrequently and is not necessary for a normal user. Typically a user will only need to perform an svn checkout.

But utilities are provided for this as part of, say, a backup regime.

Historically the svnadmin dump command would be used. This assumes that you have local file access to the respository itself (eg. not just svn+ssh:\\ or http:\\). This command will dump the details of every commit in the specified revision range (eg. -r1:HEAD) to stdout. Such a file can then be used to populate another repository, using the svnadmin load command. See the svn book for usage details.

In addition, in version 1.7 of subversion a dump utility was introduced that was network aware, called svnrdump. This creates the same dump format file as the svnadmin dump command described above. Again, see the svn book for details.

Upvotes: 6

Chris
Chris

Reputation: 4231

In contrast to git or hg, SVN is not a distributed version control system. There is no way to download the repository itself.

If you did download it (via ftp, for example) there would be no way to merge changes with the original repo.

Upvotes: 2

Related Questions