equal
deleted
inserted
replaced
88 end = c.find("\n\n") |
88 end = c.find("\n\n") |
89 message = c[end+2:] |
89 message = c[end+2:] |
90 message = self.recode(message) |
90 message = self.recode(message) |
91 l = c[:end].splitlines() |
91 l = c[:end].splitlines() |
92 parents = [] |
92 parents = [] |
|
93 author = committer = None |
93 for e in l[1:]: |
94 for e in l[1:]: |
94 n, v = e.split(" ", 1) |
95 n, v = e.split(" ", 1) |
95 if n == "author": |
96 if n == "author": |
96 p = v.split() |
97 p = v.split() |
97 tm, tz = p[-2:] |
98 tm, tz = p[-2:] |
102 p = v.split() |
103 p = v.split() |
103 tm, tz = p[-2:] |
104 tm, tz = p[-2:] |
104 committer = " ".join(p[:-2]) |
105 committer = " ".join(p[:-2]) |
105 if committer[0] == "<": committer = committer[1:-1] |
106 if committer[0] == "<": committer = committer[1:-1] |
106 committer = self.recode(committer) |
107 committer = self.recode(committer) |
107 message += "\ncommitter: %s\n" % committer |
|
108 if n == "parent": parents.append(v) |
108 if n == "parent": parents.append(v) |
109 |
109 |
|
110 if committer and committer != author: |
|
111 message += "\ncommitter: %s\n" % committer |
110 tzs, tzh, tzm = tz[-5:-4] + "1", tz[-4:-2], tz[-2:] |
112 tzs, tzh, tzm = tz[-5:-4] + "1", tz[-4:-2], tz[-2:] |
111 tz = -int(tzs) * (int(tzh) * 3600 + int(tzm)) |
113 tz = -int(tzs) * (int(tzh) * 3600 + int(tzm)) |
112 date = tm + " " + str(tz) |
114 date = tm + " " + str(tz) |
113 |
115 |
114 c = commit(parents=parents, date=date, author=author, desc=message, |
116 c = commit(parents=parents, date=date, author=author, desc=message, |