[PATCH] XML output for hg log

Robert Bachmann rbachm at gmail.com
Mon Dec 28 19:08:39 CST 2009


> How difficult is it to add tests for XML output?
> We usually write short shell scripts, to check for the stability of
> output. Have a look for example at tests/test-log and
> tests/test-log.out
> You can find some documentation here
> http://mercurial.selenic.com/wiki/WritingTests
> I'd love to see a short test included with your patches :)

Sure, I will try to write the test tomorrow.

> On a related note, do we want to include XSD data if we start using XML output?
> I am wondering what will happen if we decided to extend the XML
> syntax, or change it later to include some other informations.
> If we don't use XSD/specify a schema, then any further moves will be
> painful, requiring users to follow carefully the changes to crew to
> make sure tools don't break.
> If, on the other hand, we use XSD and ensure that XML output is always
> compliant to our schema, we can simply rely on a versioned,
> well-documented XSD schema to document output history.
> I caught a related discussion on subversion-dev (
> http://svn.haxx.se/dev/archive-2005-07/1379.shtml )
>
> Any thoughts on this?

I will try to create a XSD schema file tomorrow.
It seems that SVN has RelaxNG schemas for its XML formats, for example [1].
In my opionion RelaxNG is easier to read than XSD, on the other hand I think
XSD is more widely known.
Anyway I don't feel strongly about which format to use.

Thanks,
 Robert Bachmann



[1] http://svn.apache.org/repos/asf/subversion/trunk/subversion/svn/schema/log.rnc


More information about the Mercurial-devel mailing list