--- a/mercurial/cmdutil.py Thu Apr 21 10:39:52 2022 -0700
+++ b/mercurial/cmdutil.py Thu May 12 07:36:37 2022 -0700
@@ -2914,9 +2914,9 @@
# filectxs from the old commit.
if changes or changeset_copies:
# Recompute copies (avoid recording a -> b -> a)
- copied = copies.pathcopies(base, wctx, matcher)
- if old.p2:
- copied.update(copies.pathcopies(old.p2(), wctx, matcher))
+ copied = copies.pathcopies(base, wctx)
+ if old.p2():
+ copied.update(copies.pathcopies(old.p2(), wctx))
# Prune files which were reverted by the updates: if old
# introduced file X and the file was renamed in the working