diff hgext3rd/topic/__init__.py @ 4752:8a73a8df63b6

py3: convert opts keys to bytes before passing to core APIs
author Martin von Zweigbergk <martinvonz@google.com>
date Wed, 17 Jul 2019 11:03:09 -0700
parents d04be27dcce9
children c01c9b9d3713
line wrap: on
line diff
--- a/hgext3rd/topic/__init__.py	Thu Jul 11 15:30:40 2019 -0700
+++ b/hgext3rd/topic/__init__.py	Wed Jul 17 11:03:09 2019 -0700
@@ -137,6 +137,7 @@
     obsolete,
     patch,
     phases,
+    pycompat,
     registrar,
     scmutil,
     templatefilters,
@@ -711,7 +712,8 @@
             topic = repo.currenttopic
         if not topic:
             raise error.Abort(_('no active topic to list'))
-        return stack.showstack(ui, repo, topic=topic, opts=opts)
+        return stack.showstack(ui, repo, topic=topic,
+                               opts=pycompat.byteskwargs(opts))
 
     if touchedrevs:
         if not obsolete.isenabled(repo, obsolete.createmarkersopt):
@@ -761,7 +763,7 @@
         ui.write_err(_('no active topic\n'))
         ret = 1
     elif current:
-        fm = ui.formatter('topic', opts)
+        fm = ui.formatter('topic', pycompat.byteskwargs(opts))
         namemask = '%s\n'
         label = 'topic.active'
         fm.startitem()
@@ -791,7 +793,8 @@
     if topic is None:
         branch = repo[None].branch()
     ui.pager('stack')
-    return stack.showstack(ui, repo, branch=branch, topic=topic, opts=opts)
+    return stack.showstack(ui, repo, branch=branch, topic=topic,
+                           opts=pycompat.byteskwargs(opts))
 
 @command('debugcb|debugconvertbookmark', [
         ('b', 'bookmark', '', _('bookmark to convert to topic')),
@@ -1006,7 +1009,7 @@
     return rewrote
 
 def _listtopics(ui, repo, opts):
-    fm = ui.formatter('topics', opts)
+    fm = ui.formatter('topics', pycompat.byteskwargs(opts))
     activetopic = repo.currenttopic
     namemask = '%s'
     if repo.topics: