[MERGE] Output refactoring and XML integration into bzrlib

Martin Albisetti argentina at gmail.com
Sat Nov 24 03:02:55 GMT 2007


After talking it through with Guillermo again, we're going to try and
get some discussion going as to how we should proceed with this
change.
To give everyone a bit of insight into what we're talking about, I'll
go through what our train of thought was, to get where we are.
The main goal behind pushing this change in bzrlib is to be able to
get xml output of *all* commands, mainly because bzr-eclipse uses
this, and making users install an extra bzr plugin is not very
user-friendly.
Another good reason is that svn also has xml output in it's core, and
I'm sure we'll run into more then one use case from a potential
project migration.

This pushed us to review how bzr currently implements outputs, and how
we could best build around that without changing (or breaking) the
API. When we started to port the current bzr-xmloutput plugin code
into bzrlib, we realized we had the opportunity to abstract the way
output where handled, and pave the road for other types of outputs
(html, csv, etc) via plugins that wouldn't require copying and pasting
large chunks of code and overriding commands, making the code very
hard to maintain.

So the first patch we sent in had all of it, the class abstraction to
make different types of output trivial, and the XML output
implementation (plus tests).
We realized it was a much longer/complex code then we thought, and as
suggested, and split it up into smaller and more logical patches with
some PEP8 and other cleanups.

This is where we are today.

So now we have to decide which path to take. An easier, clearer
implementation which lets us output XML or plain text, but still
doesn't solve other types of outputs, or, go a step further and make
some deeper changes to allow us to define a pluggable abstract
interface for all output, and let the users/developers imaginations go
wild on how they want bzr to talk to them.

At this point we're going to stop hacking code around and wait for an
agreement on how this should be played out.

Sorry these emails always go out on friday evening, but that's when we
have time to get together and talk it over personally.


Cheers,


Martin



More information about the bazaar mailing list