equal
deleted
inserted
replaced
5637 """ |
5637 """ |
5638 |
5638 |
5639 opts = pycompat.byteskwargs(opts) |
5639 opts = pycompat.byteskwargs(opts) |
5640 ui.pager('tags') |
5640 ui.pager('tags') |
5641 fm = ui.formatter('tags', opts) |
5641 fm = ui.formatter('tags', opts) |
5642 contexthint = fm.contexthint('tag rev node type') |
|
5643 hexfunc = fm.hexfunc |
5642 hexfunc = fm.hexfunc |
5644 tagtype = "" |
5643 tagtype = "" |
5645 |
5644 |
5646 for t, n in reversed(repo.tagslist()): |
5645 for t, n in reversed(repo.tagslist()): |
5647 hn = hexfunc(n) |
5646 hn = hexfunc(n) |
5650 if repo.tagtype(t) == 'local': |
5649 if repo.tagtype(t) == 'local': |
5651 label = 'tags.local' |
5650 label = 'tags.local' |
5652 tagtype = 'local' |
5651 tagtype = 'local' |
5653 |
5652 |
5654 fm.startitem() |
5653 fm.startitem() |
5655 if 'ctx' in contexthint: |
5654 fm.context(repo=repo) |
5656 fm.context(ctx=repo[n]) |
|
5657 fm.write('tag', '%s', t, label=label) |
5655 fm.write('tag', '%s', t, label=label) |
5658 fmt = " " * (30 - encoding.colwidth(t)) + ' %5d:%s' |
5656 fmt = " " * (30 - encoding.colwidth(t)) + ' %5d:%s' |
5659 fm.condwrite(not ui.quiet, 'rev node', fmt, |
5657 fm.condwrite(not ui.quiet, 'rev node', fmt, |
5660 repo.changelog.rev(n), hn, label=label) |
5658 repo.changelog.rev(n), hn, label=label) |
5661 fm.condwrite(ui.verbose and tagtype, 'type', ' %s', |
5659 fm.condwrite(ui.verbose and tagtype, 'type', ' %s', |