Dana the Sane
Dana the Sane

Reputation: 15198

How do I avoid "svn: Out of Date:" problems?

In the past few years of using svn, I've frequently run into problems where commits would fail with the above error. I originally thought this had to do with the use of samba mounted work spaces but I've seen it happen remotely with svn+ssh as well.

Here's an example of this coming up recently:

  1. Rename a directory using svn move
  2. Commit change to new directory
  3. Try to commit deletion of old directory -- fails with:

    Deleting (sub dir) svn: Commit failed (details follow): svn: Out of date: '(some path)/(old dir)/(sub dir)' in transaction x

Addition: What is the best way fixing these problems when they do occur?

Upvotes: 14

Views: 26958

Answers (5)

well i do this think.

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.

Upvotes: 1

Naaff
Naaff

Reputation: 9333

Check out the SVN FAQ entry on this issue. I believe you are genuinely out of date and just need to run "svn update".

Upvotes: 17

Tom Bushell
Tom Bushell

Reputation: 5875

After trying all the obvious things, and some of the other suggestions here, with no luck whatsoever, a Google search led to this link - 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.

Upvotes: 1

Palmin
Palmin

Reputation: 2811

You should check these things from the Subversion FAQ:

  1. Debris from a failed commit is littering your working copy.
  2. Mixed revisions
  3. You might be genuinely out of date

Your renaming example points to No. 2 as your source of the problem: If you commit the new directory, the parent directory of the old and the new will be mixed revision, so if you try to commit the parent directory, it will fail. It makes a lot of sense to commit the move (which is a combined copy and delete) in one transaction by comitting the parent directory.

Upvotes: 4

victor hugo
victor hugo

Reputation: 35838

I think you should commit the whole change in one single step, this way bot the parent and the moved dir will be in the same revision.

In your case you must do svn update in the parent dir which will recover your erased dir, then svn delete it again and try another commit

Upvotes: 1

Related Questions