[Top][All Lists]

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

address@hidden: Re: Removing directories...]

From: Rob Helmer
Subject: address@hidden: Re: Removing directories...]
Date: Fri, 23 Feb 2001 01:03:33 -0800
User-agent: Mutt/1.2.5i

Thanks for posting this Francis. 

This brings up an interesting point; I have been wondering about
this for some time now, and I can't think of a situation where
not doing a "cvs update -d" when a new directory is available would
be desirable.

Is there a reason for this not being the default?


Rob Helmer

----- Forwarded message from Francis Irving <address@hidden> -----

From: Francis Irving <address@hidden>
To: "'address@hidden'" <address@hidden>
Subject: Re: Removing directories...
Organization: Creature Labs
In-Reply-To: <address@hidden>
X-Mailer: Forte Agent 1.8/32.548
Errors-To: address@hidden
X-BeenThere: address@hidden
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:address@hidden>
List-Post: <mailto:address@hidden>
List-Subscribe: <>,
List-Id: Announcements and discussions for the CVS version control system 
List-Unsubscribe: <>,
List-Archive: <>
Date: Thu, 22 Feb 2001 10:01:43 +0000

On Wed, 21 Feb 2001 10:45:13 -0000, Smets Thomas
<address@hidden> wrote:

>Question may sound trivial but ...
>If I remove a directory from my local working copy after requesting all
>files to be removed.
>       cd Dir1/TargetDir
>       rm File1 File2 File3
>       cvs delete File1 File2 File3
>       cd ..
>       cvs commit -m "Remove the files : File1 File2 File3"
>       cvs update -P
>Now will the TargetDir also be removed from the server ?
>Said otherwise, will the TargetDir be moved into some Attic ?

This is a FAQ.  CVS treats directories in a way that you would not
expect (given how other software works), so it needs explaining.

The easy way to understand it is that CVS only stores files.  It knows
nothing about directories at all - it simply does not store them.

The files can be _in_ directories.  The directory itself is just a
label, and has no history or presence/absence.

Now, the Attic is always within the directory where the removed files
were.  Therefore, in order to have an Attic, the directory has to
still exist.  So TargetDir will _not_ be removed from the server.

However, if you always update with:
        cvs update -d -P
two things happen.

-P means "prune empty directories".  i.e. In your working copy, any
directory which has no files in (at least, no files in this branch and
at this time - it may have deleted files) will be deleted.  This
removes clutter from your working copy.

-d constructs new directories from the repository during the update.
By default, CVS doesn't make any new directories whihc 

I always update with "cvs update -d -P" (TortoiseCVS does this by
default).  There are a few cases where this is undesirable (if you use
exclude when you checkout, for example), but it creates a behaviour
which users seem to understand better.


Info-cvs mailing list

----- End forwarded message -----

reply via email to

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