cvs status parser script
As other people already found out, the cvs status output sucks pretty much. I found some simple bash scripts to make them a little more useful, but then I quickly wrote a simple MIT-licensed python script that creates an output like modern scms do. It can be downloaded from my Fedorapeople space. Luckily Fedora will anyhow move to git, soon, so I won’t have to use CVS that much anymore then.
It will fail, if files are in a state unknown to the script, but it should cover the most common states (read: the states I found in my cvs checkout). Feel free to report any states that it should handle and I’ll update it.
Here is some example output (I defined an cvss alias for it):
$ cvss
? unknown
O common/Makefile.common
O devel/Makefile
? devel/xz-4.999.8beta
? devel/xz-4.999.8beta.tar.gz
M devel/xz.spec
O EL-5/Makefile
As you can see, it sorts the output and also handles subdirs
January 31st, 2010 at 10:56 +01:00
We (KDE) had (and still have, actually) some scripts for slightly easier CVS handling:
see http://websvn.kde.org/trunk/KDE/kdesdk/scripts/ (the various cvs*).
February 1st, 2010 at 8:12 +01:00
You can just use “cvs -n -q update” to get a status output like that. (The “-n” makes it not actually perform the update, the “-q” suppresses the “cvs update: Updating .” type messages.) This trick is what Cervisia uses. The output is basically equivalent to your script.
February 1st, 2010 at 19:42 +01:00
@pinotree:
That’s interesting, there seems to be a script included that gets the update information from the CVS directory without needing a network connection.
@Kevin:
Thx, that’s quite useful, too.