This is an archive of the discontinued Mercurial Phabricator instance.

identify: show remote bookmarks in `hg id url -Tjson -B`
ClosedPublic

Authored by valentin.gatienbaron on Oct 3 2018, 6:19 PM.

Details

Summary

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.

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

This revision was automatically updated to reflect the committed changes.