[Top][All Lists]

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

RE: cvs add `find ./`

From: Pyatt, Scott
Subject: RE: cvs add `find ./`
Date: Fri, 6 Oct 2000 10:33:37 -0700

An optimization of this would be to perform the find from within the Perl
script.  That way the opening, compiling and closing of happens once.
I've found that is fast under the Unix platforms I've tried but
surprisingly slow under NT.  If I need speed under NT I do something like

   @findResults = `find . -type f -exec {} \;`;

In this case "find" is from the Cygwin or MKS tools.


-----Original Message-----
From: Richard J. Duncan [mailto:address@hidden
Sent: Friday, October 06, 2000 6:33 AM
To: address@hidden
Subject: Re: cvs add `find ./`

> Is there any way to tell CVS that I want to
> add only new files to the repository? Perhaps if
> I "cvs diff $file" and check the error level for
> each file?

One easy way is to run `cvs status <file>` and grep for "Status:
Unknown." Pipes don't work well in a find command, so I generally
write a quick script for this sort of thing:


# file:

$file = shift;
open(FP,"cvs status $file|") or die "cannot run cvs status: $!";
while (<FP>) {
  if (/Status: Unknown/) {
     system "cvs add $file";

Then run,

find . -type f -exec {} \;


Info-cvs mailing list

reply via email to

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