Mercurial > hg
diff mercurial/bookmarks.py @ 39624:713085b45810
formatter: replace contexthint() with demand loading of ctx object
And pass in repo instead to resolve ctx from (repo, node) pair.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sat, 01 Sep 2018 15:52:18 +0900 |
parents | fc54a290b4b0 |
children | 25cc5616adc9 |
line wrap: on
line diff
--- a/mercurial/bookmarks.py Thu Jun 07 21:48:11 2018 +0900 +++ b/mercurial/bookmarks.py Sat Sep 01 15:52:18 2018 +0900 @@ -923,14 +923,12 @@ """ opts = pycompat.byteskwargs(opts) fm = ui.formatter('bookmarks', opts) - contexthint = fm.contexthint('bookmark rev node active') hexfn = fm.hexfunc if len(bmarks) == 0 and fm.isplain(): ui.status(_("no bookmarks set\n")) for bmark, (n, prefix, label) in sorted(bmarks.iteritems()): fm.startitem() - if 'ctx' in contexthint: - fm.context(ctx=repo[n]) + fm.context(repo=repo) if not ui.quiet: fm.plain(' %s ' % prefix, label=label) fm.write('bookmark', '%s', bmark, label=label)