Commits

kankri committed c9c90cf

git_handler: mercurial 2.0 moved '_tags' to '_tagscache.tags'

  • Participants
  • Parent commits 4668f06

Comments (0)

Files changed (1)

File hggit/git_handler.py

                     # Mercurial 1.5 and later.
                     if self.repo._tags and name in self.repo._tags:
                         del self.repo._tags[name]
+                elif hasattr(self.repo, '_tagscache'):
+                    # Mercurial 2.0 and later
+                    (self.repo._tagscache.tags or {}).pop(name, None)
                 else:
                     raise RepoError(
                         "Incompatible Mercurial version: can't find 'tags'"