changeset 21279:19b8cfe4396f

pager: break auto out of command check loop
author Matt Mackall <mpm@selenic.com>
date Fri, 09 May 2014 13:07:50 -0500
parents e1f5f38fd944
children 71028188970e
files hgext/pager.py
diffstat 1 files changed, 5 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/pager.py	Fri May 09 13:05:52 2014 -0500
+++ b/hgext/pager.py	Fri May 09 13:07:50 2014 -0500
@@ -118,21 +118,22 @@
         p = ui.config("pager", "pager", os.environ.get("PAGER"))
         usepager = False
         always = util.parsebool(options['pager'])
+        auto = options['pager'] == 'auto'
 
         if not p:
             pass
         elif always:
             usepager = True
+        elif not auto:
+            usepager = False
         else:
             attend = ui.configlist('pager', 'attend', attended)
-            auto = options['pager'] == 'auto'
             cmds, _ = cmdutil.findcmd(cmd, commands.table)
 
             ignore = ui.configlist('pager', 'ignore')
             for cmd in cmds:
-                if (auto and
-                    (cmd in attend or
-                     (cmd not in ignore and not attend))):
+                if (cmd in attend or
+                     (cmd not in ignore and not attend)):
                     usepager = True
                     break