mirror of
https://github.com/facebook/sapling.git
synced 2024-10-10 16:57:49 +03:00
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:
parent
232c6612ae
commit
772133c48a
@ -70,10 +70,9 @@ def generate_repo_subclass(baseclass):
|
|||||||
# Mercurial 1.5 and later.
|
# Mercurial 1.5 and later.
|
||||||
return self._tags
|
return self._tags
|
||||||
|
|
||||||
git = GitHandler(self, self.ui)
|
|
||||||
tagscache = super(hgrepo, self).tags()
|
tagscache = super(hgrepo, self).tags()
|
||||||
tagscache.update(self.gitrefs())
|
tagscache.update(self.gitrefs())
|
||||||
for tag, rev in git.tags.iteritems():
|
for tag, rev in self.githandler.tags.iteritems():
|
||||||
if tag in tagscache:
|
if tag in tagscache:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user