threads / discuss / 29336

git svn clone terminating prematurely (I think)

Subject: git svn clone terminating prematurely (I think)

## tl;dr

6 messages between Jan 11, 2012 and Jan 13, 2012.

replies: 5people: 4as markdown or json

Steven Line· Jan 11, 2012, 00:02 UTC · lore
Reposting this with a better subject than (unknown) . . .
Hi All,

First off I am a new user to git, I'm not a git developer or power user. Am I in the right mailing list? If not could somebody point me where I could get some help from experienced git people?

Here's the problem: I need some help getting my subversion repository cloned over to git. Our svn repository has about 12,000 commits, when I run git svn clone -s -A authors.txt svn+ssh://csvn <at> source.res.ourdomain.com/home/svn/sem sem It runs for about 2h 15m then completes with no error messages. I have also cloned starting at revision 6300, about the middle of the svn repository, and I get the same results as below.

After cloning, I cd into the sem directory and run

$ git log fatal: bad default revision 'HEAD'

$ git log --all  # this seems to work

$ git branch -a # shows only about half the branches that should have been cloned

$ ls -al sem total 6 drwxr-xr-x 3 git other 512 Jan 10 20:58 ./ drwxr-xr-x 6 git root 512 Jan 10 20:58 ../ drwxr-xr-x 9 git other 512 Jan 10 23:13 .git/

I think this means the clone terminated prematurely but other than that I'm stuck. There were no error messages from the clone. Could somebody give me some suggestions on what to try? I haven't found the answer via google yet.

Thank you for any help.
-- 
Steven Line
303-910-1212
sline00@gmail.com
Ramkumar Ramachandra· Jan 11, 2012, 04:34 UTC · re: Steven Line · lore

Re: git svn clone terminating prematurely (I think)

Hi Steven,
Steven Line wrote:
> First off I am a new user to git, I'm not a git developer or power
> user.  Am I in the right mailing list?  If not could somebody point me
> where I could get some help from experienced git people?

This is the right place. The Git community believes in maintaining just one mailing list.

Show 7 quoted lines
> I need some help getting my subversion repository cloned over to git.
> Our svn repository has about 12,000 commits, when I run
> git svn clone -s  -A authors.txt
> svn+ssh://csvn <at> source.res.ourdomain.com/home/svn/sem sem
> It runs for about 2h 15m then completes with no error messages. I have
> also cloned starting at revision 6300, about the middle of the svn
> repository, and I get the same results as below.
> $ git branch -a # shows only about half the branches that should have
> been cloned

Interesting. From the git-svn-id of the most recent commit, can you tell if there's anything especially fishy about the revision where git-svn stops? Your Subversion repository is probably broken in some way, but git-svn should not use that as an excuse for appearing to finish successfully while failing in reality.

Cheers.
-- Ram
Steven Line· Jan 11, 2012, 21:52 UTC · re: Ramkumar Ramachandra · lore

Re: git svn clone terminating prematurely (I think)

Hi Ram, thank you for the reply.  Se below . . .
Show 17 quoted lines
>
>> I need some help getting my subversion repository cloned over to git.
>> Our svn repository has about 12,000 commits, when I run
>> git svn clone -s  -A authors.txt
>> svn+ssh://csvn <at> source.res.ourdomain.com/home/svn/sem sem
>> It runs for about 2h 15m then completes with no error messages. I have
>> also cloned starting at revision 6300, about the middle of the svn
>> repository, and I get the same results as below.
>
>> $ git branch -a # shows only about half the branches that should have
>> been cloned
>
> Interesting.  From the git-svn-id of the most recent commit, can you
> tell if there's anything especially fishy about the revision where
> git-svn stops?  Your Subversion repository is probably broken in some
> way, but git-svn should not use that as an excuse for appearing to
> finish successfully while failing in reality.

Well by your question it seems you expect this clone to fail at the same svn revision number each time. I spent all day today trying to figure out what that revision was. However it doesn't seem to be failing at the same svn revision each time.

There are about 12813 revisions in our svn repository so I started attempting clones from successively later and later revisions both to figure which revision they repeatedly failed on (it was never the same one) and to see if I could coax a successful clone to occur. Originally I started at revision 1, then incremented to 6300, then 8000, then 10000, then 12,500, then finally 12,700. Finally the attempt starting at svn revision 12,700 succeeded and the resulting git repository seems to work. All the attempts prior to 12,700 (starting at 1, 6300, 8000, 10000, and 12,500) failed while importing different revisions, none of them showed error messages.

