14

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?

5 Answers 5

17

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

Sign up to request clarification or add additional context in comments.

2 Comments

Thanks, running svn up at the top level seemed to fix the problem.
Won't that overwrite my latest changes?
4

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.

Comments

1

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

Comments

1

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.

Comments

1

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.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.