Request: post-commit hook needs more info

Martin Pool mbp at sourcefrog.net
Thu Oct 18 01:33:54 BST 2007


On 10/18/07, John Arbash Meinel <john at arbash-meinel.com> wrote:

> It really seems like we should be passing a nice Object to the function
> callback, rather than making the list of parameters longer and longer. It makes
> upgrading the amount of data easier (since you aren't passing 10 arguments to
> one that only expects 8), and it makes it a bit cleaner (I really don't like
> functions with more than 5 or so arguments).
>
> Any thoughts about what else we could do?

I changed the push and pull hooks to use Result objects, and I'd
suggest the same thing here.  As well as passing the result to the
hook, it can also be returned from the overall push or pull or commit
operation, which gives a reasonable way for different uis to display
the result.


-- 
Martin



More information about the bazaar mailing list