comparison mercurial/filemerge.py @ 27123:4dc5951df1e4

filemerge: in ':fail' tool, write out other side if local side is deleted We do this because we don't want to modify the dirstate for failures, and don't just want to leave the file missing from disk. Plus it's more useful for the user if the changed side is written out -- it is easier to delete a file than to get it back via hg revert.
author Siddharth Agarwal <sid0@fb.com>
date Tue, 24 Nov 2015 10:57:01 -0800
parents e1458049dca5
children 9c870e3efab7
comparison
equal deleted inserted replaced
27122:77d760ba8dcd 27123:4dc5951df1e4
283 def _ifail(repo, mynode, orig, fcd, fco, fca, toolconf): 283 def _ifail(repo, mynode, orig, fcd, fco, fca, toolconf):
284 """ 284 """
285 Rather than attempting to merge files that were modified on both 285 Rather than attempting to merge files that were modified on both
286 branches, it marks them as unresolved. The resolve command must be 286 branches, it marks them as unresolved. The resolve command must be
287 used to resolve these conflicts.""" 287 used to resolve these conflicts."""
288 # for change/delete conflicts write out the changed version, then fail
289 if fcd.isabsent():
290 repo.wwrite(fcd.path(), fco.data(), fco.flags())
288 return 1, False 291 return 1, False
289 292
290 def _premerge(repo, fcd, fco, fca, toolconf, files, labels=None): 293 def _premerge(repo, fcd, fco, fca, toolconf, files, labels=None):
291 tool, toolpath, binary, symlink = toolconf 294 tool, toolpath, binary, symlink = toolconf
292 if symlink or fcd.isabsent() or fco.isabsent(): 295 if symlink or fcd.isabsent() or fco.isabsent():