• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

a little scripting challenge

kamper

Diamond Member
Ok, here's the scenario:

<preamble>
I have a cvs checkout that I want multiple people to use (same checkout, not just the same repository). I want them each to be able to commit using their own cvs account. I know this is not ideal, but these are non-technical people and I the idea was to have them all work on the same set of files without worrying about deploying them (it's a website).

The problem is that cvs keeps a cvsroot for the entire checkout, stored in each CVS\Root file. This cvsroot includes my user name and now cvs won't let anyone commit without logging in as me. If you know of an easy way to switch cvsroots I'll take that but otherwise I have to do in a little more manually.
</preamble>

<challenge>
I need a script that will traverse a folder structure, find all the CVS\Root files (which consist of a single line like so : pserver:user.name@servername:/usr/local/cvsroot) and change the user.name to a different user.name. You can use anything that comes with an xp pro install or basic unix utilities (unxutils.sourceforge.net) or something else that is easy to install.
I will personally be writing an ant/java solution but I'd like to see if anyone comes up with something smoother (and I'm sure you can 🙂).
</challenge>

Edit: damn, I should remember that you can't post 😛server: on any sort of chat program...
 
They cannot use their own accounts to commit stuff because of this file? I'm guessing something is setup wrong, since plenty of LARGE development groups use CVS without issues...
 
CVS/Root
Pathname to the repository ( CVSROOT ) location at
the time of checkout. This file is used instead of
the CVSROOT environment variable if the environment
variable is not set. A warning message will be
issued when the contents of this file and the CVS-
ROOT environment variable differ. The file may be
over-ridden by the presence of the
CVS_IGNORE_REMOTE_ROOT environment variable.
 
Originally posted by: n0cmonkey
They cannot use their own accounts to commit stuff because of this file? I'm guessing something is setup wrong, since plenty of LARGE development groups use CVS without issues...
The setup is definitely not the recommended usage of cvs. Ordinarily each developer will work with their own checked out version of the code. The reason this is different is because it's a test website (a mirror of the corporate one) and the files under cvs control are also the same ones deployed under jboss. Normally, each user would have their own copy of the code and when they finish making changes they would deploy the files to jboss using a build script. Because the users are non-technical types and because the build step is really unnecessary I want to only have one checked out version.
Originally posted by: n0cmonkey
CVS/Root
Pathname to the repository ( CVSROOT ) location at
the time of checkout. This file is used instead of
the CVSROOT environment variable if the environment
variable is not set. A warning message will be
issued when the contents of this file and the CVS-
ROOT environment variable differ. The file may be
over-ridden by the presence of the
CVS_IGNORE_REMOTE_ROOT environment variable.
😱 I have to admit, trying to override it with environment variables had not occured to me. That sounds like a perfect solution, as each user will be logged in under a different account. This isn't the commandline client (it's WinCvs) but it does use a version of it so hopefully it will still work as documented. This should be as easy as setting CVSROOT in combination with %USERNAME% 🙂.

notfred, thanks for your contribution. If I had perl installed on any of the machines I have available I would certainly give that a try 😛
 
Originally posted by: kamper
notfred, thanks for your contribution. If I had perl installed on any of the machines I have available I would certainly give that a try 😛

You said, "or anything else that's easy to install". ActivePerl.
 
It's a no go on the CVS_IGNORE_REMOTE_ROOT. That was only applicable to older versions of the client. I don't understand why they had to remove it 🙁

Anyways, next up is java and/or perl...
 
Back
Top