comparison mercurial/filemerge.py @ 33848:db3e9f7c91aa

filemerge: pass contexts to simplemerge Otherwise, this should be a no-op. Differential Revision: https://phab.mercurial-scm.org/D373
author Phil Cohen <phillco@fb.com>
date Sun, 13 Aug 2017 20:06:52 -0700
parents 50c44dee741a
children fa6309c5761d
comparison
equal deleted inserted replaced
33847:b3571dc0e6b8 33848:db3e9f7c91aa
339 if premerge == 'keep-merge3': 339 if premerge == 'keep-merge3':
340 if not labels: 340 if not labels:
341 labels = _defaultconflictlabels 341 labels = _defaultconflictlabels
342 if len(labels) < 3: 342 if len(labels) < 3:
343 labels.append('base') 343 labels.append('base')
344 r = simplemerge.simplemerge(ui, a, b, c, quiet=True, label=labels) 344 r = simplemerge.simplemerge(ui, a, b, c, fcd, fca, fco,
345 quiet=True, label=labels, repo=repo)
345 if not r: 346 if not r:
346 ui.debug(" premerge successful\n") 347 ui.debug(" premerge successful\n")
347 return 0 348 return 0
348 if premerge not in validkeep: 349 if premerge not in validkeep:
349 util.copyfile(back, a) # restore from backup and try again 350 util.copyfile(back, a) # restore from backup and try again
369 of merge, unless mode equals 'union' which suppresses the markers.""" 370 of merge, unless mode equals 'union' which suppresses the markers."""
370 a, b, c, back = files 371 a, b, c, back = files
371 372
372 ui = repo.ui 373 ui = repo.ui
373 374
374 r = simplemerge.simplemerge(ui, a, b, c, label=labels, mode=mode) 375 r = simplemerge.simplemerge(ui, a, b, c, fcd, fca, fco,
376 label=labels, mode=mode, repo=repo)
375 return True, r, False 377 return True, r, False
376 378
377 @internaltool('union', fullmerge, 379 @internaltool('union', fullmerge,
378 _("warning: conflicts while merging %s! " 380 _("warning: conflicts while merging %s! "
379 "(edit, then use 'hg resolve --mark')\n"), 381 "(edit, then use 'hg resolve --mark')\n"),
421 Generic driver for _imergelocal and _imergeother 423 Generic driver for _imergelocal and _imergeother
422 """ 424 """
423 assert localorother is not None 425 assert localorother is not None
424 tool, toolpath, binary, symlink = toolconf 426 tool, toolpath, binary, symlink = toolconf
425 a, b, c, back = files 427 a, b, c, back = files
426 r = simplemerge.simplemerge(repo.ui, a, b, c, label=labels, 428 r = simplemerge.simplemerge(repo.ui, a, b, c, fcd, fca, fco,
427 localorother=localorother) 429 label=labels, localorother=localorother,
430 repo=repo)
428 return True, r 431 return True, r
429 432
430 @internaltool('merge-local', mergeonly, precheck=_mergecheck) 433 @internaltool('merge-local', mergeonly, precheck=_mergecheck)
431 def _imergelocal(*args, **kwargs): 434 def _imergelocal(*args, **kwargs):
432 """ 435 """