diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py --- a/mercurial/localrepo.py +++ b/mercurial/localrepo.py @@ -2808,6 +2808,11 @@ fparent1 = manifest1.get(fname, nullid) fparent2 = manifest2.get(fname, nullid) if isinstance(fctx, context.filectx): + # This block fast path most comparison, making the assumption that + # is a bare filectx is used, no merge happened on this file., and + # therefor they are chance of needing to a create a new file + # revision, even if the content was identical to one of the + # parents. node = fctx.filenode() if node in [fparent1, fparent2]: self.ui.debug(b'reusing %s filelog entry\n' % fname)