How can I list files in CVS without an initial checkout?

十年热恋 提交于 2019-11-30 08:16:24

If it's a one-off operation you don't need to set the CVSROOT environment variable. Just use the -d argument for ad-hoc repository specification.

If your version of CVS/CVSNT is not too old (to be exact you'd need either CVS 1.12.8 or higher or CVSNT) then, as others have said, after having logged in

cvs ls

should work just fine.

If your version of CVS/CVSNT does not support the ls command then you can try

cvs checkout -c

which will only dump the list of predefined modules.

If your version of CVS/CVSNT is old enough you might get lucky with the following hack (does not work with more recent versions of CVSNT unless compatibility mode has been enabled on the server):

First check out the root of the repository to some temp location , so we have the necessary metadata:

cvs -d[your CVSROOT string] co -l -dTemp .

Then simulate an update (with directories) of that folder:

cd Temp
cvs -n up -d

This will emit (almost) the same output as an actual checkout without actually getting the files from the server.

If you're on Windows and using a fairly recent version of CVSNT as the client then cvs ls will actually automatically fall back to this mechanism when it detects a server that does not support ls itself.


Oh yes, and AFAICT there is no such thing as cvs -list. It's not even valid CVS command line syntax: -list would have to be a global argument rather than a command as it follows directly after the cvs and there is no actual command specified. But then again, all multi-letter arguments (such as --help) would have to start with a double dash, e.g. cvs --version. Were you all maybe thinking of cvs list which would be a mere alias for cvs ls?

cvs -d $CVSROOT rls

hope this helps (cvs ver. 1.12.13)

You need to do a login first, like this:

cvs -d :pserver:anonymous@evocms.cvs.sourceforge.net:/cvsroot/evocms login

Then, as others have said, use the ls command.

For background, see a discussion of remote repositories

Mauricio Solórzano

This is what I use. msolorzano is my login, and password, and "Deployer" is the module:

cvs -d :pserver:msolorzano:password@gtess-cvs:/cvsdata/data1 rlog -R Deployer

...as a matter of fact, you can vet a cvs list of files in a "clean way" if you are executing commands in a UNIX/Linux environment, like this:

cvs -d :pserver:msolorzano:password@gtess-cvs:/cvsdata/data1 rlog Deployer | grep  ',v' | sed 's/RCS file: //g' | sed s/,v//g

there is a similiar command in cvs

Usage: cvs ls
cvs -list to list modules, ls to list contents of modules.

EDIT: They are right, the commands list and ls are the same, I´m sorry for that.

well I don´t really see how to list a cvs dir without actually checking it out. Does the repo your are trying to access have a cvsweb access?

see cvs commands

for example;

cvs list

will list all modules in CVS server

All,

Here is a comprehensive way to do it:

  1. Fire up the command prompt
  2. Copy this cvs -d CVSROOT login (or, whatever your corresponding CVSROOT is)
  3. Type in your password and press enter when prompted. It may take a while, but after that is done, a new prompt will be available.
  4. Type in cvs –d cvs -d CVSROOT ls
  5. BAM! There's your listing

Keep in mind, if you don't have CVSROOT defined, you can just copy and paste your own CVSROOT here.

sandy

cvs -d [CVS_ROOT] rlog {module_name}

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!