comparison hggit/git_handler.py @ 588:4d9e2d2a2c19 next

Merge
author Augie Fackler <raf@durin42.com>
date Sun, 11 Nov 2012 17:12:55 -0600
parents 9f919924bf81 1ab57b19cb3a
children 2320ab6ada36
comparison
equal deleted inserted replaced
586:24d4741674a6 588:4d9e2d2a2c19
1021 1021
1022 def export_hg_tags(self): 1022 def export_hg_tags(self):
1023 for tag, sha in self.repo.tags().iteritems(): 1023 for tag, sha in self.repo.tags().iteritems():
1024 if self.repo.tagtype(tag) in ('global', 'git'): 1024 if self.repo.tagtype(tag) in ('global', 'git'):
1025 tag = tag.replace(' ', '_') 1025 tag = tag.replace(' ', '_')
1026 self.git.refs['refs/tags/' + tag] = self.map_git_get(hex(sha)) 1026 target = self.map_git_get(hex(sha))
1027 self.tags[tag] = hex(sha) 1027 if target is not None:
1028 self.git.refs['refs/tags/' + tag] = target
1029 self.tags[tag] = hex(sha)
1030 else:
1031 self.repo.ui.warn(
1032 'Skipping export of tag %s because it '
1033 'has no matching git revision.' % tag)
1028 1034
1029 def _filter_for_bookmarks(self, bms): 1035 def _filter_for_bookmarks(self, bms):
1030 if not self.branch_bookmark_suffix: 1036 if not self.branch_bookmark_suffix:
1031 return [(bm, bm) for bm in bms] 1037 return [(bm, bm) for bm in bms]
1032 else: 1038 else: