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

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.

This question is related to svn

The answer is


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.


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.


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.


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.


"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.


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


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.


I just had the same problem in several folders and this is what I did to commit:

1) In "Team Synchronize" perspective, right click on the folder > Override and Update
2) Delete the folder again
3) Commit and be happy


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


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.


Are you moving it using svn mv, or just mv? I think using just mv may cause this issue.


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


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.


I've found that this works for me:

svn update
svn resolved <dir>
svn commit

Error is because you didn't updated that particular file, first update then only you can commit the file.


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


In my case only deleting of the local version and re checkout of fresh copy was a solution.


I did this and it worked for me:
1. Take a back-up of your file. You can simply copy your code to a text file.
2. Right Click the file you want to commit >> Team >> Show History. 3. 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.
4. Now, merge your code with the latest file with the back-up file (step#1).
5. Synchronise and Commit the newly merged file.


Perform the move directly in the repository.


I've found that this works for me:

svn update
svn resolved <dir>
svn commit

Perform the move directly in the repository.


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.


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.


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.


is more isyly make this:

1)i copy my modify code in a notepad. 2) next , update the file. 3) copy the code of notepad in a file updated. 4) commit in 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

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.


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.


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

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.

Perform the move directly in the repository.


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.


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 

I just had the same problem in several folders and this is what I did to commit:

1) In "Team Synchronize" perspective, right click on the folder > Override and Update
2) Delete the folder again
3) Commit and be happy


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.


Are you moving it using svn mv, or just mv? I think using just mv may cause this issue.


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.


In my case only deleting of the local version and re checkout of fresh copy was a solution.


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


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.

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


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.


Perform the move directly in the repository.


Error is because you didn't updated that particular file, first update then only you can commit the file.


Are you moving it using svn mv, or just mv? I think using just mv may cause this issue.


I manage to solve it by hitting a update button


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.


I did this and it worked for me:
1. Take a back-up of your file. You can simply copy your code to a text file.
2. Right Click the file you want to commit >> Team >> Show History. 3. 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.
4. Now, merge your code with the latest file with the back-up file (step#1).
5. Synchronise and Commit the newly merged file.


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.


Are you moving it using svn mv, or just mv? I think using just mv may cause this issue.


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.


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.


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.


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


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


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.


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.

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.


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 

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.


"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.


I manage to solve it by hitting a update button


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.


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.


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.


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.


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.


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.

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.


is more isyly make this:

1)i copy my modify code in a notepad. 2) next , update the file. 3) copy the code of notepad in a file updated. 4) commit in svn.