{"thread":{"id":"17694","subject":"git-svn: incomplete data after terminated \"git svn clone\"","startedAt":"2009-02-10T11:50:36Z","lastAt":"2009-02-10T15:10:48Z","messageCount":4,"participants":["Erik Faye-Lund","Thomas Rast","Luciano Miguel Ferreira Rocha"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"103984","messageId":"40aa078e0902100350m2d885516o853b1ec56eb43ce1@mail.gmail.com","threadId":"17694","inReplyTo":null,"subject":"git-svn: incomplete data after terminated \"git svn clone\"","fromName":"Erik Faye-Lund","fromEmail":"kusmabite@googlemail.com","sentAt":"2009-02-10T11:50:36Z","receivedAt":"2009-02-10T11:50:36Z","isPatch":false,"sender":{"key":"kusmabite@gmail.com","avatar":"https://avatars.githubusercontent.com/u/47073?v=4"},"body":"I'm a novice at Git, so bear with me even if the answer is obvious to\nexperienced users, please :)\n\nI recently tried to clone an existing (very big) SVN repo by using\n\"git svn clone <repo> -s\", and by mistake I pressed Ctrl-C after the\nclone operation had been running for ~16 hours. When trying to\nre-issue the clone, I got the error message \"Incomplete data: Delta\nsource ended unexpectedly at /home/erifay01/libexec/git-core/git-svn\nline 4249\" after git-svn fetching another 8 or so revisions. Now, I\nrealize I shouldn't have done this, but I'd still prefer avoiding to\nhave to re-do it all.\n\nI already tried re-building the svn metadata by moving away \".git/svn\"\nand re-issuing the clone command, but no luck. It quickly re-builds\neverything up to the revision that git-svn broke at, but fails with\nthe same error message.\n\nNow, I'm wondering if there's any way of going back to the state\nbefore I pressed Ctrl-C, so I can rebuild from there. I know what\nrevision I terminated at, and I have the corresponding SHA.\n\n--\nErik \"kusma\" Faye-Lund\nkusmabite@gmail.com\n(+47) 986 59 656\n"},{"id":"104007","messageId":"200902101442.32772.trast@student.ethz.ch","threadId":"17694","inReplyTo":"40aa078e0902100350m2d885516o853b1ec56eb43ce1@mail.gmail.com","subject":"Re: git-svn: incomplete data after terminated \"git svn clone\"","fromName":"Thomas Rast","fromEmail":"trast@student.ethz.ch","sentAt":"2009-02-10T13:42:29Z","receivedAt":"2009-02-10T13:42:29Z","isPatch":false,"sender":{"key":"tr@thomasrast.ch","avatar":"https://avatars.githubusercontent.com/u/153510?v=4"},"body":"Erik Faye-Lund wrote:\n> I recently tried to clone an existing (very big) SVN repo by using\n> \"git svn clone <repo> -s\", and by mistake I pressed Ctrl-C after the\n> clone operation had been running for ~16 hours. When trying to\n> re-issue the clone, I got the error message \"Incomplete data: Delta\n> source ended unexpectedly at /home/erifay01/libexec/git-core/git-svn\n> line 4249\" after git-svn fetching another 8 or so revisions. Now, I\n> realize I shouldn't have done this, but I'd still prefer avoiding to\n> have to re-do it all.\n[...]\n> Now, I'm wondering if there's any way of going back to the state\n> before I pressed Ctrl-C, so I can rebuild from there. I know what\n> revision I terminated at, and I have the corresponding SHA.\n\nSome ideas:\n\nFirst you can try to reset the git-svn head to the SHA of the commit\nbefore (in case the one it stopped at ended up being corrupted).  For\nexample, if $stopped is the commit you interrupted it at,\n\n  git update-ref refs/remotes/git-svn $stopped^\n\nAdjust the ref name if you used a trunk/branches layout.  Then remove\nthe .git/svn/ cache and try again.\n\nFailing that, you could test if this also happens when only looking at\na few surrounding revisions, for example if the failure was around\nrevision 100:\n\n  mkdir ../new-test\n  cd ../new-test\n  git svn init <args you gave to the other git svn init/clone>\n  git svn fetch -r 95:105\n\n-- \nThomas Rast\ntrast@{inf,student}.ethz.ch\n"},{"id":"104019","messageId":"ec54bf47-c1a8-4d5e-a950-30303f1f9198@v15g2000yqn.googlegroups.com","threadId":"17694","inReplyTo":"200902101442.32772.trast@student.ethz.ch","subject":"Re: git-svn: incomplete data after terminated \"git svn clone\"","fromName":"Erik Faye-Lund","fromEmail":"kusmabite@googlemail.com","sentAt":"2009-02-10T15:01:05Z","receivedAt":"2009-02-10T15:01:05Z","isPatch":false,"sender":{"key":"kusmabite@gmail.com","avatar":"https://avatars.githubusercontent.com/u/47073?v=4"},"body":"On Feb 10, 2009 2:42pm, Thomas Rast <trast@student.ethz.ch> wrote:\n> Some ideas:\n>\n> First you can try to reset the git-svn head to the SHA of the commit\n> before (in case the one it stopped at ended up being corrupted).  For\n> example, if $stopped is the commit you interrupted it at,\n>\n>  git update-ref refs/remotes/git-svn $stopped^\n>\n> Adjust the ref name if you used a trunk/branches layout.  Then remove\n> the .git/svn/ cache and try again.\n\n\nThanks for the suggestion.\n\nI'm not entirely sure what you mean by \"Adjust the ref name if you\nused a trunk/branches layout.\" - in what way do I need to adjust it?\nWould something like \"refs/remotes/trunk/git-svn\" be right? At least\nthat ref corresponds with a file relative to the .git-folder.\n\nYes, I use a trunk/branches-layout... but I'm fetching a branch that\nhas been moved (multiple times), so git-svn seems to try to fetch\nsomething called \"trunk@54516\"... perhaps the \"@ 54516\"\n\nAnyway, I tried doing the following:\n\ngit update-ref refs/remotes/trunk/git-svn <SHA1 of old revision>\nrm .git/svn\ngit svn fetch\n\ngit then outputs something like this:\n\nr<some rev> = <some SHA1>\nr<some rev> = <some SHA1>\n...lots and lots of these...\nr<some rev> = <some SHA1>\nr<old revision> = <SHA1 of old revision>\nr<some rev> = <some SHA1>\nr<some rev> = <some SHA1>\n...some more lines...\nr<some rev> = <some SHA1>\nDone rebuilding .git/svn/trunk@<some revision>/.rev_map.<some SHA1>\nIncomplete data: Delta source ended unexpectedly at /home/erifay01/\nlibexec/git-core/git-svn line 4249\n\nThis is basically the same thing I'm getting if I just delete the .git/\nsvn-folder and re-fetch. For the record, I decided to roll-back about\n10 more revisions than where I terminated, just to be sure.\n\n\n> Failing that, you could test if this also happens when only looking at\n> a few surrounding revisions, for example if the failure was around\n> revision 100:\n>\n>  mkdir ../new-test\n>  cd ../new-test\n>  git svn init <args you gave to the other git svn init/clone>\n>  git svn fetch -r 95:105\n\nThis turns out to be a bit more tricky than I expected. You see, the\nproject has moved inside the repo multiple times during it's life-\ntime, and the revision where I broke the fetching is at an old\nlocation.\n\nSo I tried fetching if from old location:\ngit svn init <old path> -s .\ngit svn fetch -r <old revision - 100>:<old revision + 100>\n\nDoing the fetch outputs nothing (git svn init outputs \"the usual\nstuff\", though). Trying to do the same thing with the new path (same\nas above, but with <old path> set to the path of the new location)\ngives the following output:\n\nPath '<old path>' was probably deleted:\nFilesystem has no item: REPORT request failed on '<new path>/!svn/bc/\n<last rev>':\nFile not found: revision <last rev>, path '<old path>'\n\nWill attempt to follow revisions r<old revision - 100> .. r<old\nrevision + 100> committed before the deletion\n\n... And then nothing.\n\nSo, I'm still quite lost here. It might be that a full re-clone is\nwhat is needed.\n"},{"id":"104020","messageId":"20090210151048.GA27171@bit.office.eurotux.com","threadId":"17694","inReplyTo":"200902101442.32772.trast@student.ethz.ch","subject":"Re: git-svn: incomplete data after terminated \"git svn clone\"","fromName":"Luciano Miguel Ferreira Rocha","fromEmail":"luciano@eurotux.com","sentAt":"2009-02-10T15:10:48Z","receivedAt":"2009-02-10T15:10:48Z","isPatch":false,"sender":{"key":"luciano@eurotux.com","avatar":null},"body":"On Tue, Feb 10, 2009 at 02:42:29PM +0100, Thomas Rast wrote:\n> Failing that, you could test if this also happens when only looking at\n> a few surrounding revisions, for example if the failure was around\n> revision 100:\n\nUsually this happens to me due to server closing my connection and/or\nstarting ignoring me.\n\nA full clone for some projects takes too much time and bandwidth...\n\nRegards,\nLuciano Rocha\n\n-- \nLuciano Rocha <luciano@eurotux.com>\nEurotux Informática, S.A. <http://www.eurotux.com/>\n"}]}