Show More
@@ -90,6 +90,7 b' class convert_git(converter_source):' | |||
|
90 | 90 | message = self.recode(message) |
|
91 | 91 | l = c[:end].splitlines() |
|
92 | 92 | parents = [] |
|
93 | author = committer = None | |
|
93 | 94 | for e in l[1:]: |
|
94 | 95 | n, v = e.split(" ", 1) |
|
95 | 96 | if n == "author": |
@@ -104,9 +105,10 b' class convert_git(converter_source):' | |||
|
104 | 105 | committer = " ".join(p[:-2]) |
|
105 | 106 | if committer[0] == "<": committer = committer[1:-1] |
|
106 | 107 | committer = self.recode(committer) |
|
107 | message += "\ncommitter: %s\n" % committer | |
|
108 | 108 | if n == "parent": parents.append(v) |
|
109 | 109 | |
|
110 | if committer and committer != author: | |
|
111 | message += "\ncommitter: %s\n" % committer | |
|
110 | 112 | tzs, tzh, tzm = tz[-5:-4] + "1", tz[-4:-2], tz[-2:] |
|
111 | 113 | tz = -int(tzs) * (int(tzh) * 3600 + int(tzm)) |
|
112 | 114 | date = tm + " " + str(tz) |
@@ -148,4 +148,22 b' hg convert git-repo3 git-repo3-hg' | |||
|
148 | 148 | cd git-repo3-hg |
|
149 | 149 | hg up -C |
|
150 | 150 | python -c 'print len(file("b", "rb").read())' |
|
151 | cd .. | |
|
151 | 152 | |
|
153 | echo | |
|
154 | echo '% test author vs committer' | |
|
155 | mkdir git-repo4 | |
|
156 | cd git-repo4 | |
|
157 | git init-db >/dev/null 2>/dev/null | |
|
158 | echo >> foo | |
|
159 | git add foo | |
|
160 | commit -a -m addfoo | |
|
161 | echo >> foo | |
|
162 | GIT_AUTHOR_NAME="nottest" | |
|
163 | commit -a -m addfoo2 | |
|
164 | cd .. | |
|
165 | ||
|
166 | echo '% convert author committer' | |
|
167 | hg convert git-repo4 git-repo4-hg | |
|
168 | cd git-repo4-hg | |
|
169 | hg log -v |
@@ -10,18 +10,16 b' 3 t3' | |||
|
10 | 10 | 2 t4.1 |
|
11 | 11 | 1 t4.2 |
|
12 | 12 | 0 Merge branch other |
|
13 |
changeset: 5: |
|
|
13 | changeset: 5:c78094926be2 | |
|
14 | 14 | tag: tip |
|
15 |
parent: 3: |
|
|
16 |
parent: 4: |
|
|
15 | parent: 3:f5f5cb45432b | |
|
16 | parent: 4:4e174f80c67c | |
|
17 | 17 | user: test <test@example.org> |
|
18 | 18 | date: Mon Jan 01 00:00:15 2007 +0000 |
|
19 | 19 | files: a |
|
20 | 20 | description: |
|
21 | 21 | Merge branch other |
|
22 | 22 | |
|
23 | committer: test <test@example.org> | |
|
24 | ||
|
25 | 23 | |
|
26 | 24 | % full conversion |
|
27 | 25 | @ 9 "Discard change to foo" files: foo |
@@ -98,3 +96,31 b' converting...' | |||
|
98 | 96 | 0 addbinary |
|
99 | 97 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
100 | 98 | 4096 |
|
99 | ||
|
100 | % test author vs committer | |
|
101 | % convert author committer | |
|
102 | initializing destination git-repo4-hg repository | |
|
103 | scanning source... | |
|
104 | sorting... | |
|
105 | converting... | |
|
106 | 1 addfoo | |
|
107 | 0 addfoo2 | |
|
108 | changeset: 1:d63e967f93da | |
|
109 | tag: tip | |
|
110 | user: nottest <test@example.org> | |
|
111 | date: Mon Jan 01 00:00:21 2007 +0000 | |
|
112 | files: foo | |
|
113 | description: | |
|
114 | addfoo2 | |
|
115 | ||
|
116 | committer: test <test@example.org> | |
|
117 | ||
|
118 | ||
|
119 | changeset: 0:0735477b0224 | |
|
120 | user: test <test@example.org> | |
|
121 | date: Mon Jan 01 00:00:20 2007 +0000 | |
|
122 | files: foo | |
|
123 | description: | |
|
124 | addfoo | |
|
125 | ||
|
126 |
General Comments 0
You need to be logged in to leave comments.
Login now