Intelligent docbook merging?

Russel Winder russel at russel.org.uk
Thu Feb 24 12:47:28 UTC 2011


Nick,

On Thu, 2011-02-24 at 13:15 +0100, Nicholas Allen wrote:
> Hi,
> 
> We're thinking of using Bazaar to manage the authoring of a docbook
> document. Some of our developers like to work with the XML text files
> directly in a text editor and others prefer more WYSIWYG editors that
> change the formatting of the document when they save (eg inserting white
> space).

I would love to know an answer to this that doesn't involve banning the
use of the WYSIWYG tools.  I toyed with using XXE as a DocBook/XML
editor but it is forever reformatting unchanged material, which is a
serious no-no for version control.

> Bazaar just tries to resolve conflicts using the raw text but I was
> wondering if there's a way to make Bazaar more intelligent for this use
> case and understand the semantics of the XML docbook document. The white
> space is not really important and theoretically a much better merge
> could be achieved using the semantics of the XML document.
> 
> Does anyone know if this is possible? Is there a plugin that can do this?

I guess what is needed is a fascist reformatting of the XML file prior
to commit according to some ruleset such that random reformatting of the
file doesn't lead to changes on commit.  Bazaar has pre-commit hooks
that would allow it, but the obvious problem is that you can't risk
committing with the file open in case the tools do not observe the
changed file.

A tool/framework for coping with this would be a great step forward for
DocBook/XML authoring. 

-- 
Russel.
=============================================================================
Dr Russel Winder      t: +44 20 7585 2200   voip: sip:russel.winder at ekiga.net
41 Buckmaster Road    m: +44 7770 465 077   xmpp: russel at russel.org.uk
London SW11 1EN, UK   w: www.russel.org.uk  skype: russel_winder
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <https://lists.ubuntu.com/archives/bazaar/attachments/20110224/014bbaf0/attachment.pgp>


More information about the bazaar mailing list