Subject: Re: anoncvs server available
To: NetBSD-current Discussion List <current-users@NetBSD.ORG>
From: Greg A. Woods <>
List: current-users
Date: 01/08/2005 14:55:50
[ On Friday, January 7, 2005 at 23:36:42 (-0800), Wolfgang S. Rupprecht wrote: ]
> Subject: Re: anoncvs server available
> One embellishment you might want to do is to create hard links and
> have only to one real CVS/Root file.

I wouldn't do that -- though I'm not sure why not....  Perhaps just
because I've had my head stuck in the CVS code often enough over the
years to be afraid it'll break.  :-)

I wouldn't worry about not touching CVS/Root files which don't seem to
have the right content either.  In theory all files in a given module
should always be checked out from the same server, and if any CVS/Root
files are not right then they should be fixed, so the brute-force update
is best:

	find . -type f -print | fgrep CVS/Root | while read rfile; do
		echo "" > $rfile

Note that "cvs -d BLAH update" is _not_ recommended, IIRC.  It will not
update the CVS/Root files, and as a result it could very easily result
in an inconsistent working directory state.

One should only ever use the "cvs -d" parameter with the "checkout"

I would also recommend quite strongly _against_ ever setting $CVSROOT in
your environment (unless you have a local repository that you would
normally always want to use).  The primary reason why CVS stores the
repository information in the CVS/Root files is so that it will always
do the right thing by default (i.e. without '-d' or $CVSROOT) for any
existing working directory.  I.e. so long as you don't try to mess with
it manually then it will always do the right thing.  Normally of course
the $CVSROOT value is ignored and the content of the CVS/Root files is
preferred, but as per the manual:

     Once you have checked out a working directory, CVS stores the
     appropriate root (in the file `CVS/Root'), so normally you only
     need to worry about this when initially checking out a working

(The only tricky part is that CVS_RSH has to be set right each time if
you ever use any combination of "rsh" and "ssh" -- e.g. the former for
efficiency and better performance on an internal/private network.  I do
wish its value had been included in the CVS/Root files too!  The whole
idea of using environment variables with CVS should have been abolished
once CVS grew its network client/server ability.)

Ideally of course there should have been (or be) some way to do the
equivalent of the above little shell loop directly with the "cvs"
program, but sadly no such feature has been implemented yet, even though
it's an FAQ on the info-cvs list.

						Greg A. Woods

H:+1 416 218-0098  W:+1 416 489-5852 x122  VE3TCP  RoboHack <>
Planix, Inc. <>          Secrets of the Weird <>