Patchwork [8,of,8] pager: do not special case chg

login
register
mail settings
Submitter Jun Wu
Date Jan. 9, 2017, 11:12 p.m.
Message ID <38c6cb64c8d08e8b4c19.1484003548@x1c>
Download mbox | patch
Permalink /patch/18160/
State Accepted
Headers show

Comments

Jun Wu - Jan. 9, 2017, 11:12 p.m.
# HG changeset patch
# User Jun Wu <quark@fb.com>
# Date 1484002789 -28800
#      Tue Jan 10 06:59:49 2017 +0800
# Node ID 38c6cb64c8d08e8b4c19338010578f69f58ef705
# Parent  24c7b11cecd12762d8238ec96c748131877054be
# Available At https://bitbucket.org/quark-zju/hg-draft
#              hg pull https://bitbucket.org/quark-zju/hg-draft -r 38c6cb64c8d0
pager: do not special case chg

Since chg has its own _runpager implementation, it's no longer necessary to
special-case chg in the pager extension. This will effectively enable the
new chg pager code path that runs inside runcommand.

Patch

diff --git a/hgext/pager.py b/hgext/pager.py
--- a/hgext/pager.py
+++ b/hgext/pager.py
@@ -126,9 +126,4 @@  def uisetup(ui):
     ui.__class__ = pagerui
 
-    # chg has its own pager implementation
-    argv = sys.argv[:]
-    if 'chgunix' in dispatch._earlygetopt(['--cmdserver'], argv):
-        return
-
     def pagecmd(orig, ui, options, cmd, cmdfunc):
         p = ui.config("pager", "pager", encoding.environ.get("PAGER"))