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

Removing a directory locally

From: Greg Lutz <greg_at_nearspace.com>
Date: Sat, 02 Feb 2008 15:38:14 -0800

As a relative newcomer to Subversion, I find a capability surprisingly
missing: the ability to remove a directory from a working copy, but not
from the repository. At least, it seems to be missing.

In a toy example, I have a repository with two directories under the
root, Project1 and Project2.

I create a working copy /Temp/wc non-recursively, then use svn update to
add Project1 to the working copy.

 From within the working copy, svn status -v now reports

                1 1 Greg .
                1 1 Greg Project1

I now use svn update again, to add Project2 to the working copy. The svn
status -v report is now

                1 1 Greg .
                1 1 Greg Project1
                1 1 Greg Project2

Suppose I now decide that fetching Project2 was a mistake -- it's big
and ugly, I don't need it, I just want it back out of there. Not out of
the repository, just out of my working copy, so I don't want to use svn
delete. If I use plain file system commands to remove Project2, then svn
status -v gives me a *bad* report:

                1 1 Greg .
                1 1 Greg Project1
! ? ? ? Project2

If I then try to add a file to the root of the repository with svn add,
I'm not allowed to commit it:

C:/Temp/wc>svn add File1.txt
A File1.txt
C:/Temp/wc>svn commit
svn: Commit failed (details follow):
svn: Directory 'C:\Temp\wc\Project2' is missing

There *is* a non-kosher workaround: I can edit .svn/entries and remove
the lines for Project 2:

Project2
dir
<ff>

After doing this, the commit works fine.

Is there a kosher way to do this operation?

Thanks,
Greg Lutz

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: users-help_at_subversion.tigris.org
Received on 2008-02-03 00:38:35 CET

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.