svncheckoutco

What causes the SVN error "Revision xxx doesn't match existing revision yyy..."


I'm using a recent version of SVN to check out some files (using 'svn co URL DEST'). When I do this, I get an error that says "svn: E155000: Revision 11134260 doesn't match existing revision 11075284 in DEST". However, if I use a 2011 version of SVN, I don't get this error (i.e. the checkout works just fine). Can someone explain what this error message means so that I can better figure out how to fix the problem?

I've tried searching here on stackoverflow, as well as a Google search and the SVN documentation, and only came up with information related to doing a merge, but nothing that discusses this issue on a checkout. Of course since I don't fully understand the problem, I may not be looking for the right things.

The SVN version that works is: svn, version 1.6.17 (r1128011) compiled Jun 2 2011, 23:35:08

And the SVN version that is failing is: svn, version 1.11.1 (r1850623) compiled Jan 9 2019, 19:28:50 on x86-microsoft-windows


Solution

  • This error is due to the differences between SVN versions 1.6 and prior, and 1.7 and later. In 1.6 and prior, each sub-directory that was part of the SVN repository had its own .svn folder. Starting in 1.7, there is a single .svn folder located at the root of the working copy. In our system, part of the directory structure that is contained in our main repository is

    root_dir/sub_dir_a

    So, when I check out root_dir, I get sub_dir_a as a subdirectory. Through the evolution of our build system and repository, sub_dir_a became useful for other projects besides root_dir, and was (erroneously) copied to a separate repository (let's call it copy_of_sub_dir_a), and the build system changed to a) check out root_dir, b) remove sub_dir_a, and then c) checkout copy_of_sub_dir_a into root_dir/sub_dir_a. In SVN 1.6 and earlier, this would work fine because root_dir only contained the information for root_dir. Starting in 1.7, root_dir has a .svn folder that also contains information for sub_dir_a, so when our build system tried to checkout copy_of_sub_dir_a, SVN throws an error indicating that the revision (of copy_of_sub_dir_a) does not match what root_dir says it should be. The correct fix for this issue is to NOT have sub_dir_a as part of the root_dir repository - it should have been deleted/moved instead of copied.