##// END OF EJS Templates
bookmarks: convert opts to bytes dict early
Yuya Nishihara -
r39783:81d1c963 default
parent child Browse files
Show More
@@ -958,12 +958,13 b' def bookmark(ui, repo, *names, **opts):'
958
958
959 hg book -f @
959 hg book -f @
960 '''
960 '''
961 force = opts.get(r'force')
961 opts = pycompat.byteskwargs(opts)
962 rev = opts.get(r'rev')
962 force = opts.get('force')
963 delete = opts.get(r'delete')
963 rev = opts.get('rev')
964 rename = opts.get(r'rename')
964 delete = opts.get('delete')
965 inactive = opts.get(r'inactive')
965 rename = opts.get('rename')
966 active = opts.get(r'active')
966 inactive = opts.get('inactive')
967 active = opts.get('active')
967
968
968 if delete and rename:
969 if delete and rename:
969 raise error.Abort(_("--delete and --rename are incompatible"))
970 raise error.Abort(_("--delete and --rename are incompatible"))
@@ -1011,7 +1012,6 b' def bookmark(ui, repo, *names, **opts):'
1011 return 1
1012 return 1
1012 ui.write("%s\n" % book, label=bookmarks.activebookmarklabel)
1013 ui.write("%s\n" % book, label=bookmarks.activebookmarklabel)
1013 else: # show bookmarks
1014 else: # show bookmarks
1014 opts = pycompat.byteskwargs(opts)
1015 with ui.formatter('bookmarks', opts) as fm:
1015 with ui.formatter('bookmarks', opts) as fm:
1016 bookmarks.printbookmarks(ui, repo, fm)
1016 bookmarks.printbookmarks(ui, repo, fm)
1017
1017
General Comments 0
You need to be logged in to leave comments. Login now