mercurial/mergestate.py
changeset 45524 6877b0ee5f9d
parent 45518 32ce4cbaec4b
child 45525 590a840fa367
--- a/mercurial/mergestate.py	Mon Sep 21 10:23:25 2020 -0400
+++ b/mercurial/mergestate.py	Wed Sep 09 16:49:19 2020 +0530
@@ -117,6 +117,9 @@
 # keep it absent (absent means file not present, it can be a result
 # of file deletion, rename etc.)
 ACTION_KEEP_ABSENT = b'ka'
+# the file is absent on the ancestor and remote side of the merge
+# hence this file is new and we should keep it
+ACTION_KEEP_NEW = b'kn'
 ACTION_EXEC = b'e'
 ACTION_CREATED_MERGE = b'cm'
 
@@ -767,6 +770,10 @@
     for f, args, msg in actions.get(ACTION_KEEP_ABSENT, []):
         pass
 
+    # keep new
+    for f, args, msg in actions.get(ACTION_KEEP_NEW, []):
+        pass
+
     # get
     for f, args, msg in actions.get(ACTION_GET, []):
         if branchmerge: