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

Pierre-Yves David pierre-yves.david at ens-lyon.org
Tue Feb 28 14:25:43 EST 2017


# HG changeset patch
# User Pierre-Yves David <pierre-yves.david at 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.

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',


More information about the Mercurial-devel mailing list