[Commented On] D9802: copies: explicitly filter out existing file in graftcopies
baymax (Baymax, Your Personal Patch-care Companion)
phabricator at mercurial-scm.org
Tue Jan 26 06:31:37 UTC 2021
baymax added a comment.
baymax updated this revision to Diff 25264.
✅ refresh by Heptapod after a successful CI run (🐙 💚)
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D9802?vs=25105&id=25264
BRANCH
default
CHANGES SINCE LAST ACTION
https://phab.mercurial-scm.org/D9802/new/
REVISION DETAIL
https://phab.mercurial-scm.org/D9802
AFFECTED FILES
mercurial/copies.py
CHANGE DETAILS
diff --git a/mercurial/copies.py b/mercurial/copies.py
--- a/mercurial/copies.py
+++ b/mercurial/copies.py
@@ -1220,6 +1220,12 @@
by merge.update().
"""
new_copies = pathcopies(base, ctx)
- _filter(wctx.p1(), wctx, new_copies)
+ parent = wctx.p1()
+ _filter(parent, wctx, new_copies)
+ # extra filtering to drop copy information for files that existed before
+ # the graft (otherwise we would create merge filelog for non-merge commit
+ for dest, __ in list(new_copies.items()):
+ if dest in parent:
+ del new_copies[dest]
for dst, src in pycompat.iteritems(new_copies):
wctx[dst].markcopied(src)
To: marmoute, #hg-reviewers
Cc: mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20210126/9aeb04a3/attachment-0002.html>
More information about the Mercurial-patches
mailing list