Patchwork D1781: merge: raise before running mergedriver if using IMM

login
register
mail settings
Submitter phabricator
Date Dec. 27, 2017, 7:51 p.m.
Message ID <differential-rev-PHID-DREV-ygqb6xjx4vukqwz2ffos-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/26474/
State Superseded
Headers show

Comments

phabricator - Dec. 27, 2017, 7:51 p.m.
phillco created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D1781

AFFECTED FILES
  mercurial/merge.py

CHANGE DETAILS




To: phillco, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/mercurial/merge.py b/mercurial/merge.py
--- a/mercurial/merge.py
+++ b/mercurial/merge.py
@@ -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