February 21, 2006
Cleaning up CVS Editors
Today I decided one thing I need to clean up before it's too late is the CVS editors list.
If you're not familiar with this, you can use CVS for versioning with watching enabled for explicit control over file editing. This means you're files are superficially protected (can override with chmod) as read only until a user issues a cvs edit
With watching enabled, you can also issue a cvs editors command to see who's editing what at any given moment. In our case, there are some files that were worked on years ago and never committed or unedited. These entries in the cvs editors list are from years ago, when CVS was on a different server. In a few cases the user who's "editing" the file doesn't even have an account on our machine.
So a cleanup is in order. For active users on the system with existing sandboxes, cleaning up the editors list is as simple as making commits or unediting files. For entries that are more historical in nature, CVS keeps track of the watchers and editors in the CVS directories in your CVSROOT tree in the fileattr file. With some care these can be removed. For our CVS, a snip from the fileattr file in one of the CVS dirs looks like:
Fbinary_data.dtd _watched= Fcourse.dtd _watched= Fdbcontent.dtd _watched=;_editors=user01>Mon Mar 17 20:57:08 2003 GMT+alfred+/home/user01/HSDB/HSCML/Rules;_watchers=user01>tedit+tunedit+tcommit Fdtdlist.xsl _watched= Fentities.dtd _watched=
Yes, user01 (name changed) hasn't worked in our system for nearing three years, and was working on a machine named alfred that's been out of existence for almost as long. I haven't read anything official, but was wiling to take the risk that if I removed that editing information and changed the entry for that file to match the others we'd be safe.
Fbinary_data.dtd _watched= Fcourse.dtd _watched= Fdbcontent.dtd _watched= Fdtdlist.xsl _watched= Fentities.dtd _watched=
After making the edits the dbcontent.dtd file no longer appears on the editors list and can be checked in/out just as expected.
There were only a handful of entries to clean up. It didn't warrant scripting something, but I can imagine if there's regular cleanup one might want to write something to automate the process.
Posted by mike at February 21, 2006 2:55 PM