Show More
@@ -348,9 +348,7 def _premerge(repo, fcd, fco, fca, toolc | |||||
348 | return 0 |
|
348 | return 0 | |
349 | if premerge not in validkeep: |
|
349 | if premerge not in validkeep: | |
350 | # restore from backup and try again |
|
350 | # restore from backup and try again | |
351 | # TODO: Add a workingfilectx.write(otherfilectx) path so we can use |
|
351 | _restorebackup(fcd, back) | |
352 | # util.copy here instead. |
|
|||
353 | fcd.write(util.readfile(back), fcd.flags()) |
|
|||
354 | return 1 # continue merging |
|
352 | return 1 # continue merging | |
355 |
|
353 | |||
356 | def _mergecheck(repo, mynode, orig, fcd, fco, fca, toolconf): |
|
354 | def _mergecheck(repo, mynode, orig, fcd, fco, fca, toolconf): | |
@@ -590,6 +588,11 def partextras(labels): | |||||
590 | "o": " [%s]" % labels[1], |
|
588 | "o": " [%s]" % labels[1], | |
591 | } |
|
589 | } | |
592 |
|
590 | |||
|
591 | def _restorebackup(fcd, back): | |||
|
592 | # TODO: Add a workingfilectx.write(otherfilectx) path so we can use | |||
|
593 | # util.copy here instead. | |||
|
594 | fcd.write(util.readfile(back), fcd.flags()) | |||
|
595 | ||||
593 | def _makebackup(repo, ui, fcd, premerge): |
|
596 | def _makebackup(repo, ui, fcd, premerge): | |
594 | """Makes a backup of the local `fcd` file prior to merging. |
|
597 | """Makes a backup of the local `fcd` file prior to merging. | |
595 |
|
598 |
General Comments 0
You need to be logged in to leave comments.
Login now