tags:

views:

1274

answers:

3

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 and some 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?

+3  A: 

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.

Palmin
+1  A: 

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

victor hugo
+3  A: 

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

Naaff
Thanks, running svn up at the top level seemed to fix the problem.
Dana the Sane