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?
Thanks
--
Rob Helmer
Namodn
----- Forwarded message from Francis Irving <[EMAIL PROTECTED]> -----
From: Francis Irving <[EMAIL PROTECTED]>
To: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>
Subject: Re: Removing directories...
Organization: Creature Labs
In-Reply-To: <[EMAIL PROTECTED]>
X-Mailer: Forte Agent 1.8/32.548
Errors-To: [EMAIL PROTECTED]
X-BeenThere: [EMAIL PROTECTED]
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:[EMAIL PROTECTED]?subject=help>
List-Post: <mailto:[EMAIL PROTECTED]>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/info-cvs>,
<mailto:[EMAIL PROTECTED]?subject=subscribe>
List-Id: Announcements and discussions for the CVS version control system
<info-cvs.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/info-cvs>,
<mailto:[EMAIL PROTECTED]?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/info-cvs/>
Date: Thu, 22 Feb 2001 10:01:43 +0000
On Wed, 21 Feb 2001 10:45:13 -0000, Smets Thomas
<[EMAIL PROTECTED]> 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.
Francis
_______________________________________________
Info-cvs mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/info-cvs
----- End forwarded message -----
_______________________________________________
Info-cvs mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/info-cvs