mercurial/logcmdutil.py
changeset 46843 728d89f6f9b1
parent 46819 d4ba4d51f85f
child 47012 d55b71393907
equal deleted inserted replaced
46842:ad878e3f282b 46843:728d89f6f9b1
    12 import posixpath
    12 import posixpath
    13 
    13 
    14 from .i18n import _
    14 from .i18n import _
    15 from .node import (
    15 from .node import (
    16     nullid,
    16     nullid,
       
    17     nullrev,
    17     wdirid,
    18     wdirid,
    18     wdirrev,
    19     wdirrev,
    19 )
    20 )
    20 
    21 
    21 from .thirdparty import attr
    22 from .thirdparty import attr
    80 
    81 
    81 
    82 
    82     If diff.merge is enabled, an overlayworkingctx of the auto-merged parents will be returned.
    83     If diff.merge is enabled, an overlayworkingctx of the auto-merged parents will be returned.
    83     """
    84     """
    84     repo = ctx.repo()
    85     repo = ctx.repo()
    85     if repo.ui.configbool(b"diff", b"merge") and ctx.p2().node() != nullid:
    86     if repo.ui.configbool(b"diff", b"merge") and ctx.p2().rev() != nullrev:
    86         # avoid cycle context -> subrepo -> cmdutil -> logcmdutil
    87         # avoid cycle context -> subrepo -> cmdutil -> logcmdutil
    87         from . import context
    88         from . import context
    88 
    89 
    89         wctx = context.overlayworkingctx(repo)
    90         wctx = context.overlayworkingctx(repo)
    90         wctx.setbase(ctx.p1())
    91         wctx.setbase(ctx.p1())