[PATCH] Pager extension: switch it off if --debugger is set

David Soria Parra dsoria at gmx.net
Thu Apr 3 01:57:55 CDT 2008


Good point, but I think It's better to use ui.debugflag instead

----
# HG changeset patch
# User David Soria Parra <dsp at php.net>
# Date 1207205656 -7200
# Node ID c9a353324f9bdad341f148c37824816d8afc7ba7
# Parent  27d59ce043a1f74f277a183f09a2097a3bf443a0
Pager extension: switch it off if --debugger is set

The pager is preventing the debugger prompt and much of the
debugger output to be refreshed. Moreover the pager does not
make sense when debugging line by line (Thanks to Gilles Moris).

diff -r 27d59ce043a1 -r c9a353324f9b hgext/pager.py
--- a/hgext/pager.py	Wed Apr 02 21:46:30 2008 +0200
+++ b/hgext/pager.py	Thu Apr 03 08:54:16 2008 +0200
@@ -47,7 +47,7 @@
 def uisetup(ui):
     def pagecmd(ui, options, cmd, cmdfunc):
         p = ui.config("pager", "pager", os.environ.get("PAGER"))
-        if p and sys.stdout.isatty():
+        if p and sys.stdout.isatty() and not ui.debugflag:
             attend = ui.configlist('pager', 'attend')
             if (cmd in attend or
                 (cmd not in ui.configlist('pager', 'ignore') and not attend)):


More information about the Mercurial-devel mailing list