changeset 46182:dc4564ee57dc

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
author Dan Villiom Podlaski Christiansen <danchr@gmail.com>
date Sun, 20 Dec 2020 15:47:02 +0100
parents 3aec2620554b
children ee63c1173c1b
files mercurial/commands.py
diffstat 1 files changed, 5 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- 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)