How do you overcome the svn 'out of date' error?

前端 未结 30 2153
鱼传尺愫
鱼传尺愫 2020-12-12 08:51

I\'ve been attempting move a directory structure from one location to another in Subversion, but I get an Item \'*\' is out of date commit error.

I ha

相关标签:
30条回答
  • 2020-12-12 09:28

    i got this error when trying to commit some files, only it was a file/folder that didn't exist in my working copy. I REALLY didn't want to go through the hassle of moving the files and rechecking out, in the end, i ended up editing the .svn/entries file and removed the offending directory reference.

    0 讨论(0)
  • 2020-12-12 09:28

    I just got this error. What I recommend is you first check on your server if the original file is there. Sometimes the changes aren't made in your local folder. If this is your situation, just delete your folder and checkout again.

    0 讨论(0)
  • 2020-12-12 09:28

    I just got this while I was trying to commit from a trunk directory. Doing svn update from the trunk directory did not solve the error; however, doing svn update from the parent directory (where the .svn directory belongs) did solve the error.

    My guess about what happened (a use case among other, there may be multiple reasons for this “svn: E160024: resource out of date; try updating”): along to trunk, there was a branches directory. I pulled a branches/branch-1 into master from GitHub. Doing svn update from the parent directory (that is, the root of my working copy) instead of trunk seems to have done something in branches in addition to trunk. When I tried to commit again, there was no error.

    However, as I said above, this is one case among probably many others.

    Side note: unlike what someone suggested, I don't believe it's a good idea to play manually in the .svn directory.

    0 讨论(0)
  • 2020-12-12 09:31

    Tried to update the local copy, and revert the item in question, and still got the 'out of date' error. This worked for some reason:

    svn update --force /path/to/dir/or/file
    
    0 讨论(0)
  • 2020-12-12 09:31

    Like @Alexander-Klyubin suggests, do the move in the repository. It's also going to be much faster, especially if you have a large amount of data to move, because you won't have to transfer all that data over the network again.

    svn mv https://username@server/svn/old/ https://username@server/svn/new/
    

    should work just fine

    0 讨论(0)
  • 2020-12-12 09:33

    "Clean Up" It will get you on track.

    Right click on the svn folder and click 'Clean Up', do this if you get that error.

    0 讨论(0)
提交回复
热议问题