I'm a novice at Git, so bear with me even if the answer is obvious to
experienced users, please :)
I recently tried to clone an existing (very big) SVN repo by using
"git svn clone <repo> -s", and by mistake I pressed Ctrl-C after the
clone operation had been running for ~16 hours. When trying to
re-issue the clone, I got the error message "Incomplete data: Delta
source ended unexpectedly at /home/erifay01/libexec/git-core/git-svn
line 4249" after git-svn fetching another 8 or so revisions. Now, I
realize I shouldn't have done this, but I'd still prefer avoiding to
have to re-do it all.
I already tried re-building the svn metadata by moving away ".git/svn"
and re-issuing the clone command, but no luck. It quickly re-builds
everything up to the revision that git-svn broke at, but fails with
the same error message.
Now, I'm wondering if there's any way of going back to the state
before I pressed Ctrl-C, so I can rebuild from there. I know what
revision I terminated at, and I have the corresponding SHA.
--
Erik "kusma" Faye-Lund
kusmabite@gmail.com
(+47) 986 59 656
Erik Faye-Lund wrote:
I recently tried to clone an existing (very big) SVN repo by using
"git svn clone <repo> -s", and by mistake I pressed Ctrl-C after the
clone operation had been running for ~16 hours. When trying to
re-issue the clone, I got the error message "Incomplete data: Delta
source ended unexpectedly at /home/erifay01/libexec/git-core/git-svn
line 4249" after git-svn fetching another 8 or so revisions. Now, I
realize I shouldn't have done this, but I'd still prefer avoiding to
have to re-do it all.
[...]
Now, I'm wondering if there's any way of going back to the state
before I pressed Ctrl-C, so I can rebuild from there. I know what
revision I terminated at, and I have the corresponding SHA.
Some ideas:
First you can try to reset the git-svn head to the SHA of the commit
before (in case the one it stopped at ended up being corrupted). For
example, if $stopped is the commit you interrupted it at,
git update-ref refs/remotes/git-svn $stopped^
Adjust the ref name if you used a trunk/branches layout. Then remove
the .git/svn/ cache and try again.
Failing that, you could test if this also happens when only looking at
a few surrounding revisions, for example if the failure was around
revision 100:
mkdir ../new-test
cd ../new-test
git svn init <args you gave to the other git svn init/clone>
git svn fetch -r 95:105
--
Thomas Rast
trast@{inf,student}.ethz.ch
On Feb 10, 2009 2:42pm, Thomas Rast [off-list ref] wrote:
Some ideas:
First you can try to reset the git-svn head to the SHA of the commit
before (in case the one it stopped at ended up being corrupted). For
example, if $stopped is the commit you interrupted it at,
git update-ref refs/remotes/git-svn $stopped^
Adjust the ref name if you used a trunk/branches layout. Then remove
the .git/svn/ cache and try again.
Thanks for the suggestion.
I'm not entirely sure what you mean by "Adjust the ref name if you
used a trunk/branches layout." - in what way do I need to adjust it?
Would something like "refs/remotes/trunk/git-svn" be right? At least
that ref corresponds with a file relative to the .git-folder.
Yes, I use a trunk/branches-layout... but I'm fetching a branch that
has been moved (multiple times), so git-svn seems to try to fetch
something called "trunk@54516"... perhaps the "@ 54516"
Anyway, I tried doing the following:
git update-ref refs/remotes/trunk/git-svn <SHA1 of old revision>
rm .git/svn
git svn fetch
git then outputs something like this:
r<some rev> = <some SHA1>
r<some rev> = <some SHA1>
...lots and lots of these...
r<some rev> = <some SHA1>
r<old revision> = <SHA1 of old revision>
r<some rev> = <some SHA1>
r<some rev> = <some SHA1>
...some more lines...
r<some rev> = <some SHA1>
Done rebuilding .git/svn/trunk@<some revision>/.rev_map.<some SHA1>
Incomplete data: Delta source ended unexpectedly at /home/erifay01/
libexec/git-core/git-svn line 4249
This is basically the same thing I'm getting if I just delete the .git/
svn-folder and re-fetch. For the record, I decided to roll-back about
10 more revisions than where I terminated, just to be sure.
Failing that, you could test if this also happens when only looking at
a few surrounding revisions, for example if the failure was around
revision 100:
mkdir ../new-test
cd ../new-test
git svn init <args you gave to the other git svn init/clone>
git svn fetch -r 95:105
This turns out to be a bit more tricky than I expected. You see, the
project has moved inside the repo multiple times during it's life-
time, and the revision where I broke the fetching is at an old
location.
So I tried fetching if from old location:
git svn init <old path> -s .
git svn fetch -r <old revision - 100>:<old revision + 100>
Doing the fetch outputs nothing (git svn init outputs "the usual
stuff", though). Trying to do the same thing with the new path (same
as above, but with <old path> set to the path of the new location)
gives the following output:
Path '<old path>' was probably deleted:
Filesystem has no item: REPORT request failed on '<new path>/!svn/bc/
<last rev>':
File not found: revision <last rev>, path '<old path>'
Will attempt to follow revisions r<old revision - 100> .. r<old
revision + 100> committed before the deletion
... And then nothing.
So, I'm still quite lost here. It might be that a full re-clone is
what is needed.
On Tue, Feb 10, 2009 at 02:42:29PM +0100, Thomas Rast wrote:
Failing that, you could test if this also happens when only looking at
a few surrounding revisions, for example if the failure was around
revision 100:
Usually this happens to me due to server closing my connection and/or
starting ignoring me.
A full clone for some projects takes too much time and bandwidth...
Regards,
Luciano Rocha
--
Luciano Rocha [off-list ref]
Eurotux Informática, S.A. <http://www.eurotux.com/>