Subject: Re: Removing Empty Directories from a CVS Checkout
To: Jan-Hinrich Fessel <oskar@unna.ping.de>
From: Curt Sampson <curt@portal.ca>
List: current-users
Date: 10/06/1996 13:28:30
This message is in MIME format. The first part should be readable text,
while the remaining parts are likely unreadable without MIME-aware tools.
Send mail to mime@docserver.cac.washington.edu for more info.
--1360147542-465516983-844633710=:16385
Content-Type: TEXT/PLAIN; CHARSET=us-ascii
Content-ID: <Pine.NEB.3.93.961006132009.16385H@didactic.cynic.net>
On Sun, 6 Oct 1996, Jan-Hinrich Fessel wrote:
> That's fine, but how do i get these empty directories?
> I sup into a local reference tree.
> I do an import into another CVS master tree.
> How can I remove directories and files deleted by sup in the reference tree
> from the CVS master tree?
> I did not find any option for cvs import that even tells me that files in the
> CVS master tree are no longer present in the tree imported.
You'll probably want to go over the section on importing in the
CVS reference manual several times; it's not entirely clear on the
first go. Also, the CVS FAQ, despite no longer being maintained,
has good information on this.
Essentially, it works like this:
1. sup into your local tree, `sup'.
2. Checkout a copy of your last import from the sup tree into
`checkout'.
3. Now we figure out which files to delete:
cd sup/src
find . -print | sort >/tmp/tree.new
cd checkout/src
find . -print | egrep -v '/CVS$|/CVS/' | sort >/tmp/tree.old
comm -23 /tmp/tree.old /tmp/tree.new >/tmp/delete
xargs rm </tmp/delete
xargs cvs -q remove </tmp/delete
cvs -q update -m "new version pre-import"
4. Now you can go into your sup tree and do an import.
I had to read both the documentation and the FAQ a couple of times
and do some practice runs on small trees I'd constructed myself
before I got the hang of this.
cjs
Curt Sampson curt@portal.ca Info at http://www.portal.ca/
Internet Portal Services, Inc.
Vancouver, BC (604) 257-9400 De gustibus, aut bene aut nihil.
--1360147542-465516983-844633710=:16385--