3

I'm running CVS in a bash shell.

I'm just trying to see which modules are available for checkout.

I've been researching for a while and the only thing I've come up with is:

cvs checkout -c

which executes but shows nothing. Now I know its possible that there may just be no modules to checkout, but thats more of a guess to me at this point, and settling for guesses rarely works out well.

UPDATE:

Im running version 1.11.23

apparently this version doesn't support cvs ls Cheers.

  • cvs checkout -c shows you the contents of the CVSROOT/modules file but that file needs to be manually updated. – Etan Reisner Aug 9 '13 at 22:29
1

The following hackery should work with 1.11.* client and server versions of cvs. I imagine it will work with others but those are the versions I have locally to test with.

mkdir -p dummy/CVS
cd dummy
echo . > CVS/Repository
touch CVS/Entries
cvs -d$CVSROOT -n co . | awk '{print $5}'

To apply this to arbitrarily nested directories in the cvs hierarchy the matching local directories must also exist. To find the directories available under $CVSROOT/test_project/some_subdir (for example) the following appears to work.

cd dummy
mkdir -p test_project/some_subdir
cvs -d$CVSROOT -n co test_project/some_subdir

Drop the awk if that doesn't show what you expect. The output might differ slightly from what I got.

If you are speaking the cvs wire protocol directly you can do a similar thing without the directory hackery I believe but I'd have to dig a bunch more to sort that out again. (I believe Zend/Eclipse does that when it detects an older cvs server version.)

  • I'll test this by Monday. Sorry, on holiday til then. – Rooster Aug 10 '13 at 4:32
  • cvs -d[CVSROOT] -n co . | awk '{print $5}' triggers the following error: – Rooster Aug 13 '13 at 14:03
  • cvs checkout: CVSROOT must be an absolute pathname (not [CVSROOT]') cvs checkout: when using local access method. cvs [checkout aborted]: Bad CVSROOT: [CVSROOT]'. – Rooster Aug 13 '13 at 14:04
  • That wasn't intended to be a literal string. That was a placeholder. I probably should have used $CVSROOT there or something. You need to use your normal -d string (or leave it off if your environment is set up to not need one (though I'm not sure that works for this case)). – Etan Reisner Aug 13 '13 at 14:06
  • ah! That worked for the top level stuff! To go one level deeper would I need to actually checkout one of those or just add the extra layer of path to my cvsroot? – Rooster Aug 13 '13 at 14:24
3

if your cvs version is new enough, you should be able to do a

cvs ls

if not, you can probably just go to the cvs server to examine the repo itself.

  • thanks for the help. Apparently my version doesn't support that. I updated the question with the cvs version as I forgot I could do a 'man cvs' to find out some things – Rooster Aug 9 '13 at 21:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.