Mercurial > hg-git
changeset 683:13d64d9dd26c
git_handler: remove old and bogus code for deleting entries from tags cache
This code never worked for Mercurial >= 2.0, since it neither had repo._tags
nor repo.tagscache.
author | Siddharth Agarwal <sid0@fb.com> |
---|---|
date | Wed, 19 Feb 2014 18:45:36 -0800 |
parents | 2cfda7bc4c46 |
children | 41bfd48ef2a2 |
files | hggit/git_handler.py |
diffstat | 1 files changed, 1 insertions(+), 23 deletions(-) [+] |
line wrap: on
line diff
--- a/hggit/git_handler.py Wed Feb 19 16:12:27 2014 -0800 +++ b/hggit/git_handler.py Wed Feb 19 18:45:36 2014 -0800 @@ -648,29 +648,7 @@ self.import_git_commit(commit) util.progress(self.ui, 'importing', None, total=total, unit='commits') - # Remove any dangling tag references. - for name, rev in self.repo.tags().items(): - if not rev in self.repo: - if hasattr(self, 'tagscache') and self.tagscache and \ - 'name' in self.tagscache: - # Mercurial 1.4 and earlier. - del self.repo.tagscache[name] - elif hasattr(self, '_tags') and self._tags and \ - 'name' in self._tags: - # Mercurial 1.5 and later. - del self.repo._tags[name] - if (hgutil.safehasattr(self.repo, '_tagtypes') and - self.repo._tagtypes and - name in self.repo._tagtypes): - # Mercurial 1.9 and earlier. - del self.repo._tagtypes[name] - elif (hgutil.safehasattr(self.repo, 'tagscache') and - self.repo.tagscache and - hgutil.safehasattr(self.repo.tagscache, '_tagtypes') and - self.repo.tagscache._tagtypes and - name in self.repo.tagscache._tagtypes): - # Mercurial 2.0 and later. - del self.repo.tagscache._tagtypes[name] + # TODO if the tags cache is used, remove any dangling tag references def import_git_commit(self, commit): self.ui.debug(_("importing: %s\n") % commit.id)