2

The git svn fetch throws the checksum mismatch error.

Checksum mismatch: pathto/web.xml bee95da33774b2dd11bf5430edfd7a315
expected: 018eb065a44eda65b848aksefhksdhf
     got: 2ae75279246a5602c058df8sdfsdkfs

I have referred the git-svn-checksum-mismatch and the similar SO post git-svn-rebase-checksum-mismatch and tried the provided solution. It doesn't resolve my problem.

When I execute the log and reset command, I am getting the below error.

git svn log pathto/web.xml
git svn reset -r5000 -p

fatal: ambiguous argument 'HEAD': unknown revision or path not in the working tree. Use '--' to separate paths from revisions, like this: 'git [...] -- [...]' rev-list --first-parent --pretty=medium HEAD: command returned error: 128

I am aware that this is very old version. We are using this old version for some other reason.

git version 1.8.3.1

Community
  • 1
  • 1
notionquest
  • 37,595
  • 6
  • 111
  • 105
  • Possible duplicate of [How can I recover after a checksum mismatch with 'git svn clone'?](http://stackoverflow.com/questions/25402907/how-can-i-recover-after-a-checksum-mismatch-with-git-svn-clone) – ninjalj Feb 20 '17 at 17:55

2 Answers2

1

Got the same failure while synchronizing a repository with a recent new branch named 'cpa', and was stuck on a certain revision of this branch whith errors such as 'checksum mismatch' or 'index mismatch', unsuccessfully trying git svn reset etc.

Finally I solved the problem by deleting all the refs of the failing branch, so that the next git svn fetch has refetched and rebuild the whole branch. It was a little bit brutal :

$ locate /cpa | grep /.git/
/pathrepo/.git/logs/refs/remotes/cpa@10343
/pathrepo/.git/refs/remotes/cpa@10343
/pathrepo/.git/svn/refs/remotes/cpa
/pathrepo/.git/svn/refs/remotes/cpa@10343

Verify that it is plausible and safe, then do :

$ locate /cpa | grep /.git/ | xargs rm -rf
$ git svn fetch

As I expected, git svn fetch has resync'd the exact tree, successfully this time.

0

I had the same problem. It indicates that your svn repository is corrupted and you need to dump and load your svn repository to continue. I have written an extensive answer about this issue, hope it will be helpful.

Community
  • 1
  • 1
bekce
  • 3,782
  • 29
  • 30