[PATCH 2 of 2 pager-followup] dispatch: add pagination of two more help cases

Augie Fackler raf at durin42.com
Wed Mar 8 18:43:21 EST 2017


# HG changeset patch
# User Augie Fackler <augie at google.com>
# Date 1489015962 18000
#      Wed Mar 08 18:32:42 2017 -0500
# Node ID 92f7d6585c185e85763b3bad81b1304b8cdb5937
# Parent  767afd48cd786deb5bebd542f739a18640c50038
dispatch: add pagination of two more help cases

I missed these in the last round anf Yuya spotted them in
review. Thanks!

diff --git a/mercurial/dispatch.py b/mercurial/dispatch.py
--- a/mercurial/dispatch.py
+++ b/mercurial/dispatch.py
@@ -234,9 +234,11 @@ def callcatch(ui, func):
                 (inst.args[0], " ".join(inst.args[1])))
     except error.CommandError as inst:
         if inst.args[0]:
+            ui.pager('help')
             ui.warn(_("hg %s: %s\n") % (inst.args[0], inst.args[1]))
             commands.help_(ui, inst.args[0], full=False, command=True)
         else:
+            ui.pager('help')
             ui.warn(_("hg: %s\n") % inst.args[1])
             commands.help_(ui, 'shortlist')
     except error.ParseError as inst:


More information about the Mercurial-devel mailing list