Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

How can I list files CVS without an initial checkout?

In subversion I can simply do "svn ls http://svn.svn.com" in CVS how can I do this?

For example I've got this CVS connection:

 pserver:[email protected]:/cvsroot/evocms 

How can I list all files in it?

UPDATE:

I'm doing this:

c:\>set CVSROOT=pserver:[email protected]:/cvsroot/evocms c:\>cvs -list ---> doesn't work, prints out the help screen 
like image 892
dr. evil Avatar asked May 20 '09 18:05

dr. evil


People also ask

How do I update single files at CVS?

Modifying a single file in a single directoryVerify that no-one has modified the file in the repository since you checked it out. CVS should reply simply “M” meaning you have modified the file. Update the repository with your modified file. Delete local package dir and all sub-dirs.

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.


2 Answers

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?

like image 88
Oliver Giesen Avatar answered Oct 14 '22 06:10

Oliver Giesen


cvs -d $CVSROOT rls 

hope this helps (cvs ver. 1.12.13)

like image 43
franek Avatar answered Oct 14 '22 05:10

franek