Show More
@@ -74,7 +74,8 b' def darcs_changes(darcsRepo):' | |||
|
74 | 74 | else: comm = comm[0].childNodes[0].data |
|
75 | 75 | author = patch_node.getAttribute("author") |
|
76 | 76 | date = patch_node.getAttribute("date") |
|
77 | yield author, date, name, comm | |
|
77 | hash = patch_node.getAttribute("hash") | |
|
78 | yield hash, author, date, name, comm | |
|
78 | 79 | |
|
79 | 80 | def darcs_pull(hg_repo, darcs_repo, change): |
|
80 | 81 | cmd("darcs pull '%s' --all --patches='%s'" % (darcs_repo, change), hg_repo) |
@@ -120,9 +121,9 b' if __name__ == "__main__":' | |||
|
120 | 121 | cmd("hg init '%s'" % (hg_repo)) |
|
121 | 122 | cmd("darcs initialize", hg_repo) |
|
122 | 123 | # Get the changes from the Darcs repository |
|
123 | for author, date, summary, description in darcs_changes(darcs_repo): | |
|
124 | for hash, author, date, summary, description in darcs_changes(darcs_repo): | |
|
124 | 125 | text = summary + "\n" + description |
|
125 |
darcs_pull(hg_repo, darcs_repo, |
|
|
126 | darcs_pull(hg_repo, darcs_repo, hash) | |
|
126 | 127 | epoch = int(mktime(strptime(date, '%Y%m%d%H%M%S'))) |
|
127 | 128 | hg_commit(hg_repo, text, author, epoch) |
|
128 | 129 |
General Comments 0
You need to be logged in to leave comments.
Login now