API for check

Martin Pool mbp at sourcefrog.net
Mon May 11 02:09:09 BST 2009


2009/5/8 Robert Collins <robert.collins at canonical.com>:
> So, to get check reporting all errors, we need to stop raising
> BzrCheckError in bzr check; rather we need to accumulate errors and
> report them.

Agree.

> I'm thinking of just adding a 'was_ok' attribute to the Check*Result
> objects; programmers can then use that for flow control if desired.

I'd maybe even make it a method, if it's going to be a derived value
from whether there were errors or not.  But that's kind of a small
point.

To me it seems like the bigger question is whether it's going to just
return a result at the end, or whether there should maybe be a
reporter that's updated as it goes along, which would let it take
charge of reporting results to the user, and perhaps in future doing
some kind of interaction with them (like, "fix/ignore/abort"??)


-- 
Martin <http://launchpad.net/~mbp/>



More information about the bazaar mailing list