Friday, January 11, 2008

How to deal with the svn Checksum mismatch

I have this bad habbit to forget that I work in an svn environment and sometimes remove-copy-edit-trash-and-whatever files and folders by hand.
In an eclipse plugin environment (and not only) this can lead to great problems because of the lost sync between the local and remote repositories.
The result is something like:

commit -m "" /home/moovida/rcpdevelopment/WORKSPACES/jgrassudig33workspace/eu.hydrologis.jgrass.charting.jfreechart.libs/META-INF/MANIFEST.MF
Sending /home/moovida/rcpdevelopment/WORKSPACES/jgrassudig33workspace/eu.hydrologis.jgrass.charting.jfreechart.libs/META-INF/MANIFEST.MF
Transmitting file data ...
svn: Commit failed (details follow):
svn: Commit failed (details follow):
svn: Checksum mismatch for '/home/moovida/rcpdevelopment/WORKSPACES/jgrassudig33workspace/eu.hydrologis.jgrass.charting.jfreechart.libs/META-INF/MANIFEST.MF'; expected: 'e59ba98152ab43ed640cdf076b0cdc51', actual: '0fad1171d44dba8be24547671ef6b510'


Well, after trying to replace the local file with the remote one a couple of times:

revert -N /home/moovida/rcpdevelopment/WORKSPACES/jgrassudig33workspace/eu.hydrologis.jgrass.charting.jfreechart.libs/META-INF/MANIFEST.MF
Reverted /home/moovida/rcpdevelopment/WORKSPACES/jgrassudig33workspace/eu.hydrologis.jgrass.charting.jfreechart.libs/META-INF/MANIFEST.MF


The problem wasn't fixed yet.
The real problem is in those nice hidden svn-something files in every folder. They keep track of everything that happens.

So the deal is to remove the folder containing the corrupted file and update again.
At that point do your changes and commit. It will do so.
Post a Comment