comparison contrib/convert-repo @ 3920:f2c4a2ee59ed

Merge with stable
author Matt Mackall <mpm@selenic.com>
date Sat, 16 Dec 2006 14:51:22 -0600
parents fe075ddf3272
children 645e1dd4b8ae
comparison
equal deleted inserted replaced
3909:dd86f99e3c02 3920:f2c4a2ee59ed
83 p = v.split() 83 p = v.split()
84 tm, tz = p[-2:] 84 tm, tz = p[-2:]
85 committer = " ".join(p[:-2]) 85 committer = " ".join(p[:-2])
86 if committer[0] == "<": committer = committer[1:-1] 86 if committer[0] == "<": committer = committer[1:-1]
87 committer = recode(committer) 87 committer = recode(committer)
88 message += "\ncommitter: %s\n" % v 88 message += "\ncommitter: %s\n" % committer
89 if n == "parent": parents.append(v) 89 if n == "parent": parents.append(v)
90 90
91 tzs, tzh, tzm = tz[-5:-4] + "1", tz[-4:-2], tz[-2:] 91 tzs, tzh, tzm = tz[-5:-4] + "1", tz[-4:-2], tz[-2:]
92 tz = -int(tzs) * (int(tzh) * 3600 + int(tzm)) 92 tz = -int(tzs) * (int(tzh) * 3600 + int(tzm))
93 date = tm + " " + str(tz) 93 date = tm + " " + str(tz)
293 293
294 if c and ctags: 294 if c and ctags:
295 nrev = self.dest.puttags(ctags) 295 nrev = self.dest.puttags(ctags)
296 # write another hash correspondence to override the previous 296 # write another hash correspondence to override the previous
297 # one so we don't end up with extra tag heads 297 # one so we don't end up with extra tag heads
298 file(self.mapfile, "a").write("%s %s\n" % (c, nrev)) 298 if nrev:
299 file(self.mapfile, "a").write("%s %s\n" % (c, nrev))
299 300
300 gitpath, hgpath, mapfile = sys.argv[1:] 301 gitpath, hgpath, mapfile = sys.argv[1:]
301 if os.path.isdir(gitpath + "/.git"): 302 if os.path.isdir(gitpath + "/.git"):
302 gitpath += "/.git" 303 gitpath += "/.git"
303 304