349

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.

3
  • 11
    did you try svn up?
    – Sklivvz
    Sep 17, 2008 at 21:41
  • 3
    a trivial problem-avoider is: if deleting a folder and contents, delete only the contents first, svn, then delete the folder, then svn again.
    – Fattie
    Nov 21, 2014 at 13:36
  • Related note: subversion.apache.org/docs/release-notes/…
    – bahrep
    Jan 18, 2016 at 16:58

31 Answers 31

669

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.

19
  • 4
    I changed the svn:ignore property of a folder, and started getting the out of date error. But as you said, just updating it worked.
    – Sushant
    Oct 21, 2009 at 6:49
  • 4
    When I try to update that directory, I get "svn: Two top-level reports with no target" One more reason to hate SVN. With git, I never had this type of stupid problem with basic operations like moving a directory. Jun 5, 2010 at 0:21
  • I had an 'out of date' error on my parent folder using the Versions GUI. I updated the parent folder and then committed without errors.
    – milesmeow
    Dec 15, 2010 at 20:18
  • 1
    this was also caused by changing svn:ignore for me and svn update fixed it. thanks! Mar 8, 2011 at 4:43
  • 11
    In Subclipse use "Team -> Update to HEAD". Works fine with me.
    – NeoRamza
    Jan 25, 2014 at 18:19
42

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.

6
  • That did it! Thanks! Anybody have any suggestions on how this happens and how to avoid it in the first place? Nov 14, 2013 at 17:13
  • Worked for me. I ended up having to remove all 'all-wcprops' files: find . -name all-wcprops -exec rm -rf {} \; May 20, 2014 at 10:49
  • I guess you should be able to solve this by svn tools and options, without deleting files in structure
    – Augusto
    Jul 11, 2014 at 10:14
  • +1, this is the only thing that worked for me. The other solution did not. Jul 23, 2014 at 13:49
  • 11
    aint working for me, there are no all-wcprops files within the .sv directory
    – ulkas
    Sep 18, 2014 at 8:52
41

I've found that this works for me:

svn update
svn resolved <dir>
svn commit
2
  • Worked for me without doing svn update before, I had a scenario where I wanted to avoid update. (so I just did resolve and commit and it worked)
    – BornToCode
    Nov 3, 2013 at 18:04
  • this has been THE cure for my situation, nothing else worked. thanks!
    – texasdave
    Aug 2, 2019 at 0:40
39

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.

1
  • 4
    Subversion actually does copy then delete, which is rather different to deleting there and adding here.
    – SnakE
    Aug 18, 2011 at 18:37
15

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
11

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

5

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

5

I manage to solve it by hitting a update button

4

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

1
  • I was having this problem with an svn up; svn mv command series, and this did the trick nicely. Thank you.
    – DopeGhoti
    Dec 28, 2015 at 18:38
3

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 
2

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.

2
  • Let's say you want to checkin an old copy? What then is the easiest way to make the checkin work?
    – OJW
    Jun 30, 2011 at 10:00
  • If you're talking about reverting to an old copy, just check it in as usual. It will get a new revision number.
    – jgreep
    Jul 14, 2011 at 18:15
2

Perform the move directly in the repository.

2

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

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

2

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

1

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

1

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.

1
  • 1
    I would avoid with changing the repository contents (svn delete), just because my local checkout is somehow corrupted. Dec 8, 2012 at 10:26
1

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.

1

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.

1

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

0
1

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.

1

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.

1
  • 1
    This even happened to me with TortoiseSVN 1.8.8 on Windows. Updating to 1.9 helped. Jul 11, 2016 at 16:22
1

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

1

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.

0

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.

0

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

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

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.

0

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

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.

Not the answer you're looking for? Browse other questions tagged or ask your own question.