API issues

Martin Pool martinpool at gmail.com
Thu Sep 15 12:35:04 BST 2005


> smart_add_branch() is great, we can pass in a branch object and a
> reporter callback function and get the feedback we need.  Though it
> feels wrong calling a separate function -- could this not be bzrlib.add
> itself?
> 
> Could we have something like this interface for .remove() as well?
> Right now we're having to do half the work ourselves to figure out what
> to pass to Branch.remove() and what it's likely to actually remove.
> Being able to have a reporter function for this would be a god-send.
> 
> Same for branch.commit(), as well as having verbose off by default --
> perhaps implementing that for bzr as a reporter function instead?
> 
> It'd also be kinda cool if the reporter function happened before the
> event, so you could raise an exception there if something's about to
> happen that you don't want.

They're all good ideas.  I was just wondering today whether there was
any point in the commit making a plan first, passing that back to the
caller, and then proceeding.  I'll try to do them; remind me if I
don't.

Cheers

-- 
Martin




More information about the bazaar mailing list