diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py --- a/mercurial/cmdutil.py +++ b/mercurial/cmdutil.py @@ -2915,9 +2915,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 diff --git a/tests/test-amend.t b/tests/test-amend.t --- a/tests/test-amend.t +++ b/tests/test-amend.t @@ -625,4 +625,4 @@ $ hg status --change . --copies A new_file_amend_me A r0_copied - r0 (missing-correct-output !) + r0