bug-cvs
[Top][All Lists]
Advanced

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

Re: CVS Bug


From: Derek Robert Price
Subject: Re: CVS Bug
Date: Thu, 08 Aug 2002 16:33:11 -0400
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.0) Gecko/20020606

Gert Brinkmann wrote:

Hello,

the following might be a CVS bug. I already have reported it, but there was no answer. Does this mail really reach someone?


Sometimes, we think it makes it somewhere. The sentience of the beings recieving it may be debatable.

(We have installed cvs 1.11)

I would like to use the option "-P" with an "cvs update" to prune empty directories. This works fine, but when doing a "cvs -qn update -dP" all the pruned directories are listed the same way as it is when not using "-P":

cvs server: New directory `foo' -- ignored

Because we are using the output of an "cvs -qn update -d" to parse through and build a report of the checkout-state, the pruned directories are bothering. It would be great to skip this pruned-directory-ignored lines by using the "-P" here, too.

Thank you in advance,

Gert Brinkmann


I see where you're coming from, but the way -n currently works, when CVS would have tried to create a directory, it stops before it knows whether it would have been empty or not.

In other words, under normal operation, the `-d' specified to update causes all directories to be created locally (except in noexec mode, but I'll get to that). Then, after CVS has finished with the directory and all subdirectories and is about to recurse back up a level, when `-P' was specified, it checks to see if the directory is empty and removes it if it is.

Now, in noexec mode, the directory never gets created, so CVS never checks to see if anything would have been checked out underneath it. It seems necessary to warn the user that the directory (and possibly sub directories/files) _might_ have been created there since that is basically the "question" they asked by running the command with `-n'. Thus the `New directory <dir> -- ignored' message.

The message comes out on stderr, so, as a workaround, you might be able to ignore it with 2>/dev/null. Alternatively, if there are other messages you want to see coming out on stderr, you could pipe stderr and stdout through a filter:

   $ cvs -qn up -dP 2>&1 |egrep -v '-- ignored$' |some_script

or the like.

Of course, Ximbiot <http://ximbiot.com> could update CVS to cache the directory tree properly so -n would do what you'd expect here on a contract basis.

DISCLAIMER: No warranties or representations. It's not my fault if you neglected to back up your file system and something I suggested caused data loss. Read, understand, and test everything I suggest before using it in a production environment.

Derek

--
               *8^)

Email: derek@ximbiot.com

Get CVS support at http://ximbiot.com
--
I will not yell "She's Dead" at roll call.
I will not yell "She's Dead" at roll call.
I will not yell "She's Dead" at roll call...

         - Bart Simpson on chalkboard, _The Simpsons_






reply via email to

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