Mercurial > hg
changeset 39990:a91398dc73ab
identify: when using -T, avoid unnecessary remote bookmarks query
Differential Revision: https://phab.mercurial-scm.org/D4839
author | Valentin Gatien-Baron <vgatien-baron@janestreet.com> |
---|---|
date | Mon, 01 Oct 2018 14:44:27 -0400 |
parents | c9026e9297e3 |
children | 77492c10a35b |
files | mercurial/commands.py |
diffstat | 1 files changed, 12 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/commands.py Mon Oct 01 09:58:42 2018 -0400 +++ b/mercurial/commands.py Mon Oct 01 14:44:27 2018 -0400 @@ -3034,17 +3034,18 @@ return sorted(bms) - if bookmarks: - output.extend(getbms()) - elif default and not ui.quiet: - # multiple bookmarks for a single parent separated by '/' - bm = '/'.join(getbms()) - if bm: - output.append(bm) - - fm.data(node=hex(remoterev)) - if 'bookmarks' in fm.datahint(): - fm.data(bookmarks=fm.formatlist(getbms(), name='bookmark')) + if fm.isplain(): + if bookmarks: + output.extend(getbms()) + elif default and not ui.quiet: + # multiple bookmarks for a single parent separated by '/' + bm = '/'.join(getbms()) + if bm: + output.append(bm) + else: + fm.data(node=hex(remoterev)) + if 'bookmarks' in fm.datahint(): + fm.data(bookmarks=fm.formatlist(getbms(), name='bookmark')) else: if rev: repo = scmutil.unhidehashlikerevs(repo, [rev], 'nowarn')