Patchwork D10285: logcmdutil: simplify

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

Comments

phabricator - March 28, 2021, 11:10 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/D10285

AFFECTED FILES
  mercurial/logcmdutil.py

CHANGE DETAILS




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

Patch

diff --git a/mercurial/logcmdutil.py b/mercurial/logcmdutil.py
--- a/mercurial/logcmdutil.py
+++ b/mercurial/logcmdutil.py
@@ -14,6 +14,7 @@ 
 from .i18n import _
 from .node import (
     nullid,
+    nullrev,
     wdirid,
     wdirrev,
 )
@@ -82,7 +83,7 @@ 
     If diff.merge is enabled, an overlayworkingctx of the auto-merged parents will be returned.
     """
     repo = ctx.repo()
-    if repo.ui.configbool(b"diff", b"merge") and ctx.p2().node() != nullid:
+    if repo.ui.configbool(b"diff", b"merge") and ctx.p2().rev() != nullrev:
         # avoid cycle context -> subrepo -> cmdutil -> logcmdutil
         from . import context