One thing that I am suspect of is that I'm not able to log directly into the machine running git, it's on a remote server in Atlanta while I'm in Colorado. I'm running the 'git svn clone' using nohup, but in every case of a corrupt git repository the connection between me and the server dies before the git completes (the connection dies, but I log in again and run ps -ef and I see the multiple git processes still running. They run for up to several hours longer, then terminate). I should be ok since I'm using nohup, but coincidentally the only clone that succeeded was the one where the network connection never disconnected during the clone

Not sure if this helps but here are some numbers: Both the svn repository and git machine are Solaris 10 Svn revision 1.6.12 CollabNet Git version 1.7.6.1

Thank you.
-- 
Steven Line
303-910-1212
sline00@gmail.com
Jonathan Nieder· Jan 11, 2012, 22:48 UTC · re: Ramkumar Ramachandra · lore

Re: git svn clone terminating prematurely (I think)

Ramkumar Ramachandra wrote:
> Interesting.  From the git-svn-id of the most recent commit, can you
> tell if there's anything especially fishy about the revision where
> git-svn stops?  Your Subversion repository is probably broken in some
> way,

I wouldn't necessarily assume that. My first hunch would have been that this is some variation on the SIGPIPE bug[1]. The usual workaround for that[2] is to get git-svn to continue by running "git svn fetch" again. Nobody's fixed it because nobody's stared at the SVN perl bindings for long enough to find the cause.

Modern git versions produce a message in that case, though:
	error: git-svn died of signal 13

So you are probably running into something else. I only mention this for context.

Does svnsync work for making a local copy of whatever subset of the repository is relevant? Alternatively (this is basically the same), is the network connection stable enough for e.g. svnrdump[3] to get a dump?

Sorry for the trouble, and hope that helps, Jonathan

[1] http://thread.gmane.org/gmane.comp.version-control.git/134936/focus=134940 [2] Maybe it deserves a note in the manpage. [3] http://repo.or.cz/w/svnrdump.git

Steven Line· Jan 12, 2012, 18:25 UTC · re: Jonathan Nieder · lore

Re: git svn clone terminating prematurely (I think)

Thank you Jonathan.

I had a breakthrough yesterday on this problem. To make a long story short my ssh connection to the server where I was running 'nohup git svn clone' was timing out. Additionally the nohup I was using wasn't really protecting the git svn clone process so an hour or two after the ssh disconnected, the git would terminate leaving me with an imcomplete repository. I don't understand why the nohup wasn't working yet. So my problem wasn't due to git itself.

I started my most recent git svn clone and it's now been running for 18 hours. I'm optimistic that I've solved the problem. If my git does terminate early then I'll try a 'git svn fetch' to complete the clone, based on what you said in your post.

-- 
Steven Line
303-910-1212
sline00@gmail.com
Steven Michalske· Jan 13, 2012, 07:10 UTC · re: Steven Line · lore

Re: git svn clone terminating prematurely (I think)

Steven, 

In this case nohup seems like a pain. There is a utility called "screen" available on most unixes. It allows you to create a virtual terminal that you can detach from. After you detach you can log out, some time later log back in and then reattach.

Steve
On Jan 12, 2012, at 10:25 AM, Steven Line wrote:
Show 23 quoted lines
> Thank you Jonathan.
> 
> I had a breakthrough yesterday on this problem.  To make a long story
> short my ssh connection to the server where I was running 'nohup git
> svn clone' was timing out.  Additionally the nohup I was using wasn't
> really protecting the git svn clone process so an hour or two after
> the ssh disconnected, the git would terminate leaving me with an
> imcomplete repository.  I don't understand why the nohup wasn't
> working yet.  So my problem wasn't due to git itself.
> 
> I started my most recent git svn clone and it's now been running for
> 18 hours.  I'm optimistic that I've solved the problem.  If my git
> does terminate early then I'll try a 'git svn fetch' to complete the
> clone, based on what you said in your post.
> 
> -- 
> Steven Line
> 303-910-1212
> sline00@gmail.com
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

← back to recent threads