Added XML output for hg log
authorRobert Bachmann <rbachm@gmail.com>
Mon, 28 Dec 2009 16:48:57 +0100
changeset 10153 000546ec7ced
parent 10152 56284451a22c
child 10155 df7fc77533fb
child 10156 c31ac3f7fd8f
Added XML output for hg log The XML format is based on the one used by Subversion. Currently the closing "</log>" tag is not written, since cmdutil.py does not support the "footer" template variable.
mercurial/templates/map-cmdline.xml
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial/templates/map-cmdline.xml	Mon Dec 28 16:48:57 2009 +0100
@@ -0,0 +1,17 @@
+header = '<?xml version="1.0"?>\n<log>\n'
+footer = '</log>\n'
+
+changeset = '<logentry revision="{rev}" node="{node}">\n{branches}{tags}{parents}<author email="{author|email|xmlescape}">{author|person|xmlescape}</author>\n<date>{date|rfc3339date}</date>\n<msg xml:space="preserve">{desc|xmlescape}</msg>\n</logentry>\n'
+changeset_verbose = '<logentry revision="{rev}" node="{node}">\n{branches}{tags}{parents}<author email="{author|email|xmlescape}">{author|person|xmlescape}</author>\n<date>{date|rfc3339date}</date>\n<msg xml:space="preserve">{desc|xmlescape}</msg>\n<paths>\n{file_adds}{file_dels}{file_mods}</paths>\n{file_copies}</logentry>\n'
+
+file_add  = '<path action="A">{file_add|xmlescape}</path>\n'
+file_mod  = '<path action="M">{file_mod|xmlescape}</path>\n'
+file_del  = '<path action="R">{file_del|xmlescape}</path>\n'
+
+start_file_copies = '<copies>\n'
+file_copy = '<copy source="{source|xmlescape}">{name|xmlescape}</copy>\n'
+end_file_copies = '</copies>\n'
+
+parent = '<parent revision="{rev}" node="{node}" />\n'
+branch = '<branch>{branch|xmlescape}</branch>\n'
+tag = '<tag>{tag|xmlescape}</tag>\n'