2

I read on this SO question that the way to resume an interrupted git svn clone is git svn fetch. In my case, the download from the svn server always stalls after a few minutes. I've tried waiting it out overnight, but in the morning it's just where I left it the previous night. I quit with cntr-C. git svn fetch then starts the entire download from the beginning. Obviously, this gets me nowhere. Any suggestions?

Community
  • 1
  • 1
garyp
  • 967
  • 7
  • 36
  • Is it ever downloading anything? Does the .git directory have any objects? Maybe it never actually starts, so it starts fresh ever time? – Andy Feb 28 '12 at 15:55
  • Yes, it is downloading. .git has four or five large files, and some zero-length files. For example : -rw------- 1 gary staff 1638400 Feb 27 15:53 c4nsiNdijC -rw------- 1 gary staff 0 Feb 28 09:49 c5lPBJfcAz (sorry about the formatting. Can't put a newline in a comment, it seems) – garyp Feb 28 '12 at 16:03
  • `git svn fetch` works. I was (and still am) confused because on each restart, a hundred, more or less, file names scroll by that are repeats: they also appeared in the previous two or three or four fetches. I began to notice new file names scroll by, so I persevered, and after fifteen or twenty restarts of `git svn fetch` I had everything. – garyp Mar 09 '12 at 19:34

1 Answers1

0

Try to fetch partial history first with git svn -r <revision range> parameter. Then either to fetch more commits part by part or limit yourself to shallow svn history.

Also ensure you have recent enough git.

Vi.
  • 37,014
  • 18
  • 93
  • 148
  • When I do what you suggest, my app doesn't build. I see two possibilities: 1.) I need to build and bring in libraries not contained in this repo (which is a different issue from the issue at hand). 2.) I don't have a complete snapshot of the current head. Will `git svn fetch -rxxxx:HEAD` provide a complete copy of the HEAD state of the repository, only with less history? Furthermore, I cannot add additional history. `git svn fetch -ryyyy:xxxx` returns silently. – garyp Feb 28 '12 at 17:40
  • "svn:externals" is not magically turned to git submodules. You need to supply them manually. – Vi. Feb 28 '12 at 18:36
  • Just "git svn fetch" should continue up to current revision. Note that you can't normally extend svn history to earlier commits (unlike shallow git clones) – Vi. Feb 28 '12 at 18:37