comparison mercurial/filemerge.py @ 34076:cd38b83bfb23

filemerge: use fctx.write() in the internal:dump tool, instead of copy This is slower but allows this tool to work with the "deferred writes" milestone of in-memory merge. The performance hit is not too noticiable since this only used for the :dump merge tool during a conflict. Differential Revision: https://phab.mercurial-scm.org/D617
author Phil Cohen <phillco@fb.com>
date Tue, 05 Sep 2017 12:04:02 -0700
parents 6330df9d6393
children c0ce60459d84
comparison
equal deleted inserted replaced
34075:a9d8caf95941 34076:cd38b83bfb23
466 runs successfully. Use :forcedump to forcibly write files out. 466 runs successfully. Use :forcedump to forcibly write files out.
467 """ 467 """
468 a = _workingpath(repo, fcd) 468 a = _workingpath(repo, fcd)
469 fd = fcd.path() 469 fd = fcd.path()
470 470
471 util.copyfile(a, a + ".local") 471 util.writefile(a + ".local", fcd.decodeddata())
472 repo.wwrite(fd + ".other", fco.data(), fco.flags()) 472 repo.wwrite(fd + ".other", fco.data(), fco.flags())
473 repo.wwrite(fd + ".base", fca.data(), fca.flags()) 473 repo.wwrite(fd + ".base", fca.data(), fca.flags())
474 return False, 1, False 474 return False, 1, False
475 475
476 @internaltool('forcedump', mergeonly) 476 @internaltool('forcedump', mergeonly)