changeset 11441:d74fe370ab04 stable

cmdutil: only output style header once in non-buffered mode (issue2130)
author Simon Howkins <simonh@symbian.org>
date Thu, 24 Jun 2010 15:18:47 +0100
parents 5fe4302cfd72
children ee1ed6afac21
files mercurial/cmdutil.py
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/cmdutil.py	Wed Jun 23 13:38:52 2010 -0500
+++ b/mercurial/cmdutil.py	Thu Jun 24 15:18:47 2010 +0100
@@ -687,6 +687,7 @@
         self.patch = patch
         self.diffopts = diffopts
         self.header = {}
+        self.doneheader = False
         self.hunk = {}
         self.lastheader = None
         self.footer = None
@@ -905,7 +906,9 @@
                 if self.buffered:
                     self.header[ctx.rev()] = h
                 else:
-                    self.ui.write(h)
+                    if not self.doneheader:
+                        self.ui.write(h)
+                        self.doneheader = True
 
             # write changeset metadata, then patch if requested
             key = types['changeset']