How do you overcome the svn 'out of date' error?
SvnSvn Problem Overview
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 have the latest version checked out (so far as I can tell). svn st -u
turns up no differences other than the mv commands.
Svn Solutions
Solution 1 - Svn
I sometimes get this with TortoiseSVN on windows. The solution for me is to svn update
the directory, even though there are no revisions to download or update. It does something to the metadata, which magically fixes it.
Solution 2 - Svn
After trying all the obvious things, and some of the other suggestions here, with no luck whatsoever, a Google search led to this link (link not working anymore) - Subversion says: Your file or directory is probably out-of-date
In a nutshell, the trick is to go to the .svn directory (in the directory that contains the offending file), and delete the "all-wcprops" file.
Worked for me when nothing else did.
Solution 3 - Svn
I believe this problem is coming from the .svn file. It's either incorrect in the old parent, the new parent or the old one. I would try reverting back to your starting point. Use an export to get a clean copy of the folder. Move the clean copy to the new location, and use an add and delete to do the move. That's manually doing what SVN does, but it might work.
Solution 4 - Svn
I've found that this works for me:
svn update
svn resolved <dir>
svn commit
Solution 5 - Svn
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
Solution 6 - Svn
I just had the same problem in several folders and this is what I did to commit:
- In "Team Synchronize" perspective, right click on the folder > Override and Update
- Delete the folder again
- Commit and be happy
Solution 7 - Svn
Thank you. That just resolved it for me. svn update --force /path to filename/
If your recent file in the local directory is the same, there are no prompts. If the file is different, it prompts for tf, mf etc... chosing mf (mine full) insures nothing is overwritten and I could commit when done.
Jay CompuMatter
Solution 8 - Svn
I manage to solve it by hitting a update button
Solution 9 - Svn
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
Solution 10 - Svn
Remove your file or your path using before execute the command do a bk of your changes
sudo rm -r /path/to/dir/
after :
svn up and commit or delete
Solution 11 - Svn
Are you sure you've checked out the head and not a lower revision? Also, have you done an update to make sure you've got the latest version?
There's a discussion about this on http://svn.haxx.se/users/archive-2007-01/0170.shtml">http://svn.haxx.se/users/archive-2007-01/0170.shtml</a>;.
Solution 12 - Svn
Perform the move directly in the repository.
Solution 13 - Svn
There is at least one other cause of the message "out of date" error. In my case the problem was .svn/dir-props which was created by running "svn propset svn:ignore -F .gitignore ." for the first time. Deleting .svn/dir-props seems like a bad idea and can cause other errors, so it may be best to use "svn propdel" to clean up the errant "svn propset".
# Normal state, works fine.
> svn commit -m"bump"
Sending eac_cpf.xsl
Transmitting file data .
Committed revision 509.
# Set a property, but forget to commit.
> svn propset svn:ignore -F .gitignore .
property 'svn:ignore' set on '.'
# Edit a file. Should have committed before the edit.
> svn commit -m"bump"
Sending .
svn: Commit failed (details follow):
svn: File or directory '.' is out of date; try updating
svn: resource out of date; try updating
# Delete the property.
> svn propdel svn:ignore .
property 'svn:ignore' deleted from '.'.
# Now the commit works fine.
> svn commit -m"bump"
Sending eac_cpf.xsl
Transmitting file data .
Committed revision 510.
Solution 14 - Svn
If you're using the github svn bridge, it is likely because something changed on github's side of things. The solution is simple, you just have to run svn switch
, which lets it properly find itself, then update and everything will work. Just run the following from the root of your checkout
svn info | grep Relative
svn switch path_from_previous_command
svn update
or
svn switch `svn info | grep Relative | sed 's_.*: __'`
svn update
The basis for this solution comes from Lee Preimesberger's blog
Solution 15 - Svn
"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.
Solution 16 - Svn
Are you moving it using svn mv
, or just mv
? I think using just mv
may cause this issue.
Solution 17 - Svn
I moved the dir to my local machine for safe-keeping, then svn deleted the stupid directory, then committed. When I tried to add the folder from my local machine it STILL threw the error (SVN move did the same thing when I tried to rename the folder). So I reverted, then I did a mkdir DIRNAME, added, and committed. Then I added the contents in and committed, and it worked.
Solution 18 - Svn
I randomly recieved this error after deleting a few directories each containing some files. I deleted the directories through Netbeans and realised that it didn't actually delete them. It seemed to just delete everything inside the directories and removed the reference to the directory within Netbeans. They did still exist on the filesystem though. Make sure they're deleted from the filesystem and try the commit again.
Solution 19 - Svn
If once solved a similar issue by simply checking out a new working copy and replacing the .svn directory throwing the commit errors with this newly checked out one. The reason in my case was that after a repository corruption and restore from a backup the working copy was pointing towards a revision that didn't exist in the restored repository. Also got "item out of date" errors. Updating the working copy before commit didn't solve this but replacing the .svn as described above did.
Solution 20 - Svn
I did this and it worked for me:
- Take a back-up of your file. You can simply copy your code to a text file.
- Right Click the file you want to commit >> Team >> Show History.
- In "Show History" Panel you will see all the revisions of that file. Right click on latest revision of the file >> Get Revision: It will override your local changes.
- Now, merge your code with the latest file with the back-up file (step#1).
- Synchronise and Commit the newly merged file.
Solution 21 - Svn
Upgrade your server and client to Subversion 1.9.
If the out of date
error randomly occurs when it normally should not, when you run commit, it may indicate that you are using an outdated and unsupported Subversion 1.7 or older client or server.
You should upgrade the server and clients in order to solve the problem. See the relevant Subversion 1.9 Release Notes entry: "Out of date" errors when committing over HTTPv1.
Solution 22 - Svn
Error is because you didn't updated that particular file, first update then only you can commit the file.
Solution 23 - Svn
Tried all but change in .svn directly. Nothing helped so here's my solution.
In Eclipse > Window > Show View > History I've seen that file is not at the newest Revision, although I made multiple svn "Override & Update" / "Revert" / delete file and checkout.
So I went Package Explorer > Right click on file > Replace with > Latest from Repository.
Another look in the History View showed that file was now on latest Revision.
Solution 24 - Svn
This happened when I updated a branch of an earlier release with files from the trunk. I used Windows Explorer to copy folders from my trunk checkout folder, and pasted them into my Eclipse view of the release branch checkout folder. Now Windows Explorer was configured not to show "hidden" files starting with ".", so I was oblivious to all the incorrect .svn files being pasted into my release branch checkout folder. Doh!
My solution was to blow away the damaged Eclipse project, check it out again, and then copy the new files in more carefully. I also changed Windows to show "hidden" files.
Solution 25 - Svn
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.
Solution 26 - Svn
In my case only deleting of the local version and re checkout of fresh copy was a solution.
Solution 27 - Svn
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.
Solution 28 - Svn
To solve, I needed to revert the file with problem, and update my working copy, and later I modified the file again and after these steps the error didn't happened anymore.
Solution 29 - Svn
Just do svn up into command line or if you are in windows select the svn update option.
- Once this will done, this allow you to make further action like committing and others.
Solution 30 - Svn
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.
Solution 31 - Svn
is more isyly make this:
1)i copy my modify code in a notepad. 2) next , update the file.
- copy the code of notepad in a file updated.
- commit in svn.