[Top][All Lists]

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

Re: Erase all cvs info from directory tree

From: Pierre Asselin
Subject: Re: Erase all cvs info from directory tree
Date: Sun, 16 Oct 2005 23:41:56 +0000 (UTC)
User-agent: tin/1.6.2-20030910 ("Pabbay") (UNIX) (NetBSD/2.0 (i386))

RobE <address@hidden> wrote:

> I need sometimes to get rid of all the "CVS"-directories (including the
> contents) in a large tree within a checked out project.

    shellprompt> find . -type d -name CVS | xargs rm -rf

Needless to say, your sandbox is now lost to CVS --but the
other files remain.

> Additionaly / alternatively: is there a way to import a project that
> already has CVS information?

Well, you could do:

    shellprompt> find . -name CVS | while read d; do
        mv $d $d-orig
    shellprompt> cvs import blabla_the_usual ...

This renames the CVS directories to something harmless,
so they get imported like the rest.  They are treated like
ordinary directories and the information they contain is

Where it gets interesting is when you have a checked-out
sandbox with your own CVS directories in addition to the
intitial CVS-orig directories from the other server.  If
you like to live dangerously, you can do

    find . -name CVS | while read d; do
        mv $d $d-local
        mv $d-orig $d

and that turns the table.  Your sandbox now appears to
have originated from the first server, and your own
server's metadata is moved to CVS-local directories.
Reversing the process is left as an exercise :-)
Oh, and do *not* make a typo.  (Also pray that *I*
didn't make a tupo in my post.)

pa at panix dot com

reply via email to

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