Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/commands.py @ 39762:25cc5616adc9
bookmarks: pass in formatter to printbookmarks() instead of opts (API)
This clarifies that user options have to be processed before calling
printbookmarks().
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sat, 15 Sep 2018 11:50:07 +0900 |
parents | 7303ab86431a |
children | 81d1c963e94a |
comparison
equal
deleted
inserted
replaced
39761:b2ec79559a4b | 39762:25cc5616adc9 |
---|---|
1009 book = repo._activebookmark | 1009 book = repo._activebookmark |
1010 if book is None: | 1010 if book is None: |
1011 return 1 | 1011 return 1 |
1012 ui.write("%s\n" % book, label=bookmarks.activebookmarklabel) | 1012 ui.write("%s\n" % book, label=bookmarks.activebookmarklabel) |
1013 else: # show bookmarks | 1013 else: # show bookmarks |
1014 bookmarks.printbookmarks(ui, repo, **opts) | 1014 opts = pycompat.byteskwargs(opts) |
1015 with ui.formatter('bookmarks', opts) as fm: | |
1016 bookmarks.printbookmarks(ui, repo, fm) | |
1015 | 1017 |
1016 @command('branch', | 1018 @command('branch', |
1017 [('f', 'force', None, | 1019 [('f', 'force', None, |
1018 _('set branch name even if it shadows an existing branch')), | 1020 _('set branch name even if it shadows an existing branch')), |
1019 ('C', 'clean', None, _('reset branch name to parent branch name')), | 1021 ('C', 'clean', None, _('reset branch name to parent branch name')), |