[RFC] PushResult.report is in the wrong place?

John Arbash Meinel john at arbash-meinel.com
Wed May 23 10:42:55 BST 2007


Robert Collins wrote:
> I think that PushResult objects are good - they encapsulate the state
> built up during the push, but that report is a UI layer function, not a
> core library function. Specifically its no use for GUI's (you end up
> reporting to stringio and then showing that (blech) or not using report
> at all (and missing out on tag stuff), and when you have custom Branch
> classes the tag reporting stuff interacts somewhat too.
> 
> One axis here is the Branch class: what the branch has that can be
> altered during a push/pull. We're kindof showing a difference between
> branches here.
> Another axis is the output style wanted - GUI, minimal CLI, detailed
> CLI.
> 

...

> Also, if this makes sense I'd like us to add a 'red flag' during reviews
> for anything that contains presentation logic in
> branch/workingtree/repository or related modules.
> 
> Any thoughts?
> 
> -Rob
> 

I think it is a good idea to separate out presentation logic from our 
"core" objects (branch/wt/repo).
In some ways it may be enough to extend the 'ui_factory' so that it is 
able to present different objects. That is, after all, what it is there for.

John
=:->



More information about the bazaar mailing list