From patchwork Tue Feb 7 19:23:42 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: pager: backed out changeset aaa751585325 From: Jun Wu X-Patchwork-Id: 18339 Message-Id: <8cfbd33c54779d1bbd50.1486495422@x1c> To: Date: Tue, 7 Feb 2017 11:23:42 -0800 # HG changeset patch # User Jun Wu # Date 1486495380 28800 # Tue Feb 07 11:23:00 2017 -0800 # Node ID 8cfbd33c54779d1bbd50412e99f8256eea954401 # Parent a68510b69f413545722c086eaeb840dd5e8305b4 # Available At https://bitbucket.org/quark-zju/hg-draft # hg pull https://bitbucket.org/quark-zju/hg-draft -r 8cfbd33c5477 pager: backed out changeset aaa751585325 When a command needs a long time (ex. "hg log" on a big repo), and the user exits the pager, they expect the hg command to exit immediately. To be able to do that, terminating on SIGPIPE is important. Therefore revert the change that ignores SIGPIPE. diff --git a/hgext/pager.py b/hgext/pager.py --- a/hgext/pager.py +++ b/hgext/pager.py @@ -145,4 +145,6 @@ def uisetup(ui): ui.setconfig('ui', 'formatted', ui.formatted(), 'pager') ui.setconfig('ui', 'interactive', False, 'pager') + if util.safehasattr(signal, "SIGPIPE"): + signal.signal(signal.SIGPIPE, signal.SIG_DFL) ui._runpager(p) return orig(ui, options, cmd, cmdfunc)