-1

I have a problem with SVN that I just cannot figure out. Whenever I try to commit the following block of C# code to my SVN remote repo, I am getting a CheckSum mismatch error.
Notice that the entire block of code is commented out.
The file only contains the commented out code displayed below. There is NOTHING else in the file.


The Code


/* private void CreateSvnInfoFile()
    {
        try
        {
            SvnInfoEventArgs svnInfo;
            using (SvnClient client = new SvnClient())
            {
                client.GetInfo(solutionDir, out svnInfo);
            }

            FileInfo svnOut = new FileInfo(this.targetDir + Path.DirectorySeparatorChar + "SvnInfo.xml");
            if (svnOut.Exists)
                svnOut.Delete();

            File.WriteAllLines(svnOut.FullName, new List<string>()
                {
                    "<SvnInfo>",
                    "    <Path>" + svnInfo.Uri.ToString() + "</Path>",
                    "    <Revision>" + svnInfo.Revision.ToString() + "</Revision>",
                    "</SvnInfo>"
                }.ToArray());
        }
        catch (Exception e)
        {
            Console.WriteLine(e);
        }
    } */

The Error


enter image description here


enter image description here


To test this, here are the steps I followed:

  1. In my local dir, I created .cs file named "BLEEPBLOOP.cs" with nothing in the file.
  2. Using TortoiseSVN, I right-clicked the file and selected "Add"
  3. Using TortoiseSVN, I right-clicked the file and selected "Commit"
  4. The file is now visible up in the SVN Remote Repo.
  5. I opened my local copy of BLEEPBLOOP.cs and copy/pasted the above code-block into the file.
  6. Saved the file.
  7. Using TortoiseSVN, I right-clicked the file and selected "Commit"
  8. The error message is then displayed.

How is this possible?

Thanks for reading!

Bert Huijben
  • 19,525
  • 4
  • 57
  • 73
Chiefwarpaint
  • 643
  • 2
  • 12
  • 25
  • Are other files OK? You might have hidden/illegal characters in the text. You could try opening it with notepad and then doing a "Save As..." with a specific encoding (like ANSI). – Steve Wellens Dec 19 '14 at 17:42
  • @SteveWellens Yes, all the other files are ok. I went ahead and tried the suggestion of doing a SAVE AS with ANSI encoding, but get the same results. – Chiefwarpaint Dec 19 '14 at 17:46
  • Is there any significance to the fact that TortoiseSVN is talking about BLEEP_BLOOP.cs while AnhkSVN is talking about Executor.cs? (Or is the latter just a screenshot of the real error before you tried to reproduce it with BLEEP_BLOOP.cs?) Also is there any significance to the difference between BLEEP_BLOOP and BLEEPBLOOP? – adv12 Dec 19 '14 at 17:56
  • Oh, also, any chance this could be due to an SVN version mismatch between Tortoise and Ankh? – adv12 Dec 19 '14 at 18:04
  • @adv12 Sorry. You're correct. The latter screenshot is of the original error. The other screenshot is from me reproducing the problem using BLEEP_BLOOP.cs. There's no significance to the name BLEEP_BLOOP. I just threw in some random name so it would stick out from everything else. – Chiefwarpaint Dec 19 '14 at 18:15
  • Subversion doesn't modify the contents of your commit. Do you have any hook scripts on the server? How about antivirus? – alroc Dec 19 '14 at 18:37

1 Answers1

1

When you get a checksum error, the problem is not that the in-workingcopy version of that file is corrupted... but its pristine version. (You are allowed to change your working copy file ;-))

Somehow the data stored in your working copy as something like .svn/pristine/AA/AABBCCDDEE00112233445566....svn-base is different than the one that Subversion expected to be there.

Did you accidentally run a search and replace over that directory? (That is the most likely cause for this problem)

Bert Huijben
  • 19,525
  • 4
  • 57
  • 73
  • Bert- That's the weird thing about this. I can create a brand new local file with the above code. No file with that name exists in SVN. I commit the new file up to SVN and it says there's a checksum error. How can there be a checksum error, if the comparison file doesn't even exist in SVN? – Chiefwarpaint Dec 21 '14 at 02:27
  • Wonder why I got the down-vote on this post? Pretty sure I provided more than enough documentation of exactly what I did. Included multiple visual examples. It was very detailed. Guess someone figured it wasn't quite enough..... – Chiefwarpaint Jan 19 '15 at 19:09