changeset 21278:e1f5f38fd944

pager: break always out of command check loop
author Matt Mackall <mpm@selenic.com>
date Fri, 09 May 2014 13:05:52 -0500
parents 2bc778e2f9b3
children 19b8cfe4396f
files hgext/pager.py
diffstat 1 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/pager.py	Fri May 09 12:58:53 2014 -0500
+++ b/hgext/pager.py	Fri May 09 13:05:52 2014 -0500
@@ -117,19 +117,20 @@
     def pagecmd(orig, ui, options, cmd, cmdfunc):
         p = ui.config("pager", "pager", os.environ.get("PAGER"))
         usepager = False
+        always = util.parsebool(options['pager'])
 
         if not p:
             pass
+        elif always:
+            usepager = True
         else:
             attend = ui.configlist('pager', 'attend', attended)
             auto = options['pager'] == 'auto'
-            always = util.parsebool(options['pager'])
-
             cmds, _ = cmdutil.findcmd(cmd, commands.table)
 
             ignore = ui.configlist('pager', 'ignore')
             for cmd in cmds:
-                if (always or auto and
+                if (auto and
                     (cmd in attend or
                      (cmd not in ignore and not attend))):
                     usepager = True