changeset 39747:81d1c963e94a

bookmarks: convert opts to bytes dict early
author Yuya Nishihara <yuya@tcha.org>
date Sat, 15 Sep 2018 11:51:15 +0900
parents 25cc5616adc9
children 78ee63c77bb3
files mercurial/commands.py
diffstat 1 files changed, 7 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/commands.py	Sat Sep 15 11:50:07 2018 +0900
+++ b/mercurial/commands.py	Sat Sep 15 11:51:15 2018 +0900
@@ -958,12 +958,13 @@
 
           hg book -f @
     '''
-    force = opts.get(r'force')
-    rev = opts.get(r'rev')
-    delete = opts.get(r'delete')
-    rename = opts.get(r'rename')
-    inactive = opts.get(r'inactive')
-    active = opts.get(r'active')
+    opts = pycompat.byteskwargs(opts)
+    force = opts.get('force')
+    rev = opts.get('rev')
+    delete = opts.get('delete')
+    rename = opts.get('rename')
+    inactive = opts.get('inactive')
+    active = opts.get('active')
 
     if delete and rename:
         raise error.Abort(_("--delete and --rename are incompatible"))
@@ -1011,7 +1012,6 @@
             return 1
         ui.write("%s\n" % book, label=bookmarks.activebookmarklabel)
     else: # show bookmarks
-        opts = pycompat.byteskwargs(opts)
         with ui.formatter('bookmarks', opts) as fm:
             bookmarks.printbookmarks(ui, repo, fm)