##// END OF EJS Templates
convert-repo: linearize the tag commit
Matt Mackall -
r1387:0c7e8d34 default
parent child Browse files
Show More
@@ -160,6 +160,7 b' class convert_mercurial:'
160 date = "%s 0" % int(time.mktime(time.gmtime()))
160 date = "%s 0" % int(time.mktime(time.gmtime()))
161 self.repo.rawcommit([".hgtags"], "update tags", "convert-repo",
161 self.repo.rawcommit([".hgtags"], "update tags", "convert-repo",
162 date, self.repo.changelog.tip(), hg.nullid)
162 date, self.repo.changelog.tip(), hg.nullid)
163 return hg.hex(self.repo.changelog.tip())
163
164
164 class convert:
165 class convert:
165 def __init__(self, source, dest, mapfile):
166 def __init__(self, source, dest, mapfile):
@@ -269,7 +270,11 b' class convert:'
269 if v in self.map:
270 if v in self.map:
270 ctags[k] = self.map[v]
271 ctags[k] = self.map[v]
271
272
272 self.dest.puttags(ctags)
273 if ctags:
274 nrev = self.dest.puttags(ctags)
275 # write another hash correspondence to override the previous
276 # one so we don't end up with extra tag heads
277 file(self.mapfile, "a").write("%s %s\n" % (c, nrev))
273
278
274 gitpath, hgpath, mapfile = sys.argv[1:]
279 gitpath, hgpath, mapfile = sys.argv[1:]
275 if os.path.isdir(gitpath + "/.git"):
280 if os.path.isdir(gitpath + "/.git"):
General Comments 0
You need to be logged in to leave comments. Login now