[PATCH 06 of 19 pager] config: activate pager if not starting an editor

Augie Fackler raf at durin42.com
Sun Feb 19 18:12:57 EST 2017


# HG changeset patch
# User Augie Fackler <augie at google.com>
# Date 1486440102 18000
#      Mon Feb 06 23:01:42 2017 -0500
# Node ID 22e4e9bdff5ebdd7feabb9ed7a1ff6b72c0fe7e8
# Parent  047682a5c9af676f0ac0e8169715f4e0b29f3dc0
config: activate pager if not starting an editor

This demonstrates the power of the non-attend-based pager API.

diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -1792,7 +1792,7 @@ def config(ui, repo, *values, **opts):
         ui.system("%s \"%s\"" % (editor, f),
                   onerr=error.Abort, errprefix=_("edit failed"))
         return
-
+    ui.pager('config')
     fm = ui.formatter('config', opts)
     for f in scmutil.rcpath():
         ui.debug('read config from: %s\n' % f)


More information about the Mercurial-devel mailing list