Details
Details
Diff Detail
Diff Detail
- Repository
- rHG Mercurial
- Lint
Lint Skipped - Unit
Unit Tests Skipped
Lint Skipped |
Unit Tests Skipped |
Path | Packages | |||
---|---|---|---|---|
M | mercurial/commands.py (3 lines) |
Commit | Parents | Author | Summary | Date |
---|---|---|---|---|
Martin von Zweigbergk | Jan 29 2019, 3:01 PM |
Status | Author | Revision | |
---|---|---|---|
Closed | martinvonz | ||
Closed | martinvonz | ||
Closed | martinvonz | ||
Closed | martinvonz | ||
Closed | martinvonz | ||
Closed | martinvonz | ||
Closed | martinvonz |
if ui.promptchoice(_(b'mark all unresolved files as resolved (yn)?' | if ui.promptchoice(_(b'mark all unresolved files as resolved (yn)?' | ||||
b'$$ &Yes $$ &No')): | b'$$ &Yes $$ &No')): | ||||
raise error.Abort(_('user quit')) | raise error.Abort(_('user quit')) | ||||
if unmark and not pats: | if unmark and not pats: | ||||
if ui.promptchoice(_(b'mark all resolved files as unresolved (yn)?' | if ui.promptchoice(_(b'mark all resolved files as unresolved (yn)?' | ||||
b'$$ &Yes $$ &No')): | b'$$ &Yes $$ &No')): | ||||
raise error.Abort(_('user quit')) | raise error.Abort(_('user quit')) | ||||
uipathfn = scmutil.getuipathfn(repo) | |||||
if show: | if show: | ||||
ui.pager('resolve') | ui.pager('resolve') | ||||
fm = ui.formatter('resolve', opts) | fm = ui.formatter('resolve', opts) | ||||
ms = mergemod.mergestate.read(repo) | ms = mergemod.mergestate.read(repo) | ||||
wctx = repo[None] | wctx = repo[None] | ||||
m = scmutil.match(wctx, pats, opts) | m = scmutil.match(wctx, pats, opts) | ||||
# Labels and keys based on merge state. Unresolved path conflicts show | # Labels and keys based on merge state. Unresolved path conflicts show | ||||
if not m(f): | if not m(f): | ||||
continue | continue | ||||
label, key = mergestateinfo[ms[f]] | label, key = mergestateinfo[ms[f]] | ||||
fm.startitem() | fm.startitem() | ||||
fm.context(ctx=wctx) | fm.context(ctx=wctx) | ||||
fm.condwrite(not nostatus, 'mergestatus', '%s ', key, label=label) | fm.condwrite(not nostatus, 'mergestatus', '%s ', key, label=label) | ||||
fm.write('path', '%s\n', f, label=label) | fm.write('path', '%s\n', f, label=label) | ||||
fm.plain('%s\n' % uipathfn(f), label=label) | |||||
fm.end() | fm.end() | ||||
return 0 | return 0 | ||||
with repo.wlock(): | with repo.wlock(): | ||||
ms = mergemod.mergestate.read(repo) | ms = mergemod.mergestate.read(repo) | ||||
if not (ms.active() or repo.dirstate.p2() != nullid): | if not (ms.active() or repo.dirstate.p2() != nullid): | ||||
raise error.Abort( | raise error.Abort( |