git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* git-svn: incomplete data after terminated "git svn clone"
@ 2009-02-10 11:50 Erik Faye-Lund
  2009-02-10 13:42 ` Thomas Rast
  0 siblings, 1 reply; 4+ messages in thread
From: Erik Faye-Lund @ 2009-02-10 11:50 UTC (permalink / raw
  To: git

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: git-svn: incomplete data after terminated "git svn clone"
  2009-02-10 11:50 git-svn: incomplete data after terminated "git svn clone" Erik Faye-Lund
@ 2009-02-10 13:42 ` Thomas Rast
  2009-02-10 15:01   ` Erik Faye-Lund
  2009-02-10 15:10   ` Luciano Miguel Ferreira Rocha
  0 siblings, 2 replies; 4+ messages in thread
From: Thomas Rast @ 2009-02-10 13:42 UTC (permalink / raw
  To: Erik Faye-Lund; +Cc: git

[-- Attachment #1: Type: text/plain, Size: 1464 bytes --]

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

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: git-svn: incomplete data after terminated "git svn clone"
  2009-02-10 13:42 ` Thomas Rast
@ 2009-02-10 15:01   ` Erik Faye-Lund
  2009-02-10 15:10   ` Luciano Miguel Ferreira Rocha
  1 sibling, 0 replies; 4+ messages in thread
From: Erik Faye-Lund @ 2009-02-10 15:01 UTC (permalink / raw
  To: git

On Feb 10, 2009 2:42pm, Thomas Rast <trast@student.ethz.ch> 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.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: git-svn: incomplete data after terminated "git svn clone"
  2009-02-10 13:42 ` Thomas Rast
  2009-02-10 15:01   ` Erik Faye-Lund
@ 2009-02-10 15:10   ` Luciano Miguel Ferreira Rocha
  1 sibling, 0 replies; 4+ messages in thread
From: Luciano Miguel Ferreira Rocha @ 2009-02-10 15:10 UTC (permalink / raw
  To: Thomas Rast; +Cc: Erik Faye-Lund, git

[-- Attachment #1: Type: text/plain, Size: 514 bytes --]

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 <luciano@eurotux.com>
Eurotux Informática, S.A. <http://www.eurotux.com/>

[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-02-10 15:12 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-10 11:50 git-svn: incomplete data after terminated "git svn clone" Erik Faye-Lund
2009-02-10 13:42 ` Thomas Rast
2009-02-10 15:01   ` Erik Faye-Lund
2009-02-10 15:10   ` Luciano Miguel Ferreira Rocha

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).