##// END OF EJS Templates
filemerge: add _restorebackup...
Phil Cohen -
r34038:fe04c018 default
parent child Browse files
Show More
@@ -348,9 +348,7 def _premerge(repo, fcd, fco, fca, toolc
348 348 return 0
349 349 if premerge not in validkeep:
350 350 # restore from backup and try again
351 # TODO: Add a workingfilectx.write(otherfilectx) path so we can use
352 # util.copy here instead.
353 fcd.write(util.readfile(back), fcd.flags())
351 _restorebackup(fcd, back)
354 352 return 1 # continue merging
355 353
356 354 def _mergecheck(repo, mynode, orig, fcd, fco, fca, toolconf):
@@ -590,6 +588,11 def partextras(labels):
590 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 596 def _makebackup(repo, ui, fcd, premerge):
594 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