[Request] [+ ] D9088: changing-files: record merged files at commit time
marmoute (Pierre-Yves David)
phabricator at mercurial-scm.org
Sat Sep 26 12:10:08 UTC 2020
marmoute created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.
REVISION SUMMARY
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.
REPOSITORY
rHG Mercurial
BRANCH
default
REVISION DETAIL
https://phab.mercurial-scm.org/D9088
AFFECTED FILES
mercurial/commit.py
CHANGE DETAILS
diff --git a/mercurial/commit.py b/mercurial/commit.py
--- a/mercurial/commit.py
+++ b/mercurial/commit.py
@@ -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())
@@ -336,7 +338,10 @@
text = fctx.data()
if fparent2 != nullid or meta or flog.cmp(fparent1, text):
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():
To: marmoute, #hg-reviewers
Cc: mercurial-patches, mercurial-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mercurial-scm.org/pipermail/mercurial-patches/attachments/20200926/db5abf19/attachment.html>
More information about the Mercurial-patches
mailing list