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.

Rooster
  • 485
  • 2
  • 7
  • 21

2 Answers2

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.

johnshen64
  • 5,747
  • 23
  • 17
  • 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 09 '13 at 21:43
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.)

Etan Reisner
  • 1,353
  • 6
  • 14
  • I'll test this by Monday. Sorry, on holiday til then. – Rooster Aug 10 '13 at 04: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
  • I'm not sure but I would imagine you would just need to add the path to the cvsroot. Try it and let us know. =) – Etan Reisner Aug 13 '13 at 14:26
  • no that didn't work, but I'm thinking that if I go into that directory instead of running this from my base directory and do this process, it should probably work. THanks. – Rooster Aug 13 '13 at 14:28
  • The directory you are trying to look at needs to exist locally but that seems to be the only requirement. So `mkdir subpath` then `cvs ... co subpath` seems to work. – Etan Reisner Aug 13 '13 at 14:41
  • could you update your answer to reflect this with an example subpath named 'test_projects' if its not too much trouble? – Rooster Aug 13 '13 at 14:43