--- a/mercurial/cmdutil.py Mon Nov 30 19:52:03 2009 +0100
+++ b/mercurial/cmdutil.py Mon Nov 30 22:23:09 2009 +0100
@@ -755,7 +755,8 @@
cache={
'parent': '{rev}:{node|formatnode} ',
'manifest': '{rev}:{node|formatnode}',
- 'filecopy': '{name} ({source})'})
+ 'filecopy': '{name} ({source})',
+ 'extra': '{key}={value|stringescape}'})
# Cache mapping from rev to a tuple with tag date, tag
# distance and tag name
self._latesttagcache = {-1: (0, 0, 'null')}
--- a/tests/test-command-template Mon Nov 30 19:52:03 2009 +0100
+++ b/tests/test-command-template Mon Nov 30 22:23:09 2009 +0100
@@ -93,7 +93,7 @@
echo "# keys work"
for key in author branches date desc file_adds file_dels file_mods \
- files manifest node parents rev tags diffstat; do
+ files manifest node parents rev tags diffstat extras; do
for mode in '' --verbose --debug; do
hg log $mode --template "$key$mode: {$key}\n"
done
--- a/tests/test-command-template.out Mon Nov 30 19:52:03 2009 +0100
+++ b/tests/test-command-template.out Mon Nov 30 22:23:09 2009 +0100
@@ -569,6 +569,33 @@
diffstat--debug: 1: +4/-0
diffstat--debug: 1: +2/-0
diffstat--debug: 1: +1/-0
+extras: branch=default
+extras: branch=default
+extras: branch=default
+extras: branch=default
+extras: branch=foo
+extras: branch=default
+extras: branch=default
+extras: branch=default
+extras: branch=default
+extras--verbose: branch=default
+extras--verbose: branch=default
+extras--verbose: branch=default
+extras--verbose: branch=default
+extras--verbose: branch=foo
+extras--verbose: branch=default
+extras--verbose: branch=default
+extras--verbose: branch=default
+extras--verbose: branch=default
+extras--debug: branch=default
+extras--debug: branch=default
+extras--debug: branch=default
+extras--debug: branch=default
+extras--debug: branch=foo
+extras--debug: branch=default
+extras--debug: branch=default
+extras--debug: branch=default
+extras--debug: branch=default
# filters work
hostname