# HG changeset patch # User Valentin Gatien-Baron # Date 1538604469 14400 # Node ID fcad7fdc647434098e2596bf8b25db71aaa02168 # Parent acf5dbe394787d171fef2a5398a3169d26604649 identify: show remote bookmarks in `hg id url -Tjson -B` I didn't display bookmarks when `default and not ui.quiet`: it seems strange for templates to depend on --id or -q, and it would take more code for `hg id url -T {node}` to not request remote bookmarks. An alternative I thought of was providing lazy data to the formatter, `fm.data(bookmarks=lambda: fm.formatlist(getbms(), name='bookmark'))`. The plainformatter would naturally not compute it, the templateformatter would compute only what it needs, and the other ones would compute everything, but that's not supported (or I don't see how), so I abandoned this idea. Differential Revision: https://phab.mercurial-scm.org/D4872 diff -r acf5dbe39478 -r fcad7fdc6474 mercurial/commands.py --- a/mercurial/commands.py Wed Oct 03 16:03:16 2018 -0400 +++ b/mercurial/commands.py Wed Oct 03 18:07:49 2018 -0400 @@ -3111,7 +3111,7 @@ output.append(bm) else: fm.data(node=hex(remoterev)) - if 'bookmarks' in fm.datahint(): + if bookmarks or 'bookmarks' in fm.datahint(): fm.data(bookmarks=fm.formatlist(getbms(), name='bookmark')) else: if rev: