I want to write a Bazaar plugin that performs some actions one the modified files before they are committed. Things like checking for syntax errors, and warning the commiter if there are still TODO's in the file.
How do I get a list of the modified files in a Bazaar plugin?
If you're using
pre_commithook then your hook function will gettree_deltaas one of argument (see doc on hook signatures). You need to usetree_deltaobject to access list of added/modified/renamed files. Documentation of TreeDelta class is available here.Example of pre_commit hook code you can see here.