[Bug 4646] New: enabling pager without color results in a hang

mercurial-bugs at selenic.com mercurial-bugs at selenic.com
Tue May 5 21:31:19 UTC 2015


http://bz.selenic.com/show_bug.cgi?id=4646

          Priority: normal
            Bug ID: 4646
                CC: mercurial-devel at selenic.com
          Assignee: bugzilla at selenic.com
           Summary: enabling pager without color results in a hang
          Severity: bug
    Classification: Unclassified
                OS: Other
          Reporter: danek.duvall at oracle.com
          Hardware: PC
            Status: UNCONFIRMED
           Version: 3.4
         Component: Mercurial
           Product: Mercurial

The following command:

    HGRCPATH= hg --config extensions.hgext.pager= --config pager.pager="more" \
        --config "pager.attend=log" log hgext/__init__.py

at least on Solaris, hangs.  Same with less instead of more, though once the
output grows beyond a screen, the behaviors get a bit more complex.

It seems that the pager is actually getting executed twice, executed twice, as
evidenced by truss (strace).  If I grab the stack at the two points of fork,
they're identical, except that the second time, it seems to have recursed once:

$ diff -u =(grep \\\[ /tmp/stack1) =(grep \\\[ /tmp/stack2)
--- /tmp/zshaFaieV      Tue May  5 14:15:59 2015
+++ /tmp/zshbFaieV      Tue May  5 14:15:59 2015
@@ -4,6 +4,8 @@
    [ /usr/lib/python2.7/vendor-packages/hgext/pager.py:117 (_runpager) ]
    [ /usr/lib/python2.7/vendor-packages/hgext/pager.py:159 (pagecmd) ]
    [ /usr/lib/python2.7/vendor-packages/mercurial/extensions.py:164 (closure)
]
+   [ /usr/lib/python2.7/vendor-packages/hgext/pager.py:160 (pagecmd) ]
+   [ /usr/lib/python2.7/vendor-packages/mercurial/extensions.py:164 (closure)
]
    [ /usr/lib/python2.7/vendor-packages/mercurial/dispatch.py:646 (runcommand)
]
    [ /usr/lib/python2.7/vendor-packages/mercurial/dispatch.py:885 (_dispatch)
]
    [ /usr/lib/python2.7/vendor-packages/mercurial/dispatch.py:160 (_runcatch)
]

bisect tracks this down to

    changeset:   24074:0baf41e02a4d
    user:        Gregory Szorc <gregory.szorc at gmail.com>
    date:        Fri Feb 06 13:09:09 2015 -0700
    description:
    pager: ensure wrapped dispatch._runcommand runs before color's

though I suspect it's not actually that patch, but the interaction between that
patch and another one in the series, so I've marked this as a bug in the core,
rather than in either the pager or the color extensions.

Note that the tests pass as expected.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the Mercurial-devel mailing list