# HG changeset patch # User Yuya Nishihara # Date 2014-09-21 03:50:48 # Node ID bfc50ff55f3fcd6b40869284cf7a7a10596622a4 # Parent 67b6b82a6bbed33093dd0a2919d6643fbbed7208 tags: use full hash for formatter output as in log or annotate commands diff --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -5999,7 +5999,10 @@ def tags(ui, repo, **opts): """ fm = ui.formatter('tags', opts) - hexfunc = ui.debugflag and hex or short + if fm or ui.debugflag: + hexfunc = hex + else: + hexfunc = short tagtype = "" for t, n in reversed(repo.tagslist()): diff --git a/tests/test-encoding.t b/tests/test-encoding.t --- a/tests/test-encoding.t +++ b/tests/test-encoding.t @@ -184,13 +184,13 @@ hg tags (JSON) $ hg tags -Tjson [ { - "node": "a52c0692f24a", + "node": "a52c0692f24ad921c0a31e1736e7635a8b23b670", "rev": 5, "tag": "tip", "type": "" }, { - "node": "ca661e7520de", + "node": "ca661e7520dec3f5438a63590c350bebadb04989", "rev": 3, "tag": "\xc3\xa9", (esc) "type": ""