diff mercurial/localrepo.py @ 31711:63d4deda1b31

tags: do not feed dictionaries to 'findglobaltags' The code asserts that these dictionary are empty. So we can be more explicit and have the function return the dictionaries directly.
author Pierre-Yves David <pierre-yves.david@ens-lyon.org>
date Tue, 28 Mar 2017 06:13:49 +0200
parents e6fd7930cf0b
children c34c170b25f3
line wrap: on
line diff
--- a/mercurial/localrepo.py	Tue Mar 28 06:01:31 2017 +0200
+++ b/mercurial/localrepo.py	Tue Mar 28 06:13:49 2017 +0200
@@ -707,10 +707,11 @@
         # be one tagtype for all such "virtual" tags?  Or is the status
         # quo fine?
 
-        alltags = {}                    # map tag name to (node, hist)
-        tagtypes = {}
 
-        tagsmod.findglobaltags(self.ui, self, alltags, tagtypes)
+        globaldata = tagsmod.findglobaltags(self.ui, self)
+        alltags = globaldata[0]   # map tag name to (node, hist)
+        tagtypes = globaldata[1]  # map tag name to tag type
+
         tagsmod.readlocaltags(self.ui, self, alltags, tagtypes)
 
         # Build the return dicts.  Have to re-encode tag names because