comparison mercurial/localrepo.py @ 31714: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
comparison
equal deleted inserted replaced
31713:d0e7c70f14b7 31714:c34c170b25f3
706 # Should each extension invent its own tag type? Should there 706 # Should each extension invent its own tag type? Should there
707 # be one tagtype for all such "virtual" tags? Or is the status 707 # be one tagtype for all such "virtual" tags? Or is the status
708 # quo fine? 708 # quo fine?
709 709
710 710
711 globaldata = tagsmod.findglobaltags(self.ui, self) 711 # map tag name to (node, hist)
712 alltags = globaldata[0] # map tag name to (node, hist) 712 alltags = tagsmod.findglobaltags(self.ui, self)
713 tagtypes = globaldata[1] # map tag name to tag type 713 # map tag name to tag type
714 tagtypes = dict((tag, 'global') for tag in alltags)
714 715
715 tagsmod.readlocaltags(self.ui, self, alltags, tagtypes) 716 tagsmod.readlocaltags(self.ui, self, alltags, tagtypes)
716 717
717 # Build the return dicts. Have to re-encode tag names because 718 # Build the return dicts. Have to re-encode tag names because
718 # the tags module always uses UTF-8 (in order not to lose info 719 # the tags module always uses UTF-8 (in order not to lose info