# HG changeset patch # User Jun Wu <qu...@fb.com> # Date 1484002766 -28800 # Tue Jan 10 06:59:26 2017 +0800 # Node ID 24ebef0f19843c6b1b8fbf32d99a7e8dba2fb734 # Parent 483eabc8ccbbdfabed7f0f0abd74fb131adcd3c3 # Available At https://bitbucket.org/quark-zju/hg-draft # hg pull https://bitbucket.org/quark-zju/hg-draft -r 24ebef0f1984 pager: use super class's _runpager if possible
The ui class is currently pagerui(chgui(ui)), so chgui's _runpager will be overrided by pagerui. Detect it and use chgui's _runpager, in pager.py. In the future, when pager is moved to core, pagerui will no longer exist and ui.py has _runpager implemented directly, and we can just call ui._runpager without any check. diff --git a/hgext/pager.py b/hgext/pager.py --- a/hgext/pager.py +++ b/hgext/pager.py @@ -121,5 +121,6 @@ def uisetup(ui): class pagerui(ui.__class__): def _runpager(self, pagercmd): - _runpager(self, pagercmd) + runpager = getattr(super(pagerui, self), '_runpager', _runpager) + runpager(self, pagercmd) ui.__class__ = pagerui _______________________________________________ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel