[PATCH 2 of 7 V2] localrepo: use _findlocaltags in _findtags
Sean Farley
sean.michael.farley at gmail.com
Fri Mar 28 12:53:16 CDT 2014
# HG changeset patch
# User Sean Farley <sean.michael.farley at gmail.com>
# Date 1395964989 18000
# Thu Mar 27 19:03:09 2014 -0500
# Node ID 1f94af880a792dd8997bebea7b64f58e0eb4fb33
# Parent f51c9fb7d5e024e9c200787f06bb7409d7ce785c
localrepo: use _findlocaltags in _findtags
This makes the only caller of tags.readlocaltags localrepo._findlocaltags now.
diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py
--- a/mercurial/localrepo.py
+++ b/mercurial/localrepo.py
@@ -597,11 +597,16 @@ class localrepository(object):
alltags = {} # map tag name to (node, hist)
tagtypes = {}
tagsmod.findglobaltags(self.ui, self, alltags, tagtypes)
- tagsmod.readlocaltags(self.ui, self, alltags, tagtypes)
+
+ tags, ltagtypes = self._findlocaltags()
+ # global tags take precedence, so we only update distinct local tags
+ ltagtypes = dict([(name, type) for name, type in ltagtypes.iteritems()
+ if name not in tagtypes])
+ tagtypes.update(ltagtypes)
# Build the return dicts. Have to re-encode tag names because
# the tags module always uses UTF-8 (in order not to lose info
# writing to the cache), but the rest of Mercurial wants them in
# local encoding.
More information about the Mercurial-devel
mailing list