changeset 661:1ec6ec6d67fc

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.
author Siddharth Agarwal <sid0@fb.com>
date Wed, 19 Feb 2014 14:16:40 -0800
parents 7302c9e06695
children a0c7824d28ae
files hggit/hgrepo.py
diffstat 1 files changed, 1 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/hggit/hgrepo.py
+++ b/hggit/hgrepo.py
@@ -70,10 +70,9 @@
                 # 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