[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Cannot delete directory after deleting included file

From: Richard Biffl <subversion-user-ml_at_blacklettersoftware.com>
Date: Sun, 8 Aug 2010 19:58:52 +0000 (UTC)

If I delete a file from a directory in my working copy, and commit the deletion,
and then delete the directory that held the deleted file, I cannot commit the
working copy. I get a message instead that the directory is out of date.

At that point, I cannot revert the directory deletion, and if I try to update
the working copy, I am told I have a tree conflict.

The way to prevent this problem, I've learned, is to update the working copy
after I commit the deletion of the single file. But that's not intuitive,
especially when I am the only user and I'm making changes from just one working
copy. It seems wrong that I should need to update immediately after I commit.

Here is a list of commands that shows the problem. It's in Windows cmd:

[starting with empty repository \svn\repo1]
$ mkdir work1
$ svn checkout file:///svn/repo1 work1
$ mkdir work1\dir1
$ echo blah > work1\dir1\file1
$ echo blah > work1\dir1\file2
$ svn add work1\dir1
$ svn commit work1 -m "Created directory with 2 files."
$ svn delete work1\dir1\file1
$ svn commit work1 -m "Deleted dir1\file1."
$ svn delete \work1\dir1
$ svn commit work1 -m "Deleted dir1 and dir1\file2."
Deleting \work1\dir1
svn: Commit failed (details follow):
svn: Directory '/dir1' is out of date

Received on 2010-08-08 22:05:48 CEST

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.