Subversion: Is there anything faster than "svnsync"?

So, I have a subversion repository stored on some cloud (for example, code.google.com), but for various reasons I need to make my code non-public.

I decided that I needed to download the entire repository and transfer it to my own svn server.

So, I started using:

svnsync init DEST SRC svnsync sync DEST 

And for each revision revision it took about 0.5 seconds!

Fortunately, my repo had only 200 changes ... so wait a couple of minutes. But what about mature projects that have 200,000 or 2,000,000 versions!

... 2e6 * 0.5 / 60/60/24 ~ about 11 days!


Is there anything faster than "svnsync" to download your repo from the cloud?

+4
source share
3 answers

Well, obviously, you could do it yourself on the server, and then zip it up and download. Or you may just not download the whole story.

But what's the point in this matter? This is a bit academic since your problem is resolved.

+1
source

I have the same problem in my collection of repositories, which contains hundreds of thousands of fixes. Here's how I get around this:

  • Create an empty repository on the mirror.
  • Create a gziped dump file for my repository. (my backup system already does this) (note: this step took night to send my giant repository across the continent).
  • scp (or your favorite method of copying deleted files), dump file to a mirror server.
  • Download the repository by specifying --force-uuid .
  • Configure revprops in edition 0. I just took a normally configured empty repository and looked at its rev 0.

You are now ready to run svnsync on your main server. This will continue from where your dump stopped.

+1
source

In the case of OP, where you don't have console access to the svn server, svnsync (which is essentially the svn checkout from URL 1 combined with svn commit in URL 2) is just as good as you are going to get.

But if you have access to the server, there are faster ways than svnsync . One good way to build a mirror is to use svnadmin hotcopy to create the original copy of the repository, and then use the svnsync init --allow-non-empty option added in subversion 1.7 to turn it into a mirror. It also gives you a backup of your hooks, etc., which svnsync would not otherwise do.

Note that you need to move the hooks directory to hooks-original or something so that they are not used by the mirror - especially if you have a hook after svnsync sync original repo that causes svnsync sync

0
source

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


All Articles