Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
HOWTO Recover from a bad git-svn dcommit when something barfs
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  1 message - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
davetron5000  
View profile  
 More options Sep 17 2008, 9:28 am
From: davetron5000 <davetron5...@gmail.com>
Date: Wed, 17 Sep 2008 06:28:50 -0700 (PDT)
Local: Wed, Sep 17 2008 9:28 am
Subject: HOWTO Recover from a bad git-svn dcommit when something barfs
I just did a an import from my git repo as per
http://code.google.com/p/support/wiki/ImportingFromGit and it was
quite painful.  All steps complete normally, save for the final git-
svn dcommit

It goes along and gets either the "Bad Gateway", or a seg fault, or a
bus error.  This leaves the working dir in a weird state where you
pretty much can't continue and can't do anything.  I use git-svn all
the time for work and this never happens, so it seems like a problem
on Google's end and hopefully they are watching.

How To Recover:

First, open .git/logs/HEAD

Find the hash of the commit that's the head of your git repo.
Hopefully you remember the commit message and can figure it out, but
it should be pretty obvious

Back in your now f-ed up working-dir:

git reset --hard <hash from log>

This gets your working dir back to where it was before you did a git-
svn dcommit.  Then:

git-svn rebase
git-svn dcommit

This will likely fail again and you'll have to repeat the entire
process.  My repo had 60 or so commits, and I had to repeat the "reset
--hard, rebase, dcommit" process several times before it finally
finished.  The good news is that it DOES pick up where it left off, so
you will eventually  complete the import.

Hope this helps someone.

Version info:

OS X 10.5.4
git 1.5.4.5
svn 1.4.4

Dave


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »