views:

854

answers:

1

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?

+2  A: 

If you're using pre_commit hook then your hook function will get tree_delta as one of argument (see doc on hook signatures). You need to use tree_delta object 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.

bialix
Awesomeness, thanx!
Jrgns