info-cvs
[Top][All Lists]
Advanced

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

Re: Moving CVS repository


From: Eric Siegerman
Subject: Re: Moving CVS repository
Date: Thu, 2 May 2002 13:39:06 -0400
User-agent: Mutt/1.2.5i

On Wed, May 01, 2002 at 01:42:44PM -0500, Joi Ellis wrote:
>   find . -type f -name 'Root' | \
>      xargs perl -pi.bak -e 's/localhost/some.hostname/'
> [...]
> I prefer using perl rather than a 'cp' because some of our modules
> are nested and I don't trust the Root file to be identical all
> through the tree.  Maybe they are, maybe they aren't.

Agreed.

> It also makes it easier to repair damage should some foolish programmer
> have a file named 'Root' with other content.

The way to guard against that is to be more careful with the
first, "selection", part of the pipeline, rather than the last,
"action" part:
        find . -type f -print | grep '/CVS/Root$' | xargs [whatever]

The "whatever" can be perl, cp, or anything else that makes sense
(though I typically use perl, as shown above).

--

|  | /\
|-_|/  >   Eric Siegerman, Toronto, Ont.        address@hidden
|  |  /
Anyone who swims with the current will reach the big music steamship;
whoever swims against the current will perhaps reach the source.
        - Paul Schneider-Esleben



reply via email to

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