Happily, this resolves an import cycle!
Details
Details
Diff Detail
Diff Detail
- Repository
- rHG Mercurial
- Branch
- default
- Lint
No Linters Available - Unit
No Unit Test Coverage
marmoute | |
indygreg |
hg-reviewers |
Happily, this resolves an import cycle!
No Linters Available |
No Unit Test Coverage |
Path | Packages | |||
---|---|---|---|---|
M | mercurial/revset.py (10 lines) |
Commit | Parents | Author | Summary | Date |
---|---|---|---|---|
e3e722398c1b | ae83bc916d12 | Augie Fackler | May 18 2020, 4:46 PM |
@predicate(b'conflictlocal()', safe=True) | @predicate(b'conflictlocal()', safe=True) | ||||
def conflictlocal(repo, subset, x): | def conflictlocal(repo, subset, x): | ||||
"""The local side of the merge, if currently in an unresolved merge. | """The local side of the merge, if currently in an unresolved merge. | ||||
"merge" here includes merge conflicts from e.g. 'hg rebase' or 'hg graft'. | "merge" here includes merge conflicts from e.g. 'hg rebase' or 'hg graft'. | ||||
""" | """ | ||||
getargs(x, 0, 0, _(b"conflictlocal takes no arguments")) | getargs(x, 0, 0, _(b"conflictlocal takes no arguments")) | ||||
from . import mergestate as mergestatemod | |||||
mergestate = mergestatemod.mergestate.read(repo) | mergestate = repo[None].mergestate() | ||||
if mergestate.active() and repo.changelog.hasnode(mergestate.local): | if mergestate.active() and repo.changelog.hasnode(mergestate.local): | ||||
return subset & {repo.changelog.rev(mergestate.local)} | return subset & {repo.changelog.rev(mergestate.local)} | ||||
return baseset() | return baseset() | ||||
@predicate(b'conflictother()', safe=True) | @predicate(b'conflictother()', safe=True) | ||||
def conflictother(repo, subset, x): | def conflictother(repo, subset, x): | ||||
"""The other side of the merge, if currently in an unresolved merge. | """The other side of the merge, if currently in an unresolved merge. | ||||
"merge" here includes merge conflicts from e.g. 'hg rebase' or 'hg graft'. | "merge" here includes merge conflicts from e.g. 'hg rebase' or 'hg graft'. | ||||
""" | """ | ||||
getargs(x, 0, 0, _(b"conflictother takes no arguments")) | getargs(x, 0, 0, _(b"conflictother takes no arguments")) | ||||
from . import mergestate as mergestatemod | |||||
mergestate = mergestatemod.mergestate.read(repo) | mergestate = repo[None].mergestate() | ||||
if mergestate.active() and repo.changelog.hasnode(mergestate.other): | if mergestate.active() and repo.changelog.hasnode(mergestate.other): | ||||
return subset & {repo.changelog.rev(mergestate.other)} | return subset & {repo.changelog.rev(mergestate.other)} | ||||
return baseset() | return baseset() | ||||
@predicate(b'contains(pattern)', weight=100) | @predicate(b'contains(pattern)', weight=100) | ||||
def contains(repo, subset, x): | def contains(repo, subset, x): |