mercurial/cmdutil.py
changeset 11061 51d0387523c6
parent 11059 ef4aa90b1e58
child 11152 e8d10d085f47
--- a/mercurial/cmdutil.py	Sat Apr 03 11:58:16 2010 +1100
+++ b/mercurial/cmdutil.py	Thu Apr 01 00:35:12 2010 +0900
@@ -803,11 +803,11 @@
 
     def showpatch(self, node):
         if self.patch:
+            stat = self.diffopts.get('stat')
+            diffopts = patch.diffopts(self.ui, self.diffopts)
             prev = self.repo.changelog.parents(node)[0]
-            chunks = patch.diffui(self.repo, prev, node, match=self.patch,
-                                  opts=patch.diffopts(self.ui, self.diffopts))
-            for chunk, label in chunks:
-                self.ui.write(chunk, label=label)
+            diffordiffstat(self.ui, self.repo, diffopts, prev, node,
+                           match=self.patch, stat=stat)
             self.ui.write("\n")
 
     def _meaningful_parentrevs(self, log, rev):
@@ -939,7 +939,7 @@
     """
     # options
     patch = False
-    if opts.get('patch'):
+    if opts.get('patch') or opts.get('stat'):
         patch = matchfn or matchall(repo)
 
     tmpl = opts.get('template')