--- a/mercurial/copies.py Tue Mar 30 02:33:12 2021 +0200
+++ b/mercurial/copies.py Tue Mar 30 02:32:30 2021 +0200
@@ -149,7 +149,7 @@
# optimization, since the ctx.files() for a merge commit is not correct for
# this comparison.
forwardmissingmatch = match
- if b.p1() == a and b.p2().node() == nullid:
+ if b.p1() == a and b.p2().rev() == nullrev:
filesmatcher = matchmod.exact(b.files())
forwardmissingmatch = matchmod.intersectmatchers(match, filesmatcher)
if repo.ui.configbool(b'devel', b'copy-tracing.trace-all-files'):