Mercurial > hg-stable
comparison tests/test-command-template @ 6174:434139080ed4
Permit XML entities to be escaped in template output.
Useful for creating XML documents directly from Hg logging. Can also be used for
HTML. For use in content, will escape '&', '<', and for completeness '>'
(although it is not strictly necessary). For use in attributes, will also escape
' and ". Will also replace nonprinting (ASCII) control characters with spaces,
since these are illegal in XML.
author | Jesse Glick <jesse.glick@sun.com> |
---|---|
date | Mon, 28 Jan 2008 22:19:12 -0500 |
parents | db6633f11d59 |
children | 9a9b02bcbcf4 |
comparison
equal
deleted
inserted
replaced
6173:963000ed8cac | 6174:434139080ed4 |
---|---|
104 hg log --template '{date|date}\n' | 104 hg log --template '{date|date}\n' |
105 hg log --template '{date|isodate}\n' | 105 hg log --template '{date|isodate}\n' |
106 hg log --template '{date|rfc822date}\n' | 106 hg log --template '{date|rfc822date}\n' |
107 hg log --template '{desc|firstline}\n' | 107 hg log --template '{desc|firstline}\n' |
108 hg log --template '{node|short}\n' | 108 hg log --template '{node|short}\n' |
109 hg log --template '<changeset author="{author|xmlescape}"/>\n' | |
109 | 110 |
110 echo '# formatnode filter works' | 111 echo '# formatnode filter works' |
111 echo '# quiet' | 112 echo '# quiet' |
112 hg -q log -r 0 --template '#node|formatnode#\n' | 113 hg -q log -r 0 --template '#node|formatnode#\n' |
113 echo '# normal' | 114 echo '# normal' |