Mercurial > public > mercurial-scm > hg
comparison mercurial/commands.py @ 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 |
comparison
equal
deleted
inserted
replaced
39746:25cc5616adc9 | 39747:81d1c963e94a |
---|---|
956 | 956 |
957 - move the '@' bookmark from another branch:: | 957 - move the '@' bookmark from another branch:: |
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")) |
970 if delete and rev: | 971 if delete and rev: |
971 raise error.Abort(_("--rev is incompatible with --delete")) | 972 raise error.Abort(_("--rev is incompatible with --delete")) |
1009 book = repo._activebookmark | 1010 book = repo._activebookmark |
1010 if book is None: | 1011 if book is None: |
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 |
1018 @command('branch', | 1018 @command('branch', |
1019 [('f', 'force', None, | 1019 [('f', 'force', None, |