Details
Details
- Reviewers
marmoute indygreg - Group Reviewers
hg-reviewers
Diff Detail
Diff Detail
- Repository
- rHG Mercurial
- Branch
- default
- Lint
No Linters Available - Unit
No Unit Test Coverage
marmoute | |
indygreg |
hg-reviewers |
No Linters Available |
No Unit Test Coverage |
Path | Packages | |||
---|---|---|---|---|
M | mercurial/cmdutil.py (5 lines) |
Commit | Parents | Author | Summary | Date |
---|---|---|---|---|
7eaa5323030c | e3d1461a9906 | Augie Fackler | May 18 2020, 4:44 PM |
crecord as crecordmod, | crecord as crecordmod, | ||||
dirstateguard, | dirstateguard, | ||||
encoding, | encoding, | ||||
error, | error, | ||||
formatter, | formatter, | ||||
logcmdutil, | logcmdutil, | ||||
match as matchmod, | match as matchmod, | ||||
merge as mergemod, | merge as mergemod, | ||||
mergestate as mergestatemod, | |||||
mergeutil, | mergeutil, | ||||
obsolete, | obsolete, | ||||
patch, | patch, | ||||
pathutil, | pathutil, | ||||
phases, | phases, | ||||
pycompat, | pycompat, | ||||
repair, | repair, | ||||
revlog, | revlog, | ||||
msg = _(b'No unresolved merge conflicts.') | msg = _(b'No unresolved merge conflicts.') | ||||
fm.plain(b'%s\n' % _commentlines(msg), label=self._label) | fm.plain(b'%s\n' % _commentlines(msg), label=self._label) | ||||
def readmorestatus(repo): | def readmorestatus(repo): | ||||
"""Returns a morestatus object if the repo has unfinished state.""" | """Returns a morestatus object if the repo has unfinished state.""" | ||||
statetuple = statemod.getrepostate(repo) | statetuple = statemod.getrepostate(repo) | ||||
mergestate = mergestatemod.mergestate.read(repo) | mergestate = repo[None].mergestate() | ||||
activemerge = mergestate.active() | activemerge = mergestate.active() | ||||
if not statetuple and not activemerge: | if not statetuple and not activemerge: | ||||
return None | return None | ||||
unfinishedop = unfinishedmsg = unresolved = None | unfinishedop = unfinishedmsg = unresolved = None | ||||
if statetuple: | if statetuple: | ||||
unfinishedop, unfinishedmsg = statetuple | unfinishedop, unfinishedmsg = statetuple | ||||
if activemerge: | if activemerge: | ||||
subs, commitsubs, newsubstate = subrepoutil.precommit( | subs, commitsubs, newsubstate = subrepoutil.precommit( | ||||
ui, wctx, wctx._status, matcher | ui, wctx, wctx._status, matcher | ||||
) | ) | ||||
# amend should abort if commitsubrepos is enabled | # amend should abort if commitsubrepos is enabled | ||||
assert not commitsubs | assert not commitsubs | ||||
if subs: | if subs: | ||||
subrepoutil.writestate(repo, newsubstate) | subrepoutil.writestate(repo, newsubstate) | ||||
ms = mergestatemod.mergestate.read(repo) | ms = repo[None].mergestate() | ||||
mergeutil.checkunresolved(ms) | mergeutil.checkunresolved(ms) | ||||
filestoamend = {f for f in wctx.files() if matcher(f)} | filestoamend = {f for f in wctx.files() if matcher(f)} | ||||
changes = len(filestoamend) > 0 | changes = len(filestoamend) > 0 | ||||
if changes: | if changes: | ||||
# Recompute copies (avoid recording a -> b -> a) | # Recompute copies (avoid recording a -> b -> a) | ||||
copied = copies.pathcopies(base, wctx, matcher) | copied = copies.pathcopies(base, wctx, matcher) |