Details
Details
- Reviewers
- None
- Group Reviewers
- hg-reviewers 
Diff Detail
Diff Detail
- Repository
- rHG Mercurial
- Branch
- default
- Lint
- No Linters Available 
- Unit
- No Unit Test Coverage 
| hg-reviewers | 
| No Linters Available | 
| No Unit Test Coverage | 
| Path | Packages | |||
|---|---|---|---|---|
| M | mercurial/logcmdutil.py (3 lines) | 
| Commit | Parents | Author | Summary | Date | 
|---|---|---|---|---|
| 482a50c1b309 | 6ee720e9a5fb | Joerg Sonnenberger | Mar 28 2021, 6:56 PM | 
| # logcmdutil.py - utility for log-like commands | # logcmdutil.py - utility for log-like commands | ||||
| # | # | ||||
| # Copyright 2005-2007 Olivia Mackall <olivia@selenic.com> | # Copyright 2005-2007 Olivia Mackall <olivia@selenic.com> | ||||
| # | # | ||||
| # This software may be used and distributed according to the terms of the | # This software may be used and distributed according to the terms of the | ||||
| # GNU General Public License version 2 or any later version. | # GNU General Public License version 2 or any later version. | ||||
| from __future__ import absolute_import | from __future__ import absolute_import | ||||
| import itertools | import itertools | ||||
| import os | import os | ||||
| import posixpath | import posixpath | ||||
| from .i18n import _ | from .i18n import _ | ||||
| from .node import ( | from .node import ( | ||||
| nullid, | nullid, | ||||
| nullrev, | |||||
| wdirid, | wdirid, | ||||
| wdirrev, | wdirrev, | ||||
| ) | ) | ||||
| from .thirdparty import attr | from .thirdparty import attr | ||||
| from . import ( | from . import ( | ||||
| dagop, | dagop, | ||||
| def diff_parent(ctx): | def diff_parent(ctx): | ||||
| """get the context object to use as parent when diffing | """get the context object to use as parent when diffing | ||||
| If diff.merge is enabled, an overlayworkingctx of the auto-merged parents will be returned. | If diff.merge is enabled, an overlayworkingctx of the auto-merged parents will be returned. | ||||
| """ | """ | ||||
| repo = ctx.repo() | 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 | # avoid cycle context -> subrepo -> cmdutil -> logcmdutil | ||||
| from . import context | from . import context | ||||
| wctx = context.overlayworkingctx(repo) | wctx = context.overlayworkingctx(repo) | ||||
| wctx.setbase(ctx.p1()) | wctx.setbase(ctx.p1()) | ||||
| with repo.ui.configoverride( | with repo.ui.configoverride( | ||||
| { | { | ||||
| ( | ( | ||||