comparison mercurial/filemerge.py @ 34033:d37f1bb68169

filemerge: move a util copy call to filectx.write This way a future in-memory-merge context can intercept them. Differential Revision: https://phab.mercurial-scm.org/D400
author Phil Cohen <phillco@fb.com>
date Thu, 31 Aug 2017 11:28:59 -0700
parents 67cfffbfb6a0
children 7558917f291e
comparison
equal deleted inserted replaced
34032:67cfffbfb6a0 34033:d37f1bb68169
346 if not r: 346 if not r:
347 ui.debug(" premerge successful\n") 347 ui.debug(" premerge successful\n")
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 util.copyfile(back, repo.wjoin(fcd.path())) 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())
352 return 1 # continue merging 354 return 1 # continue merging
353 355
354 def _mergecheck(repo, mynode, orig, fcd, fco, fca, toolconf): 356 def _mergecheck(repo, mynode, orig, fcd, fco, fca, toolconf):
355 tool, toolpath, binary, symlink = toolconf 357 tool, toolpath, binary, symlink = toolconf
356 if symlink: 358 if symlink: