How can I list all modules in a CVS repository?
Asked Answered
V

3

21

Is there a command that returns a list of module names contained within a CVS repository?

Being a newbie to CVS, I imagine that there should be something along the lines of

cvs -d /usr/local/cvs listmodules

What should I substitute listmodules with to get a list of all modules within the CVS repository?


To address Dewfy's comment, cvs --help-commands returns the following:

    add          Add a new file/directory to the repository
    admin        Administration front end for rcs
    annotate     Show last revision where each line was modified
    checkout     Checkout sources for editing
    commit       Check files into the repository
    diff         Show differences between revisions
    edit         Get ready to edit a watched file
    editors      See who is editing a watched file
    export       Export sources from CVS, similar to checkout
    history      Show repository access history
    import       Import sources into CVS, using vendor branches
    init         Create a CVS repository if it doesn't exist
    kserver      Kerberos server mode
    log          Print out history information for files
    login        Prompt for password for authenticating server
    logout       Removes entry in .cvspass for remote repository
    pserver      Password server mode
    rannotate    Show last revision where each line of module was modified
    rdiff        Create 'patch' format diffs between releases
    release      Indicate that a Module is no longer in use
    remove       Remove an entry from the repository
    rlog         Print out history information for a module
    rtag         Add a symbolic tag to a module
    server       Server mode
    status       Display status information on checked out files
    tag          Add a symbolic tag to checked out version of files
    unedit       Undo an edit command
    update       Bring work tree in sync with repository
    version      Show current CVS version(s)
    watch        Set watches
    watchers     See who is watching a file

The CVS version is 1.11.22.

Vandervelde answered 9/8, 2010 at 6:55 Comment(1)
I actually want to run in :ext: mode, in case that makes a difference.Vandervelde
R
21

As already described in this answer there are basically three ways to go about this. Which one suits your situation depends firstly on what versions of CVS you are using on both client and server and secondly on your definition of "modules".

  1. If you are referring to modules as they were originally thought of by the CVS authors, i.e. as entries in the CVSROOT/modules file then cvs co -c or cvs co -s will give you that, the only difference between the two being that the latter will sort the output by "status". You can read about the modules file here: http://cvsbook.red-bean.com/cvsbook.html#modules

  2. If you are using at least CVS 1.12.8 or CVSNT and your idea of modules corresponds more to actual directories inside the repository, then cvs ls should be what you want.

  3. Finally, if you are indeed after a remote directory listing but your server is running an older version of CVS, then there's the trick of first performing a "fake" checkout and then simulating a recursive update:

    cvs -d [CVSROOT] co -l .

    cvs -n up -d

Rim answered 10/8, 2010 at 12:28 Comment(0)
S
1

Use following:

 cvs -d /usr/local/cvs ls

According to this http://www.cvsnt.org/manual/html/ls.html there are synonyms: dir,list,rls

And of course don't forgive to review all available commands by:

cvs --help-commands
Sagittarius answered 9/8, 2010 at 7:6 Comment(3)
ls and its synonyms aren't recognized as a command. See my comment in Mikel's answerVandervelde
@Vandervelde - could you please execute : cvs --help-commands and enlist the resultSagittarius
@Vandervelde - so pity, it looks like you use some brief cvs, then the simplest way is execute 'export' command - that in minimal affect local file system. Also may be helpful in some case option -l (don't use recursion)Sagittarius
R
0

You can run

cvs ls

to list the tree in CVS >= 1.11 (see cvs --version), or run

cvs checkout CVSROOT/modules

to see the module configuration file.

Rutkowski answered 9/8, 2010 at 7:1 Comment(3)
ls isn't recognized. Neither are the synonyms suggested by DewfyVandervelde
Yeah, you need CVS 1.11 or above. I think it's required on both the client and server. But the modules file should be available even with older versions.Rutkowski
There is no modules file :/.Pantie

© 2022 - 2024 — McMap. All rights reserved.