Skip to content
Snippets Groups Projects
Commit 6d4f3b6d authored by Adrian Sampson's avatar Adrian Sampson
Browse files

respect references to tags that differ between git and .hgtags

parent 132fb69a
No related branches found
No related tags found
No related merge requests found
......@@ -437,6 +437,20 @@
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 name in self.repo._tagtypes:
del self.repo._tagtypes[name]
def import_git_commit(self, commit):
self.ui.debug(_("importing: %s\n") % commit.id)
......
......@@ -42,9 +42,6 @@
git = GitHandler(self, self.ui)
for tag, rev in git.tags.iteritems():
if tag in tags:
continue
tags[tag] = bin(rev)
tagtypes[tag] = 'git'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment