changeset 48147:142e9f0a70b5

status: process `from_p2` file the same as `merged` one What matters here is that the file constains information coming from the second parent and should be considered `modified` on plain `hg status. So we can process `from_p2` file sooner. It also highlight that we probably don't need the merged/from_p2 distinction at higher level. Differential Revision: https://phab.mercurial-scm.org/D11591
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Wed, 29 Sep 2021 02:06:04 +0200
parents de0977ec2d25
children e2753a7acfa7
files mercurial/dirstate.py
diffstat 1 files changed, 1 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/dirstate.py	Fri Oct 01 02:43:39 2021 +0200
+++ b/mercurial/dirstate.py	Wed Sep 29 02:06:04 2021 +0200
@@ -1372,7 +1372,7 @@
 
             if not st and t.tracked:
                 dadd(fn)
-            elif t.merged:
+            elif t.merged or t.from_p2:
                 madd(fn)
             elif t.added:
                 aadd(fn)
@@ -1385,7 +1385,6 @@
                         (size != st.st_size and size != st.st_size & _rangemask)
                         or ((mode ^ st.st_mode) & 0o100 and checkexec)
                     )
-                    or t.from_p2
                     or fn in copymap
                 ):
                     if stat.S_ISLNK(st.st_mode) and size != st.st_size: