Incomplete data: Delta source ended unexpectedly while git svn fetch

三世轮回 提交于 2019-12-11 02:34:34

问题


I have cloned my svn repo into git and everyday i am doing git svn fetch (i only do changes in SVN) but i am planning to move to git and i keep the git repo in sync for the day since the svn clone tooke me 2 weeks (yeah it's a big repo).

Anyway the git svn fetch has worked fine every day until 2 days ago where i now get

Incomplete data: Delta source ended unexpectedly at /usr/lib/perl5/site_perl/Git/SVN/Ra.pm line 290

at a specific revision. I tried the different suggestions online about git svn reset and going back some revisions and i went about 20 revisions back with no luck. I also tried to run :

git config --get core.autocrlf

which gave true.

I know that the svn repo is working good, i have no issues doing svn up.

Any ideas how i can get back on track to sync again ? I am stuck without ideas what to try.

I might reveal one issue. I don't recall but before running the issue i might have had a disk full on the disk where the repo is when i tried the fetch. Maybe that destroyed something ?

/donnib


回答1:


  1. Make sure there are no additional git/perl processes running (which could create the index.lock file and mess up the current fetch). Kill'em all.
  2. Delete the ...\my_repository.git\.git\svn\refs\remotes\trunk\index.lock file
  3. git svn reset -r SomeSVNRevisionNumberBeforeTheProblematicOne
  4. git svn fetch

Fetch should continue from the SomeSVNRevisionNumberBeforeTheProblematicOne.

The most probable reason why this happened is concurrency between two git instances running simultaneously on the same repository.




回答2:


Using --ignore-paths sometimes helps, so the steps are:

  1. git svn reset -r <svn-version-before-error>
  2. git svn fetch --ignore-paths=/branches/badbranch



回答3:


I resolved similar problem using -r param. My case was as follow:

  • I created /branches/dev branch in SVN at particular revision, eg 1000 and started using it
  • all previous revision were made to /trunk
  • I started master branch migration with git svn clone, which got all svn /trunk to git master
  • then I've added another fetch config for my svn development branch and resumed the svn fetch
# .git/config
[svn-remote "svn"]
    url = http://some-repo/path
    fetch = /trunk:refs/remotes/trunk
    fetch = branches/dev:refs/remotes/dev
  • git svn fetch complained at revision 999, which belong to /trunk and has been already migrated to git master (Incomplete data: Delta source ended unexpectedly at /usr/lib/perl5/site_perl/Git/SVN/Ra.pm line 312)
  • notice error refers to line 312, which might be related to different problem than line 290 referred in this ticket?
  • then I run git svn fetch -r 1000:HEAD, which allowed me to migrate all revisions of /branches/dev excluding revisions before creating /branches/dev


来源:https://stackoverflow.com/questions/21334923/incomplete-data-delta-source-ended-unexpectedly-while-git-svn-fetch

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!