[PATCH] pager: backed out changeset aaa751585325

Jun Wu quark at fb.com
Tue Feb 7 15:59:40 EST 2017


I've marked this as Superseded, as Simon's patch is a better fix.

Excerpts from Jun Wu's message of 2017-02-07 11:23:42 -0800:
> # HG changeset patch
> # User Jun Wu <quark at fb.com>
> # 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)


More information about the Mercurial-devel mailing list