status command and output styles

Russ Brown pickscrape at gmail.com
Thu Feb 25 21:31:57 GMT 2010


On Thursday 25 February 2010 12:33:39 am Martin Pool wrote:
> On 24 February 2010 09:51, arnaud jeansen <arnaud.jeansen at gmail.com> wrote:
> > Would it make sense to abstract out the output formatting for status ? I
> > imagine it could be possible to create a new class (OutputFormat,
> > OutputTemplate, whatever) and
> > - pass the OutputFormat in a TreeDelta.show() (visitor pattern),
> > - or move the show() logic to OutputFormat and have it wrap a TreeDelta,
> > - or something else
> 
> Yes, it would be good to abstract it more.  Ian and Vincent have
> recently done some things here and could probably mentor you.

Just to interject an aside here, but quite a while back I was looking at ways 
to improve how bzr-diffstat works: it currently parses the raw text output by 
diff and calculates its statistics based on that. It would obviously be far 
more efficient to be able to access the raw diff data itself (in whatever form 
that takes) and generate statistics from that. Currently, bzr spends time 
formatting a textual diff that is never going to be displayed, which is 
obviously a waste of effort.

I remember asking about it at the time but I don't think the required 
information was available. Any idea how difficult it would be to expose that 
detail for use in situations like this?

-- 

Russ



More information about the bazaar mailing list