Posts Tagged ‘MIT’

cvs status parser script

Sunday, January 31st, 2010

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