No subject


Fri Dec 18 02:33:18 GMT 2009


within the TreeDelta class (with a 'short' knob to switch between the two
available output types). This makes it very difficult to provide other
output types from within bzr, let alone from a plugin.

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

Thoughts ?

Thanks for your time,
Arnaud

--000e0cd1a6e8955c4504804c64e5
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

Good evening,<br><br>I have been reading this list (and using Bazaar) for s=
ome time, but this is my first email to the list. Please be gentle :)<br><b=
r>I have been looking at implementing alternate outputs for the bzr status =
command. This was triggered by jealousy after looking at some outputs comin=
g out of projects using git=C2=A0 (e.g.list of files changed with their num=
ber of modified lines, percentage of lines changed across directories, etc.=
.. the kernel mailing list is full of it)<br>
<br>I set out to write my first (lousy) plugin to try to scratch my itch...=
 and ended up stuck 10 minutes ago, with way too much code duplicated=C2=A0=
 in my _init.py :(<br><br>From what I understand now, all the display logic=
 for &#39;status&#39; is contained within the TreeDelta class (with a &#39;=
short&#39; knob to switch between the two available output types). This mak=
es it very difficult to provide other output types from within bzr, let alo=
ne from a plugin.<br>
<br>Would it make sense to abstract out the output formatting for status ? =
I imagine it could be possible to create a new class (OutputFormat, OutputT=
emplate, whatever) and <br>- pass the OutputFormat in a TreeDelta.show() (v=
isitor pattern), <br>
- or move the show() logic to OutputFormat and have it wrap a TreeDelta, <b=
r>- or something else<br><br>Thoughts ?<br><br>Thanks for your time,<br>Arn=
aud<br><br>

--000e0cd1a6e8955c4504804c64e5--



More information about the bazaar mailing list