changeset 26787:64848559413a

merge.applyupdates: call driverconclude after performing merge actions This will be a chance for the merge driver to finish resolving or generating any driver-resolved files. As before, having a separate error state from 'unresolved' is too big a refactoring for now, so we hack around it by setting unresolved to a positive value when necessary.
author Siddharth Agarwal <sid0@fb.com>
date Thu, 15 Oct 2015 01:22:01 -0700
parents 121f80d14e4b
children d773150d71f2
files mercurial/merge.py
diffstat 1 files changed, 9 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/merge.py	Thu Oct 15 01:19:10 2015 -0700
+++ b/mercurial/merge.py	Thu Oct 15 01:22:01 2015 -0700
@@ -1002,6 +1002,15 @@
                 merged += 1
 
     ms.commit()
+
+    if usemergedriver and not unresolved and ms.mdstate() != 's':
+        if not driverconclude(repo, ms, wctx, labels=labels):
+            # XXX setting unresolved to at least 1 is a hack to make sure we
+            # error out
+            return updated, merged, removed, max(unresolved, 1)
+
+        ms.commit()
+
     progress(_updating, None, total=numupdates, unit=_files)
 
     return updated, merged, removed, unresolved