Patchwork [4,of,5] ui: remove labeled argument from popbuffer

login
register
mail settings
Submitter Gregory Szorc
Date Nov. 24, 2015, 9:11 p.m.
Message ID <e3c27c5cece623b52b05.1448399501@gps-mbp.local>
Download mbox | patch
Permalink /patch/11608/
State Accepted
Headers show

Comments

Gregory Szorc - Nov. 24, 2015, 9:11 p.m.
# HG changeset patch
# User Gregory Szorc <gregory.szorc@gmail.com>
# Date 1448392990 28800
#      Tue Nov 24 11:23:10 2015 -0800
# Node ID e3c27c5cece623b52b053f84698446855e908396
# Parent  0815d0aba10f81ab688681254471e61b51aee064
ui: remove labeled argument from popbuffer

It was moved to pushbuffer and currently does nothing.

Patch

diff --git a/hgext/color.py b/hgext/color.py
--- a/hgext/color.py
+++ b/hgext/color.py
@@ -418,11 +418,11 @@  def configstyles(ui):
                             % (e, status))
             _styles[status] = ' '.join(good)
 
 class colorui(uimod.ui):
-    def popbuffer(self, labeled=False):
+    def popbuffer(self):
         if self._colormode is None:
-            return super(colorui, self).popbuffer(labeled)
+            return super(colorui, self).popbuffer()
 
         self._bufferstates.pop()
         return ''.join(self._buffers.pop())
 
diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py
--- a/mercurial/cmdutil.py
+++ b/mercurial/cmdutil.py
@@ -1187,9 +1187,9 @@  class changeset_printer(object):
     def show(self, ctx, copies=None, matchfn=None, **props):
         if self.buffered:
             self.ui.pushbuffer(labeled=True)
             self._show(ctx, copies, matchfn, props)
-            self.hunk[ctx.rev()] = self.ui.popbuffer(labeled=True)
+            self.hunk[ctx.rev()] = self.ui.popbuffer()
         else:
             self._show(ctx, copies, matchfn, props)
 
     def _show(self, ctx, copies, matchfn, props):
diff --git a/mercurial/ui.py b/mercurial/ui.py
--- a/mercurial/ui.py
+++ b/mercurial/ui.py
@@ -593,18 +593,10 @@  class ui(object):
         self._buffers.append([])
         self._bufferstates.append((error, subproc, labeled))
         self._bufferapplylabels = labeled
 
-    def popbuffer(self, labeled=False):
-        '''pop the last buffer and return the buffered output
-
-        If labeled is True, any labels associated with buffered
-        output will be handled. By default, this has no effect
-        on the output returned, but extensions and GUI tools may
-        handle this argument and returned styled output. If output
-        is being buffered so it can be captured and parsed or
-        processed, labeled should not be set to True.
-        '''
+    def popbuffer(self):
+        '''pop the last buffer and return the buffered output'''
         self._bufferstates.pop()
         if self._bufferstates:
             self._bufferapplylabels = self._bufferstates[-1][2]
         else: