[MERGE] Output refactoring and XML integration into bzrlib

Martin Albisetti argentina at gmail.com
Sat Nov 10 06:24:54 GMT 2007


Hello everyone.

After months of working on bzr-xmloutput with Guillermo Gonzalez, we
came to the conclusion that the only way to reasonably maintain and
extend it, was to change the way some of the output was handled in
bzrlib itself.
So, after 8 hours of sprinting, we came up with enough code for review.

The code is mostly a proof-of-concept, and the main goal of sending it
to the list is to get some feedback on better ways to implement
different types of output.

While Guillermo's is the main driver (and coder) behind xml output, I
would personally like bzr to make it easier for other plugins to
extend to different types of output (html, csv, etc).

The model we used to define the new method of output was to move all
print statements into a formatters hierarchy, in a way that each new
formatter can take care of the way things are printed out, and not how
the information itself is obtained.

It's a big step, but we did feel that some considerable code
refactoring was needed in those areas, as the only way to currently
achieve xml output was by reimplementing bzrlib code and overriding
the cmd. This does not make it easy/desirable to maintain the code on
a long term basis.

We're more then open to receive as much criticism as needed, we're
eager to learn  :D


Martin / Guillermo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: xml_integration.patch
Type: text/x-diff
Size: 106027 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20071110/3a968424/attachment-0001.bin 


More information about the bazaar mailing list