tags: describe all abnormal tag types in `hg tags -v`
authorDan Villiom Podlaski Christiansen <danchr@gmail.com>
Sun, 20 Dec 2020 15:47:02 +0100
changeset 46182 dc4564ee57dc
parent 46181 3aec2620554b
child 46183 ee63c1173c1b
tags: describe all abnormal tag types in `hg tags -v` In particular, this affects `git` and `git-remote` tags when using hg-git. Test Plan: I have not included an explicit test, as this is much more easily tested within the `hg-git` test suite. Differential Revision: https://phab.mercurial-scm.org/D9639
mercurial/commands.py
--- a/mercurial/commands.py	Tue Dec 01 14:46:55 2020 +0100
+++ b/mercurial/commands.py	Sun Dec 20 15:47:02 2020 +0100
@@ -7316,10 +7316,11 @@
     for t, n in reversed(repo.tagslist()):
         hn = hexfunc(n)
         label = b'tags.normal'
-        tagtype = b''
-        if repo.tagtype(t) == b'local':
-            label = b'tags.local'
-            tagtype = b'local'
+        tagtype = repo.tagtype(t)
+        if not tagtype or tagtype == b'global':
+            tagtype = b''
+        else:
+            label = b'tags.' + tagtype
 
         fm.startitem()
         fm.context(repo=repo)