views:

44

answers:

3

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?
+1  A: 

Just make a svn update and then your commit should work.

khmarbaise
Beat me to it. And to add to that, an update should be part of your normal workflow. I typically update before commits.
hometoast
That was one of the obvious solution I thought about. But after svn update I get: svn commit --> '\dir' remains in conflict
Jos Geerts
A: 

You just need to update and then commit

ULysses
That was one of the obvious solution I thought about. But after svn update I get: svn commit --> '\dir' remains in conflict
Jos Geerts
A: 

Have you tried svn up dir before doing the final commit?

TheJuice
That was one of the obvious solutions I thought about. But after svn update I get: svn commit --> '\dir' remains in conflict
Jos Geerts