changing-files: record merged files at commit time
The data is easy to gather at commit time, and we need it for changeset centric
copy tracing. Right now, it is not persisted so we cannot use it. However we
will fix this part very soon, gathering something to persist was necessary
first.
Differential Revision: https://phab.mercurial-scm.org/D9088
--- a/mercurial/commit.py Thu Sep 24 09:50:09 2020 +0200
+++ b/mercurial/commit.py Fri Sep 25 02:01:32 2020 +0200
@@ -181,6 +181,8 @@
if is_touched:
if is_touched == 'added':
files.mark_added(f)
+ elif is_touched == 'merged':
+ files.mark_merged(f)
else:
files.mark_touched(f)
m.setflag(f, fctx.flags())
@@ -347,7 +349,10 @@
text = fctx.data()
if fparent2 != nullid or meta or flog.cmp(fparent1, text) or force_new_node:
if touched is None: # do not overwrite added
- touched = 'modified'
+ if fparent2 == nullid:
+ touched = 'modified'
+ else:
+ touched = 'merged'
fnode = flog.add(text, meta, tr, linkrev, fparent1, fparent2)
# are just the flags changed during merge?
elif fname in manifest1 and manifest1.flags(fname) != fctx.flags():