Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I list all modules in a CVS repository?

Tags:

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.

like image 870
Zaid Avatar asked Aug 09 '10 06:08

Zaid


People also ask

How do I checkout a CVS repository?

Use “cvs checkout” giving the name of the directory in the cvs repository you want to checkout, where the name you give is a directory under CVSROOT, presently $CD_SOFT/cvs (eg app/alh, script). The directory you give, and all subdirectories, will be placed in your working directory.

How does CVS repository work?

The CVS repository stores a complete copy of all the files and directories which are under version control. Normally, you never access any of the files in the repository directly. Instead, you use CVS commands to get your own copy of the files into a working directory, and then work on that copy.

How do I update my CVS repository?

Right-click the file, and select Team→ Update, then resolve any conflicts. Alternatively, if you just want to replace your version with what's in the CVS repository, right-click the file and select Replace With→ Latest From HEAD.

What are CVS directories?

A CVS subdirectory stores metadata for the files in its directory. The server also stores files in a temporary directory set by either the TMPDIR environment variable or the -T command-line option. These files are under a directory called cvs-serverPID , where PID is the process ID of the server.


2 Answers

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

like image 64
Oliver Giesen Avatar answered Oct 03 '22 05:10

Oliver Giesen


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
like image 28
Dewfy Avatar answered Oct 03 '22 05:10

Dewfy