bzr countlog plugin
This is a plugin for Bazaar a distributed version control system.
It allows you to produce a file listing how many time each file has been updated and when the last update was. This is helpful when attempting to determine which files are more actively worked on than others. Just to paraphrase, the "count" in "countlog" is how many times a file is modified. The output is sorted first by the modification count and then by the date of the last modification, so if there are 20 files that have been modified 5 times, the most recent ones will sort higher.
I use Bazaar to keep track of my system's configuration files automatically. Having a list of what files have changed and how often they change is helpful in many ways. I use it during OS upgrades, backup and restore, and it is a helpful troubleshooting tool. If I know that X broke after a certain day, I can see what configurations have changed since then. Then I can use bzr to see what those changes actually were.
Installing Countlog
Just put countlog.py in your bzrlib dir. The location of this directory will depend on your operating system and distribution. Make sure it is world readable. Then run "bzr log --help" and you should see "--count" as one of the log format options.
Running Countlog
Go to a bzr repository and type "bzr log -v --count". It will think for a long time before producing anything. I recommend capturing the output to a file, E.G. "bzr log -v --count > count.log" or "bzr log -v --count | tee count.log". The "-v" is required.
Bugs
- The help text doesn't contain a description.
- It should assume '-v' automatically somehow
- really long file paths will wrap in an ugly way
It I don't have time to figure out how to do these. Patches welcome! <dmartin@cpan.org>
Example Output
The output looks like this:
resolv.conf 004 2008/07/22
ssh/ssh_known_hosts 004 2008/11/15
passwd 005 2008/01/04
php.ini 005 2008/01/30
group 007 2008/11/05
blkid/blkid.tab 008 2007/08/27
sysconfig/iptables 008 2008/04/17
shadow 008 2008/10/02
httpd/conf/httpd.conf 010 2008/11/05
aliases.db 024 2008/01/29
