Patchwork [3,of,5,mergedriver] merge.applyupdates: conclude merges after starting them

login
register
mail settings
Submitter Siddharth Agarwal
Date Oct. 9, 2015, 11:10 p.m.
Message ID <144c1acf2dec19143571.1444432222@dev6666.prn1.facebook.com>
Download mbox | patch
Permalink /patch/10940/
State Changes Requested
Headers show

Comments

Siddharth Agarwal - Oct. 9, 2015, 11:10 p.m.
# HG changeset patch
# User Siddharth Agarwal <sid0@fb.com>
# Date 1444429219 25200
#      Fri Oct 09 15:20:19 2015 -0700
# Node ID 144c1acf2dec19143571877f89ccb5efb1fe18c4
# Parent  1f8c79286f7b6008c755dc809d12b07eee9f0a6e
merge.applyupdates: conclude merges after starting them

This is currently inactive because mergestate._pausedmerges is never filled in.

Patch

diff --git a/mercurial/merge.py b/mercurial/merge.py
--- a/mercurial/merge.py
+++ b/mercurial/merge.py
@@ -878,6 +878,16 @@  def applyupdates(repo, actions, wctx, mc
             else:
                 merged += 1
 
+    mergeresults = ms.concludemerges()
+    for r in mergeresults.itervalues():
+        # any files here were marked unresolved at first
+        if r is None:
+            unresolved -= 1
+            updated += 1
+        elif r == 0:
+            unresolved -= 1
+            merged += 1
+
     ms.commit()
     progress(_updating, None, total=numupdates, unit=_files)