Skip to content
Snippets Groups Projects
Commit 1ab57b19 authored by durin42's avatar durin42
Browse files

git_handler: defend against unexported revisions in tag exporting

parent 6ebbe6c8
No related branches found
No related tags found
No related merge requests found
......@@ -937,8 +937,14 @@
for tag, sha in self.repo.tags().iteritems():
if self.repo.tagtype(tag) in ('global', 'git'):
tag = tag.replace(' ', '_')
self.git.refs['refs/tags/' + tag] = self.map_git_get(hex(sha))
self.tags[tag] = hex(sha)
target = self.map_git_get(hex(sha))
if target is not None:
self.git.refs['refs/tags/' + tag] = target
self.tags[tag] = hex(sha)
else:
self.repo.ui.warn(
'Skipping export of tag %s because it '
'has no matching git revision.' % tag)
def _filter_for_bookmarks(self, bms):
if not self.branch_bookmark_suffix:
......
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