25 Jun 2008

After running through a lot of merges last night (I was incrementally going through several changesets to see where I'd introduced an interesting regression) and updating to the HEAD revision and fixing the bug, I got the following error message while trying to commit:

svn: Commit failed (details follow):
svn: Your file or directory 'paypal.py' is probably out-of-date
svn: The version resource does not correspond to the resource within the transaction.  Either the requested version resource is out of date (needs to be updated), or the requested version resource is newer than the transaction root (restart the commit).

A svn up didn't fix the issue and neither did running svn clean.

The file in question is in a folder called /lib so in the end, I fixed it by deleting that folder (rm -rf lib) and then running svn up to restore the folder from the HEAD revision.

The only other advice I found about this on the net suggests that you delete the all-wcprops file in your .svn folder but I personally think that that's a Bad Idea (tm) as you don't want to go messing inside your .svn folders and corrupt your working copy.

Creative Commons LicenseThe SVN commit failed error article by Aral Balkan, unless otherwise expressly stated, is licensed under a Creative Commons Attribution-Noncommercial 2.0 UK: England License.

Add Your Comment

Spam Protection by WP-SpamFree

SVN commit failed error

  1. I often have this message with Subclipse in Eclipse when moving folder and changing names or deleting files in the recently moved folder. I just have to follow the message, update my working copy from the repository (even if i know that nothing have changed) and commit then.

    Tek
  2. What about doing an SVN Replace of your file with the “latest from repository”?

    Brajeshwar
  3. SVN sucks! All these versioning software systems suck. Who had the bright idea of embedding hidden folders for tracking. *shudder* Just asking for nightmares to happen. I would really like to see a system that utilized a database to track file changes and could monitor edits, etc. Heck, do not most virus software programs do this?

    SVN is a four letter word – the “F” is silent.

    Jason The Saj
  4. Ive hit the many of the same issues with svn, I dont like it. why i prefer source gear vault but am forced to use svn.

    erikbianchi
  5. I just had this problem now. The reason that it was caused (for me) was that after moving a bunch of stuff around with svn mv, the original directory for the files had been removed and subversion could not find them. I solved the problem by copying the affected/afflicted files to a temporary directory, telling subversion to delete them, and then copying them back and telling subversion to re-add them. While these files are no longer linked to their older versions (in a different directory), subversion seems to be happy. The other possibility that I can see is to recreate the original files, commit them first, and then try moving them again.

    chaosgame
  6. I have a problem file already exits j’……………………………………….

    karampa maharjan
  7. The deletion is not a good idea when this removes all your latest changes. And there may be plenty.

    Check out the repository a second time somewhere else, or only the folder containing the mystery, and then copy over the files needed and add them to the repository. Commit.

    Then your repository has everything and svn up should work as explained above.

    Steffen