Patchwork D10283: copies: simplify

login
register
mail settings
Submitter phabricator
Date March 28, 2021, 10:38 p.m.
Message ID <differential-rev-PHID-DREV-zwubo3ym6sdtv5xztbbs-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/48599/
State Superseded
Headers show

Comments

phabricator - March 28, 2021, 10:38 p.m.
joerg.sonnenberger created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REPOSITORY
  rHG Mercurial

BRANCH
  default

REVISION DETAIL
  https://phab.mercurial-scm.org/D10283

AFFECTED FILES
  mercurial/copies.py

CHANGE DETAILS




To: joerg.sonnenberger, #hg-reviewers
Cc: mercurial-patches, mercurial-devel

Patch

diff --git a/mercurial/copies.py b/mercurial/copies.py
--- a/mercurial/copies.py
+++ b/mercurial/copies.py
@@ -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'):