info-cvs
[Top][All Lists]
Advanced

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

Re: How to get consistent output for: cvs -q -n up -d ?


From: Daniel Yek
Subject: Re: How to get consistent output for: cvs -q -n up -d ?
Date: Fri, 25 Apr 2008 13:57:04 -0700
User-agent: Thunderbird 2.0.0.12 (Windows/20080213)


Ted Stern wrote:
On 24 Apr 2008 15:10:31 -0700, Daniel Yek wrote:
Hi,

I am having problem getting consistent output using a cvs command to
list on the module directories.

cvs -d <whatever> co -l \.

If I check out a module here, the output of the following command will
be different from if I don't check out any module here.

cvs -q -n up -d 2>&1 | cut -f 5 -d' ' | sed "s/\`\|'//g" -

This might be caused by the entries in CVS/Entries.Log file,  but I am
not sure.

Is there a way to modify the cvs command above to consistently list
the module directories only (without second-level directories in the
output) in an existing source directory?

Thanks.


Hi Daniel,

This seems a little dangerous.

The usual way to get a Table Of Contents of your modules is to create
it yourself using the modules file.

     cvs -d <repos> checkout -d cvsmodules CVSROOT/modules

     cd modules


Add lines like this:

   CVSROOT           CVSROOT # cvs administration stuff, not for regular users
   cvsmodules        CVSROOT modules # *** to edit what you're looking at now!
   module1           path/to/module1 # *** Nice descriptive comment

Then when you do

   cvs -d <repos> checkout -c

you will get a listing that looks like this:


CVSROOT      CVSROOT
             # cvs administration stuff, not for regular users
cvsmodules   CVSROOT modules
             # *** to edit what you're looking at now!
module1      path/to/module1
             # *** Nice descriptive comment


Is that more like what you want?

Hi Ted,

No, not really. I am not trying to present a table of content to users, but I am trying to use the output of module names in a script.

Before checking out the modules themselves, this command:
cvs -q -n up -d 2>&1 | cut -f 5 -d' ' | sed "s/\`\|'//g"

would give me:
module0
module1
etc.

After checking out some modules, or change directory into an existing cvs "tree", *exactly the same* command for the same repository would give me this output:
module0/dir0
module0/dir1
module1/dira
module1/dirb
etc.

I want to get module names without second-level directory name consistently.

Thanks.

--
Daniel Yek.



Ted




reply via email to

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