merge: raise before running mergedriver if using IMM
authorPhil Cohen <phillco@fb.com>
Wed, 27 Dec 2017 13:53:21 -0600
changeset 35500 87918218da70
parent 35499 b55a142f00c5
child 35501 12a46ad67a3c
merge: raise before running mergedriver if using IMM Merge driver scripts run in the working copy, so disable with IMM for now. Differential Revision: https://phab.mercurial-scm.org/D1781
mercurial/merge.py
--- a/mercurial/merge.py	Tue Dec 26 22:56:07 2017 +0530
+++ b/mercurial/merge.py	Wed Dec 27 13:53:21 2017 -0600
@@ -1556,6 +1556,9 @@
     usemergedriver = not overwrite and mergeactions and ms.mergedriver
 
     if usemergedriver:
+        if wctx.isinmemory():
+            raise error.InMemoryMergeConflictsError("in-memory merge does not "
+                                                    "support mergedriver")
         ms.commit()
         proceed = driverpreprocess(repo, ms, wctx, labels=labels)
         # the driver might leave some files unresolved