SVN commit failed: Directory out of date

Viewed 77870

I have a problem that seems very simple but is hard to solve. I get the mentioned error after deleting a directory. I did not find a solution yet to solve the conflict. This is how it occurs:

svn add dir
svn add dir/file1
svn commit
svn add dir/file2
svn commit
svn delete dir
svn commit
--> commit failed  
--> Directory '/dir' is out of date

The obvious solution 'svn update'does not work. After svn update a next commit fails with:

Commit failed
Directory '/dir' remains in conflict.

In the meanwhile I found a solution but it is a bit cumbersome:

svn resolve --accept working dir
svn commit --> still fails
svn update
svn commit --> still fails
svn resolve --accept working dir
svn commit --> NO PROBLEM!

Two questions: - can anyone explain this behaviour because I am very curious about it - this problem occurs in a perl script in a far more complex situation. Can anyone give me a simple solution with is 'doable' in the perl script?

10 Answers

I've figured out an easy way to solve the problem on Eclipse:

Right click on your project -> Team -> Update to HEAD

and then follow the same way for commiting.

Right click on your project -> Team -> Commit

This happens when you are going to commit a file and the same file is updated in the SVN as well. Then it is going to conflict.So what you have to do is just take a copy of your changes and revert the file. then again paste your code. Then you can commit without any issues.

Try committing one test directory on the server. generally when you delete any repository from SVN and if contains multiple files, SVN note the changes but it's in on-hold state or changes will take time to reflect. No worries just wait for few minutes and it will start reflecting. try committing test directory. cheers.

Related