##// END OF EJS Templates
filemerge: only raise InMemoryMergeConflictsError when running _xmerge...
Phil Cohen -
r35479:ef7e667a default
parent child Browse files
Show More
@@ -490,6 +490,18 b' def _forcedump(repo, mynode, orig, fcd, '
490 return _idump(repo, mynode, orig, fcd, fco, fca, toolconf, files,
490 return _idump(repo, mynode, orig, fcd, fco, fca, toolconf, files,
491 labels=labels)
491 labels=labels)
492
492
493 def _xmergeimm(repo, mynode, orig, fcd, fco, fca, toolconf, files, labels=None):
494 # In-memory merge simply raises an exception on all external merge tools,
495 # for now.
496 #
497 # It would be possible to run most tools with temporary files, but this
498 # raises the question of what to do if the user only partially resolves the
499 # file -- we can't leave a merge state. (Copy to somewhere in the .hg/
500 # directory and tell the user how to get it is my best idea, but it's
501 # clunky.)
502 raise error.InMemoryMergeConflictsError('in-memory merge does not support '
503 'external merge tools')
504
493 def _xmerge(repo, mynode, orig, fcd, fco, fca, toolconf, files, labels=None):
505 def _xmerge(repo, mynode, orig, fcd, fco, fca, toolconf, files, labels=None):
494 tool, toolpath, binary, symlink = toolconf
506 tool, toolpath, binary, symlink = toolconf
495 if fcd.isabsent() or fco.isabsent():
507 if fcd.isabsent() or fco.isabsent():
@@ -688,16 +700,14 b' def _filemerge(premerge, repo, wctx, myn'
688 onfailure = func.onfailure
700 onfailure = func.onfailure
689 precheck = func.precheck
701 precheck = func.precheck
690 else:
702 else:
691 func = _xmerge
703 if wctx.isinmemory():
704 func = _xmergeimm
705 else:
706 func = _xmerge
692 mergetype = fullmerge
707 mergetype = fullmerge
693 onfailure = _("merging %s failed!\n")
708 onfailure = _("merging %s failed!\n")
694 precheck = None
709 precheck = None
695
710
696 if wctx.isinmemory():
697 raise error.InMemoryMergeConflictsError('in-memory merge does not '
698 'support external merge '
699 'tools')
700
701 toolconf = tool, toolpath, binary, symlink
711 toolconf = tool, toolpath, binary, symlink
702
712
703 if mergetype == nomerge:
713 if mergetype == nomerge:
General Comments 0
You need to be logged in to leave comments. Login now