[PATCH] commit code cleanup

Andrew Bennetts andrew at canonical.com
Mon May 28 08:28:08 BST 2007


Ian Clatworthy wrote:

This isn't a full review, just a quick note...

[...]
> +++ bzrlib/commit.py
> @@ -106,32 +106,33 @@
>  
>  class ReportCommitToLog(NullCommitReporter):
>  
> -    # this may be more useful if 'note' was replaced by an overridable
> -    # method on self, which would allow more trivial subclassing.
> -    # alternative, a callable could be passed in, allowing really trivial
> -    # reuse for some uis. RBC 20060511
> +    # a callable could be passed in, allowing really trivial
> +    # reuse for some UIs. RBC 20060511
> +
> +    def _note(self, format, *args):
> +        note(format, *args)

This comment is now a bit too terse, it's not immediately obvious what it's
context is.

Also, _note could use a docstring noting that it's intended to be overridden in
subclasses.  I'm curious about this; what specific uses for this do you have in
mind?  This refactoring is unused in this patch, I guess you use it in a later
one?

-Andrew.




More information about the bazaar mailing list