Show More
@@ -15,6 +15,7 b' import os, sys' | |||||
15 | import tempfile |
|
15 | import tempfile | |
16 | import xml.dom.minidom as xml_dom |
|
16 | import xml.dom.minidom as xml_dom | |
17 | from time import strptime, mktime |
|
17 | from time import strptime, mktime | |
|
18 | import re | |||
18 |
|
19 | |||
19 | DARCS_REPO = None |
|
20 | DARCS_REPO = None | |
20 | HG_REPO = None |
|
21 | HG_REPO = None | |
@@ -93,6 +94,10 b' def darcs_tip(darcs_repo):' | |||||
93 | def darcs_pull(hg_repo, darcs_repo, chash): |
|
94 | def darcs_pull(hg_repo, darcs_repo, chash): | |
94 | old_tip = darcs_tip(darcs_repo) |
|
95 | old_tip = darcs_tip(darcs_repo) | |
95 | res = cmd("darcs pull \"%s\" --all --match=\"hash %s\"" % (darcs_repo, chash), hg_repo) |
|
96 | res = cmd("darcs pull \"%s\" --all --match=\"hash %s\"" % (darcs_repo, chash), hg_repo) | |
|
97 | if re.search('^We have conflicts in the following files:$', res, re.MULTILINE): | |||
|
98 | print "Trying to revert files to work around conflict..." | |||
|
99 | rev_res = cmd ("darcs revert --all", hg_repo) | |||
|
100 | print rev_res | |||
96 | print res |
|
101 | print res | |
97 | new_tip = darcs_tip(darcs_repo) |
|
102 | new_tip = darcs_tip(darcs_repo) | |
98 | if not new_tip != old_tip + 1: |
|
103 | if not new_tip != old_tip + 1: |
General Comments 0
You need to be logged in to leave comments.
Login now