tags:

views:

30

answers:

3

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.

A: 

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.

Mikel
@Mikel : `ls` isn't recognized. Neither are the synonyms [suggested by Dewfy](http://stackoverflow.com/questions/3437885/how-can-i-list-all-modules-in-a-cvs-repository/3437948#3437948)
Zaid
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.
Mikel
A: 

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
Dewfy
@Dewfy : `ls` and its synonyms aren't recognized as a command. See my comment in [Mikel's answer](http://stackoverflow.com/questions/3437885/how-can-i-list-all-modules-in-a-cvs-repository/3437915#3437915)
Zaid
@Zaid - could you please execute : cvs --help-commandsand enlist the result
Dewfy
@Dewfy : I've updated my post to answer your question
Zaid
@Zaid - 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)
Dewfy
+1  A: 

See this answer. As that question had a slightly different angle you can skip the first few paragraphs of the answer.

Oliver Giesen