hgext/pager.py
changeset 43077 687b865b95ad
parent 43076 2372284d9457
child 45942 89a2afe31e82
--- a/hgext/pager.py	Sun Oct 06 09:45:02 2019 -0400
+++ b/hgext/pager.py	Sun Oct 06 09:48:39 2019 -0400
@@ -35,29 +35,29 @@
 # extensions which SHIP WITH MERCURIAL. Non-mainline extensions should
 # be specifying the version(s) of Mercurial they are tested with, or
 # leave the attribute unspecified.
-testedwith = 'ships-with-hg-core'
+testedwith = b'ships-with-hg-core'
 
 configtable = {}
 configitem = registrar.configitem(configtable)
 
 configitem(
-    'pager', 'attend', default=lambda: attended,
+    b'pager', b'attend', default=lambda: attended,
 )
 
 
 def uisetup(ui):
     def pagecmd(orig, ui, options, cmd, cmdfunc):
-        auto = options['pager'] == 'auto'
+        auto = options[b'pager'] == b'auto'
         if auto and not ui.pageractive:
             usepager = False
-            attend = ui.configlist('pager', 'attend')
-            ignore = ui.configlist('pager', 'ignore')
+            attend = ui.configlist(b'pager', b'attend')
+            ignore = ui.configlist(b'pager', b'ignore')
             cmds, _ = cmdutil.findcmd(cmd, commands.table)
 
             for cmd in cmds:
-                var = 'attend-%s' % cmd
-                if ui.config('pager', var, None):
-                    usepager = ui.configbool('pager', var, True)
+                var = b'attend-%s' % cmd
+                if ui.config(b'pager', var, None):
+                    usepager = ui.configbool(b'pager', var, True)
                     break
                 if cmd in attend or (cmd not in ignore and not attend):
                     usepager = True
@@ -69,13 +69,13 @@
                 # core code doesn't know about attend, so we have to
                 # lobotomize the ignore list so that the extension's
                 # behavior is preserved.
-                ui.setconfig('pager', 'ignore', '', 'pager')
-                ui.pager('extension-via-attend-' + cmd)
+                ui.setconfig(b'pager', b'ignore', b'', b'pager')
+                ui.pager(b'extension-via-attend-' + cmd)
             else:
                 ui.disablepager()
         return orig(ui, options, cmd, cmdfunc)
 
-    extensions.wrapfunction(dispatch, '_runcommand', pagecmd)
+    extensions.wrapfunction(dispatch, b'_runcommand', pagecmd)
 
 
-attended = ['annotate', 'cat', 'diff', 'export', 'glog', 'log', 'qdiff']
+attended = [b'annotate', b'cat', b'diff', b'export', b'glog', b'log', b'qdiff']