git svn checksum mismatch

December 17th, 2010

When I update suuuuuper old Chromium repositories, I occasionally get that stupid Checksum mismatch from svn. It happens often enough that it's a thing, but uncommonly enough that I forget how to fix it each time. So, FOR PROSPERITY:

Checksum mismatch: trunk/src/chrome/test/functional/search_engines.py 5d1082dfc3e6363ece792d7cd49fde0a7ce9c6df
expected: e88e3ea6349cb44955d58e6a3964824f
got: af58cced63097504e4bfb6574c252f4a

Then proooobably what happens was search_engines.py downloaded wonky or something such that the hash no longer came to be the correct thing. So solution:

See what was the revision number of the last change on the file:

git svn log chrome/test/functional/search_engines.py

Reset svn to be closest parent before that revision:

git svn reset -r62248 -p

Do a git svn fetch!

git svn fetch

Dance at your success.

12 comments

  1. Thank you SO MUCH. There are tons of threads on Google promising solutions, but nothing has worked. This not only works, but has a feasible explanation of what's gone wrong and a solution that actually makes sense.

    Linking to you from StackOverflow here: http://stackoverflow.com/a/8418829/3191

  2. Matt says:

    +1 for a great solution. This is the only thing that's worked for me as well, just like Domenic stated. Big thanks :-D

  3. Ali says:

    I got the following error once i ran the command you mentioned.

    # git svn fetch
    Checksum mismatch: xxx/yyy/zzz.java 091f277343646871f019a159af895ed5943ce0fc
    expected: 5fad939c76344afa9fa088fa843aba5e
    got: 8bc1f834ffce935fa67cc5cde94a9e14

    # git svn log xxx/yyy/zzz.java
    fatal: bad revision 'HEAD'
    rev-list –first-parent –pretty=medium HEAD –: command returned error: 128

  4. Ganesh says:

    Yes I am also getting same error.

    git svn log xxx/yyy/zzz.java
    fatal: bad revision 'HEAD'
    rev-list –first-parent –pretty=medium HEAD –: command returned error: 128

  5. Gus says:

    Dancin' :mininote: :-D :shing1: :thumbup:

    Thanks a bunch!

  6. dgdgd says:

    fatal: bad revision 'HEAD'
    rev-list –first-parent –pretty=medium HEAD –: command returned error: 128

  7. MS was here says:

    Thank you for the explanation. It prompted me to realize that I didn't "actually" care about the revision (since it was my mistake) so I did –ignore-path and started fetching again. (And no one is going to know. mwahahaha)

  8. R says:

    Getting the same error :(

    fatal: bad revision 'HEAD'
    rev-list –first-parent –pretty=medium HEAD –: command returned error: 128

    Does someone have a solution???

  9. Chris Helms says:

    In case anyone else comes into this problem, you need to include the metadata to use the solution. If you used the tag –no-metadata, you will not be able to reset the revision.

  10. Chris Helms says:

    Also, if nothing else works, you can skip the revision by running:

    git svn fetch -r:HEAD

    This will skip the bad revision & you can carry on with the conversion.

  11. Chris Helms says:

    The command is git svn fetch -r1234:HEAD where 1234 is the revision after the one causing the problem. I don't know why the last comment didn't show that.

Leave a Reply

Your email address will not be published. Required fields are marked *

:-) :-D ;-) :-P :-( :-| :miniheart: :mininote: :minisweat1: :minisweat2: :minimad1: :minimad2: :minidread: :shing1: :shing2: :thumbup: :thumbdown: :girlnormal: :girlhappy: :girlblank: :girlsad: :girlpout: :girlconf: :girleh: :girlmad: :heart: :note: :sweat: :...: :happy: :sad: :flower: :sun: :lightening: :cloud: :partcloud: :snow: :pencil: :coffee: :food: