I guess this should have been part of 72a9aacff645 (resolve: respect
ui.relative-paths, 2019-01-29).
Details
Details
Diff Detail
Diff Detail
- Repository
- rHG Mercurial
- Lint
Lint Skipped - Unit
Unit Tests Skipped
( )
I guess this should have been part of 72a9aacff645 (resolve: respect
ui.relative-paths, 2019-01-29).
Lint Skipped |
Unit Tests Skipped |
Path | Packages | |||
---|---|---|---|---|
M | mercurial/commands.py (10 lines) |
Commit | Parents | Author | Summary | Date |
---|---|---|---|---|
Martin von Zweigbergk | Feb 11 2019, 1:18 AM |
Status | Author | Revision | |
---|---|---|---|
Closed | martinvonz | ||
Closed | martinvonz | ||
Closed | martinvonz | ||
Closed | martinvonz | ||
Closed | martinvonz |
# don't let driver-resolved files be marked, and run the conclude | # don't let driver-resolved files be marked, and run the conclude | ||||
# step if asked to resolve | # step if asked to resolve | ||||
if ms[f] == mergemod.MERGE_RECORD_DRIVER_RESOLVED: | if ms[f] == mergemod.MERGE_RECORD_DRIVER_RESOLVED: | ||||
exact = m.exact(f) | exact = m.exact(f) | ||||
if mark: | if mark: | ||||
if exact: | if exact: | ||||
ui.warn(_('not marking %s as it is driver-resolved\n') | ui.warn(_('not marking %s as it is driver-resolved\n') | ||||
% f) | % uipathfn(f)) | ||||
elif unmark: | elif unmark: | ||||
if exact: | if exact: | ||||
ui.warn(_('not unmarking %s as it is driver-resolved\n') | ui.warn(_('not unmarking %s as it is driver-resolved\n') | ||||
% f) | % uipathfn(f)) | ||||
else: | else: | ||||
runconclude = True | runconclude = True | ||||
continue | continue | ||||
# path conflicts must be resolved manually | # path conflicts must be resolved manually | ||||
if ms[f] in (mergemod.MERGE_RECORD_UNRESOLVED_PATH, | if ms[f] in (mergemod.MERGE_RECORD_UNRESOLVED_PATH, | ||||
mergemod.MERGE_RECORD_RESOLVED_PATH): | mergemod.MERGE_RECORD_RESOLVED_PATH): | ||||
if mark: | if mark: | ||||
ms.mark(f, mergemod.MERGE_RECORD_RESOLVED_PATH) | ms.mark(f, mergemod.MERGE_RECORD_RESOLVED_PATH) | ||||
elif unmark: | elif unmark: | ||||
ms.mark(f, mergemod.MERGE_RECORD_UNRESOLVED_PATH) | ms.mark(f, mergemod.MERGE_RECORD_UNRESOLVED_PATH) | ||||
elif ms[f] == mergemod.MERGE_RECORD_UNRESOLVED_PATH: | elif ms[f] == mergemod.MERGE_RECORD_UNRESOLVED_PATH: | ||||
ui.warn(_('%s: path conflict must be resolved manually\n') | ui.warn(_('%s: path conflict must be resolved manually\n') | ||||
% f) | % uipathfn(f)) | ||||
continue | continue | ||||
if mark: | if mark: | ||||
if markcheck: | if markcheck: | ||||
fdata = repo.wvfs.tryread(f) | fdata = repo.wvfs.tryread(f) | ||||
if filemerge.hasconflictmarkers(fdata) and \ | if filemerge.hasconflictmarkers(fdata) and \ | ||||
ms[f] != mergemod.MERGE_RECORD_RESOLVED: | ms[f] != mergemod.MERGE_RECORD_RESOLVED: | ||||
hasconflictmarkers.append(f) | hasconflictmarkers.append(f) | ||||
util.rename(a + ".resolve", | util.rename(a + ".resolve", | ||||
scmutil.backuppath(ui, repo, f)) | scmutil.backuppath(ui, repo, f)) | ||||
except OSError as inst: | except OSError as inst: | ||||
if inst.errno != errno.ENOENT: | if inst.errno != errno.ENOENT: | ||||
raise | raise | ||||
if hasconflictmarkers: | if hasconflictmarkers: | ||||
ui.warn(_('warning: the following files still have conflict ' | ui.warn(_('warning: the following files still have conflict ' | ||||
'markers:\n ') + '\n '.join(hasconflictmarkers) + '\n') | 'markers:\n ') + | ||||
'\n '.join(uipathfn(f) for f in hasconflictmarkers) + | |||||
'\n') | |||||
if markcheck == 'abort' and not all and not pats: | if markcheck == 'abort' and not all and not pats: | ||||
raise error.Abort(_('conflict markers detected'), | raise error.Abort(_('conflict markers detected'), | ||||
hint=_('use --all to mark anyway')) | hint=_('use --all to mark anyway')) | ||||
for f in tocomplete: | for f in tocomplete: | ||||
try: | try: | ||||
# resolve file | # resolve file | ||||
overrides = {('ui', 'forcemerge'): opts.get('tool', '')} | overrides = {('ui', 'forcemerge'): opts.get('tool', '')} |