Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Resuming git-svn clone

Tags:

git

git-svn

People also ask

Can you pause git clone?

Depending on your situation (e.g. if you want to close your laptop and / or switch networks), stopping the process (using Ctrl-Z ) and resuming it (using fg ) might work for you. This worked for me, and i have been doing that... stop the process, put the PC into hibernation and resume the process.

How long does git SVN clone take?

Beware that the conversion process can take a significant amount of time for larger repositories, even when cloning from a local SVN repository. As a benchmark, converting a 400MB repository with 33,000 commits on main took around 12 hours to complete.

How do I clone a Subversion repository?

You can clone from a SVN repo using the git svn clone command. -s = If your SVN repo follows standard naming convention where main source is in “trunk”, branches are created in “branches”. Here we are telling git svn that trunk is the “trunk” directory, maintenance is the “branches” directory etc.


The git svn fetch command to resume a git svn clone is confirmed by several sources:

  • Git svn and Gnome blog entry

(Incidentally, if during the initial clone step your connection dies or you need to stop it then to resume the clone you just have to run the above command to resume downloading the history).

  • Hacker News

There seems to be a memory leak in git-svn. The size of the git-svn process grew slowly and after about two weeks it was at 1.2 GB resident size, at which point the OS refused to let it fork.
Thing is, this was a blessing in disguise.
I was able to resume the interrupted clone with a simple "git svn fetch", and it ran much faster with the now radically smaller heap.
This, worked so well, in fact, that I got into the habit of interrupting and restarting the process every evening and every morning. A few days later it was done.

  • git-svn tutorial

You start your adventures with git-svn by cloning an existing Subversion repository:

git svn clone url://path/to/repo -s

The -s flag assumes that your repository uses the "trunk, branches, tags" convention. If not, you have to specify manually which directories represent branches and tags, if you want Git to know about them.

This will take a long time, as it will fetch every single revision from SVN and commit locally. If for any reason it stops, you can resume with git svn fetch.


I found a blog post that provided what (I hope) is a correct answer.

Apparently, running git svn fetch effectively completes the clone operation. Here's hoping!


From at least git 2.1.0 you can resume by just reissuing git svn clone

However this will duplicate some entries in your .git/config remove those and everything will be fine


As VonC, CaptainAwesomePants and Archi all said git svn fetch does the trick. I was doing a git svn clone url... --authors-file=path/to/file and the clone failed because one of the authors wasn't in the authors file. I added the author to the file and ran git svn fetch and it continued from where it left off and looking at the git log later, it seems that it used the newly added author to replace the commit author's name so all was sweet.