[MERGE][RFC] post_change_branch_tip hook

Ian Clatworthy ian.clatworthy at internode.on.net
Tue Apr 1 09:31:13 BST 2008


Attached is an initial cut at supporting a new hook,
post_change_branch_tip. Once this particular hook is supported and
Andrew Bennetts adds the necessary glue to the Smart Server, I think
we'll have _the_ server-side hook many teams/tools are looking for and
not finding yet in Bazaar.

I *think* this is basically right design wise, i.e. parameters are
passed to the hook via a Params object so that parameters can be lazily
instantiated down the track if required. Do we want a branch field added
to the Params object though? And are the names of the field ok? I've
picked the (short) names to be consistent with the fields in PushResult
FWIW. Having said that, I decided to call the class *Params rather than
*Result because that seemed to make more sense. I'm happy to change that
though if people think I should.

The code still need tests and I'd welcome advice from the testing gurus
as to how best add those. In discussions with Andrew and John in
Chicago, their feeling was that branch_implementation tests were needed
so that we'd catch if and when a new branch format accidentally dropped
support for it (as happened with set_rh). What other tests would
developers like to see?

I've also "deprecated" set_rh by removing its description from the
documentation. It only works with older branch formats and we're not
planning to fix that because it can't be implemented efficiently.

Any other thoughts or comments?

Ian C.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: post-change-branch-tip-hook.patch
Type: text/x-patch
Size: 9777 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20080401/bebab0fd/attachment.bin 


More information about the bazaar mailing list