equal
deleted
inserted
replaced
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()) |