mercurial/narrowspec.py
changeset 45334 b9b055f15035
parent 44856 b7808443ed6a
child 45372 77b8588dd84e
--- a/mercurial/narrowspec.py	Mon Aug 03 13:30:14 2020 +0530
+++ b/mercurial/narrowspec.py	Mon Aug 03 14:12:13 2020 +0530
@@ -272,15 +272,19 @@
 
 
 def _writeaddedfiles(repo, pctx, files):
-    actions = merge.emptyactions()
-    addgaction = actions[mergestatemod.ACTION_GET].append
+    mresult = merge.mergeresult()
     mf = repo[b'.'].manifest()
     for f in files:
         if not repo.wvfs.exists(f):
-            addgaction((f, (mf.flags(f), False), b"narrowspec updated"))
+            mresult.addfile(
+                f,
+                mergestatemod.ACTION_GET,
+                (mf.flags(f), False),
+                b"narrowspec updated",
+            )
     merge.applyupdates(
         repo,
-        actions,
+        mresult,
         wctx=repo[None],
         mctx=repo[b'.'],
         overwrite=False,