fix 'hg <not-log> -v --template foo' with revisions without copies
authorAlexis S. L. Carvalho <alexis@cecm.usp.br>
Mon, 16 Apr 2007 13:00:23 -0300
changeset 4351 3380eb6d7c32
parent 4348 b633f470944e
child 4352 051fb8c2567c
fix 'hg <not-log> -v --template foo' with revisions without copies
mercurial/cmdutil.py
tests/test-command-template
tests/test-command-template.out
--- 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