Comment 4 for bug 322327

Revision history for this message
Robert Collins (lifeless) wrote : Re: [Bug 322327] Re: Integrated permissions/ownership diff output for etckeeper/bzr

I would make the iter_changes modifier a Tree hook. Should it modify
iter_changes for things other than diff? e.g. status (I assume yes)),
commit? revert?

I'd do Tree.hooks 'iter_changes' as the hook point.
parameter list of old_tree, new_tree, changes, [rest of iter_changes
normal parameters]. Thats so that you can correctly handle 'diff foo'
for instance.

For the hook to change the output diff shows, as its not structured or
semantic it should be up at the UI/command layer. I'd consider
CommandDiff.hooks or something like that. Again, ask yourself if it
should be getting used in things like status output, commit output etc.

Generally this is heading in a good direction, but I suspect it should
get good broad coverage to answer the questions I've been raising.

-Rob