Patchwork [3,of,7] pager: drop the 'color' dependant code

login
register
mail settings
Submitter Pierre-Yves David
Date Feb. 28, 2017, 7:25 p.m.
Message ID <c65f0cd7a22844c071c8.1488309943@nodosa.octopoid.net>
Download mbox | patch
Permalink /patch/18844/
State Accepted
Headers show

Comments

Pierre-Yves David - Feb. 28, 2017, 7:25 p.m.
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@ens-lyon.org>
# Date 1488309128 -3600
#      Tue Feb 28 20:12:08 2017 +0100
# Node ID c65f0cd7a22844c071c888cdd10c2cd625e766c5
# Parent  a6afcb4e81ed425c633c206f121c5820ac91b0b0
# EXP-Topic color
pager: drop the 'color' dependant code

The 'color' implementation is in core and no longer wrap '_runcommand'. We drop
the extra complexity.

Patch

diff --git a/hgext/pager.py b/hgext/pager.py
--- a/hgext/pager.py
+++ b/hgext/pager.py
@@ -66,12 +66,7 @@  def uisetup(ui):
                 ui.pager('extension-via-attend-' + cmd)
         return orig(ui, options, cmd, cmdfunc)
 
-    # Wrap dispatch._runcommand after color is loaded so color can see
-    # ui.pageractive. Otherwise, if we loaded first, color's wrapped
-    # dispatch._runcommand would run without having access to ui.pageractive.
-    def afterloaded(loaded):
-        extensions.wrapfunction(dispatch, '_runcommand', pagecmd)
-    extensions.afterloaded('color', afterloaded)
+    extensions.wrapfunction(dispatch, '_runcommand', pagecmd)
 
 attended = [
     'the-default-attend-list-is-now-empty-but-that-breaks-the-extension',