pager: respect HGPLAIN
authorYuya Nishihara <yuya@tcha.org>
Sun, 20 Jun 2010 01:20:12 +0900
changeset 11414 0fa4474bdc2f
parent 11413 4c1fe996838c
child 11415 a1e575b48563
pager: respect HGPLAIN Pager shouldn't be enabled for scripting use.
hgext/pager.py
--- a/hgext/pager.py	Wed Jun 16 00:37:21 2010 +0200
+++ b/hgext/pager.py	Sun Jun 20 01:20:12 2010 +0900
@@ -78,6 +78,9 @@
             raise
 
 def uisetup(ui):
+    if ui.plain():
+        return
+
     def pagecmd(orig, ui, options, cmd, cmdfunc):
         p = ui.config("pager", "pager", os.environ.get("PAGER"))
         if p and sys.stdout.isatty() and '--debugger' not in sys.argv: