Listing CVS files
If you are writing some package for CVS which only needs to run with local CVS, listing the files under CVS control is (relatively) easy, some variation on "ls $CVSROOT" does the trick.
However, if using remote CVS, or if you want to avoid accessing the CVS repository directly for whatever reason, it is much more complicated. This page describes some of the solutions which people have come up with or proposed.
- Some people have done things with the modules file. If you make sure to list everything in the modules file, then "cvs co -c" will show you what is there. Or tkCVS takes this one step further by requiring "#M" and "#D" comments in the modules file. The biggest problem with these approaches is that they require one to maintain the modules file in a certain way. There is also a question of whether one would like to list subdirectories too (without listing all subdirectories in the modules file too).
- The SDSS-CVS package (which is a layer which sits between rshd and cvs), provides an INFO command which lists the top-level directory.
- Are there tricks to provide some/all of this functionality with
the existing protocol? For example, in a quick test, "cvs -n co ."
from an empty directory seemed to be potentially quite helpful (it
printed a message for each directory "New directory `foo' --
ignored"). I'm not sure that we want to make this exact behavior
official/documented, but then again, being able to get this
functionality with the CVS servers which are out there is good for
something (if nothing else, as something to fall back to if the server
doesn't support the new feature, if we design one).
Another existing command is "cvs log -R" but that shows files rather than directories, so using it to get directories is awkward/slow.
- Here is an unofficial patch to add list functionality to the remote protocol. And another one from Dan Rich.
For more information
For information on SDSS-CVS, see this page from Fermilab.
![[Cyclic Home]](../cyclic-pages/cyclichome.gif)
![[ Valid XHTML 1.0! ]](/branding/w3c-valid-xhtml10-44x16.png)
![[ Valid CSS! ]](/branding/w3c-valid-css-44x16.png)
