return self.last_mark
def is_marked(self, rev):
- return self.marks.has_key(rev)
+ return str(rev) in self.marks
def new_mark(self, rev, mark):
self.marks[rev] = mark
return final
def export_branch(branch, name):
- global prefix, dirname
+ global prefix
ref = '%s/heads/%s' % (prefix, name)
tip = marks.get_tip(name)
marks.set_tip(name, revid)
def export_tag(repo, name):
- global tags
- print "reset refs/tags/%s" % name
+ global tags, prefix
+
+ ref = '%s/tags/%s' % (prefix, name)
+ print "reset %s" % ref
print "from :%u" % rev_to_mark(tags[name])
print
print "import"
print "export"
print "refspec refs/heads/*:%s/heads/*" % prefix
+ print "refspec refs/tags/*:%s/tags/*" % prefix
path = os.path.join(dirname, 'marks-git')