[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: cvs: deleting empty directories

From: KM
Subject: Re: cvs: deleting empty directories
Date: Tue, 9 Aug 2011 08:34:43 -0700 (PDT)

I just checked there were actually files in there for like a few minutes, and 
they were deleted.  We never used the files in the directory.  It is better to 
just keep it there .... or remove as I asked below....

From: KM <address@hidden>
To: cvs-user-list <address@hidden>
Sent: Tuesday, August 9, 2011 11:25 AM
Subject: cvs: deleting empty directories

Hi All
I have a question.  The developer mistakenly added a directory structure that 
we are not going to use.  I wanted to delete the directory since it never had 
files in it.  I see the following from the guide.  Should I keep the empty 
directory lying around, or only if I had files in it that I may want later.

And If I can delete it - what is the clearest way to do it?
cvs remove -f <dir name>
... and then check it in?

7.3 Removing directories 
In concept, removing directories is somewhat similar to removing files—you want 
the directory to not exist in your current working directories, but you also 
want to be able to retrieve old releases in which the directory existed. 
The way that you remove a directory is to remove all the files in it. You don’t 
remove the directory itself; there is no way to do that. Instead you specify 
the ‘-P’ option to cvs update or cvs checkout, which will cause CVS to remove 
empty directories from working directories. (Note that cvs export always 
removes empty directories.) Probably the best way to do this is to always 
specify ‘-P’; if you want an empty directory then put a dummy file (for example 
‘.keepme’) in it to prevent ‘-P’ from removing it. 
Note that ‘-P’ is implied by the ‘-r’ or ‘-D’ options of checkout. This way, 
CVS will be able to correctly create the directory or not depending on whether 
the particular version you are checking out contains any files in that 

reply via email to

[Prev in Thread] Current Thread [Next in Thread]