changeset 4351:3380eb6d7c32

fix 'hg <not-log> -v --template foo' with revisions without copies
author Alexis S. L. Carvalho <alexis@cecm.usp.br>
date Mon, 16 Apr 2007 13:00:23 -0300
parents b633f470944e
children 051fb8c2567c
files mercurial/cmdutil.py tests/test-command-template tests/test-command-template.out
diffstat 3 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/cmdutil.py	Mon Apr 16 09:51:50 2007 -0500
+++ b/mercurial/cmdutil.py	Mon Apr 16 13:00:23 2007 -0300
@@ -224,7 +224,7 @@
             return 1
         return 0
 
-    def show(self, rev=0, changenode=None, copies=None, **props):
+    def show(self, rev=0, changenode=None, copies=(), **props):
         if self.buffered:
             self.ui.pushbuffer()
             self._show(rev, changenode, copies, props)
--- a/tests/test-command-template	Mon Apr 16 09:51:50 2007 -0500
+++ b/tests/test-command-template	Mon Apr 16 13:00:23 2007 -0300
@@ -39,6 +39,9 @@
 hg log --debug --style default > style.out
 diff log.out style.out
 
+echo '# revision with no copies (used to print a traceback)'
+hg tip -v --template '\n'
+
 echo '# compact style works'
 hg log --style compact
 hg log -v --style compact
--- a/tests/test-command-template.out	Mon Apr 16 09:51:50 2007 -0500
+++ b/tests/test-command-template.out	Mon Apr 16 13:00:23 2007 -0300
@@ -2,6 +2,8 @@
 #  normal
 #  verbose
 #  debug
+# revision with no copies (used to print a traceback)
+
 # compact style works
 4[tip]   32a18f097fcc   1970-01-17 04:53 +0000   person
   new branch