hgrepo.tags: use githandler property

Currently we call hgrepo.tags() separately for each tag. (This should be fixed
at some point.) This avoids initializing a separate git handler for each tag.

For a repository with over 150 tags, this brings down a no-op hg pull by 0.05
seconds.
This commit is contained in:
Siddharth Agarwal 2014-02-19 14:16:40 -08:00
parent 232c6612ae
commit 772133c48a

View File

@ -70,10 +70,9 @@ def generate_repo_subclass(baseclass):
# Mercurial 1.5 and later.
return self._tags
git = GitHandler(self, self.ui)
tagscache = super(hgrepo, self).tags()
tagscache.update(self.gitrefs())
for tag, rev in git.tags.iteritems():
for tag, rev in self.githandler.tags.iteritems():
if tag in tagscache:
continue