Stuart R Dole writes:
> I've discovered that when I cd into a working directory,
> after logging-in to cvs, that cvs doesn't like me to do
> things unless the name in CVS/Root is me. This makes sense,
> but since there's several of us that telnet into the
> "workstation" and modify files, each one needs to edit the
> file CVS/Root to match themselves. (I haven't figured out a
> good way to simply let each user have his/her own working
> directory -- there's one working directory on the
> workstation that we all share, because of the way all the
> scripts are set up... The workstation is really an embedded
> system with custom hardware on it that we're constantly
> testing.)
>
> So, is there a simple way to tell CVS that a new guy is now
> in the working directory and messing with the files, other
> than manually editing the CVS/Root file? If I do this, is
> there more I need to be doing too?
Ignoring problems with file and directory permissions associated with
having multiple users playing around in the same sandbox (which I'm
assuming you've already worked out), if you're using rsh client-server
(rather than pserver), when you do the initial checkout just omit the
username from the CVSROOT specification - it will assume the current
username. So, for example, instead of setting CVSROOT to:
[EMAIL PROTECTED]:/cvsroot
you would set it to:
cvsserver.company.com:/cvsroot
If you're logged into the local machine as joeblow at the time you do
the checkout, it will do the checkout in the name of joeblow, and set
all the CVS/Root files to "cvsserver.company.com:/cvsroot". After that
time, whatever user is currently logged in will be used for the rsh to
the cvs server for subsequent cvs commands.
This doesn't work in pserver mode, and doesn't work if the client
machine has no concept of "user". I have used it in the past on Unix
boxes to allow other users to do cvs diff in my work directories,
though, and it works just fine.
Note that you can also start doing this after the fact - just do a short
shell script to replace all the CVS/Root files with new files that have
the proper CVSROOT setting.