comparison mercurial/filemerge.py @ 27036:63d6bc874dea

filemerge: add support for change/delete conflicts to the ':local' merge tool This covers two of the four cases of change/delete conflicts -- in an upcoming patch we'll make :other cover the other two.
author Siddharth Agarwal <sid0@fb.com>
date Wed, 18 Nov 2015 15:40:28 -0800
parents 86ede9eda252
children a8908c139f2f
comparison
equal deleted inserted replaced
27035:de7bf242644e 27036:63d6bc874dea
235 return 1, False 235 return 1, False
236 236
237 @internaltool('local', nomerge) 237 @internaltool('local', nomerge)
238 def _ilocal(repo, mynode, orig, fcd, fco, fca, toolconf): 238 def _ilocal(repo, mynode, orig, fcd, fco, fca, toolconf):
239 """Uses the local version of files as the merged version.""" 239 """Uses the local version of files as the merged version."""
240 return 0, False 240 return 0, fcd.isabsent()
241 241
242 @internaltool('other', nomerge) 242 @internaltool('other', nomerge)
243 def _iother(repo, mynode, orig, fcd, fco, fca, toolconf): 243 def _iother(repo, mynode, orig, fcd, fco, fca, toolconf):
244 """Uses the other version of files as the merged version.""" 244 """Uses the other version of files as the merged version."""
245 repo.wwrite(fcd.path(), fco.data(), fco.flags()) 245 repo.wwrite(fcd.path(), fco.data(), fco.flags())