Patchwork D9639: tags: describe all abnormal tag types in `hg tags -v`

login
register
mail settings
Submitter phabricator
Date Dec. 20, 2020, 6:35 p.m.
Message ID <differential-rev-PHID-DREV-2ul2drfbco2gav3bud6w-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/47949/
State Superseded
Headers show

Comments

phabricator - Dec. 20, 2020, 6:35 p.m.
danchr created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  In particular, this affects `git` and `git-remote` tags when using
  hg-git.

REPOSITORY
  rHG Mercurial

BRANCH
  default

REVISION DETAIL
  https://phab.mercurial-scm.org/D9639

AFFECTED FILES
  mercurial/commands.py

CHANGE DETAILS




To: danchr, #hg-reviewers
Cc: mercurial-patches, mercurial-devel

Patch

diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -7311,10 +7311,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)