diff mercurial/localrepo.py @ 31709:c34c170b25f3

tags: only return 'alltags' in 'findglobaltags' This is minor update along the way. We simplify the 'findglobaltags' function to only return the tags. Since no existing data is reused, we know that all tags returned are global and we can let the caller get that information if it cares about it.
author Pierre-Yves David <pierre-yves.david@ens-lyon.org>
date Tue, 28 Mar 2017 07:41:23 +0200
parents 63d4deda1b31
children 8fa516b264c9
line wrap: on
line diff
--- a/mercurial/localrepo.py	Tue Mar 28 07:39:10 2017 +0200
+++ b/mercurial/localrepo.py	Tue Mar 28 07:41:23 2017 +0200
@@ -708,9 +708,10 @@
         # quo fine?
 
 
-        globaldata = tagsmod.findglobaltags(self.ui, self)
-        alltags = globaldata[0]   # map tag name to (node, hist)
-        tagtypes = globaldata[1]  # map tag name to tag type
+        # map tag name to (node, hist)
+        alltags = tagsmod.findglobaltags(self.ui, self)
+        # map tag name to tag type
+        tagtypes = dict((tag, 'global') for tag in alltags)
 
         tagsmod.readlocaltags(self.ui, self, alltags, tagtypes)