Details
Details
- Reviewers
- None
- Group Reviewers
hg-reviewers - Commits
- rHG7e75777e4a51: resolve: correct behavior of mark-check=none to match docs
Diff Detail
Diff Detail
- Repository
- rHG Mercurial
- Lint
Lint Skipped - Unit
Unit Tests Skipped
( )
| hg-reviewers |
| Lint Skipped |
| Unit Tests Skipped |
| Path | Packages | |||
|---|---|---|---|---|
| M | mercurial/commands.py (3 lines) | |||
| M | mercurial/configitems.py (2 lines) | |||
| M | tests/test-resolve.t (21 lines) |
| Commit | Parents | Author | Summary | Date |
|---|---|---|---|---|
| Kyle Lippincott | Aug 5 2018, 3:53 AM |
| ret = 0 | ret = 0 | ||||
| didwork = False | didwork = False | ||||
| runconclude = False | runconclude = False | ||||
| tocomplete = [] | tocomplete = [] | ||||
| hasconflictmarkers = [] | hasconflictmarkers = [] | ||||
| if mark: | if mark: | ||||
| markcheck = ui.config('commands', 'resolve.mark-check') | markcheck = ui.config('commands', 'resolve.mark-check') | ||||
| if markcheck not in ['warn', 'abort']: | |||||
| # Treat all invalid / unrecognized values as 'none'. | |||||
| markcheck = False | |||||
| for f in ms: | for f in ms: | ||||
| if not m(f): | if not m(f): | ||||
| continue | continue | ||||
| didwork = True | didwork = True | ||||
| # 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 | ||||
| ) | ) | ||||
| coreconfigitem('commands', 'grep.all-files', | coreconfigitem('commands', 'grep.all-files', | ||||
| default=False, | default=False, | ||||
| ) | ) | ||||
| coreconfigitem('commands', 'resolve.confirm', | coreconfigitem('commands', 'resolve.confirm', | ||||
| default=False, | default=False, | ||||
| ) | ) | ||||
| coreconfigitem('commands', 'resolve.mark-check', | coreconfigitem('commands', 'resolve.mark-check', | ||||
| default=None, | default='none', | ||||
| ) | ) | ||||
| coreconfigitem('commands', 'show.aliasprefix', | coreconfigitem('commands', 'show.aliasprefix', | ||||
| default=list, | default=list, | ||||
| ) | ) | ||||
| coreconfigitem('commands', 'status.relative', | coreconfigitem('commands', 'status.relative', | ||||
| default=False, | default=False, | ||||
| ) | ) | ||||
| coreconfigitem('commands', 'status.skipstates', | coreconfigitem('commands', 'status.skipstates', | ||||
| Try with --all from the hint | Try with --all from the hint | ||||
| $ hg --config commands.resolve.mark-check=abort resolve -m --all | $ hg --config commands.resolve.mark-check=abort resolve -m --all | ||||
| warning: the following files still have conflict markers: | warning: the following files still have conflict markers: | ||||
| file2 | file2 | ||||
| (no more unresolved files) | (no more unresolved files) | ||||
| $ hg resolve -l | $ hg resolve -l | ||||
| R file1 | R file1 | ||||
| R file2 | R file2 | ||||
| Test option value 'warn' | |||||
| $ hg resolve --unmark | $ hg resolve --unmark | ||||
| $ hg resolve -l | $ hg resolve -l | ||||
| U file1 | U file1 | ||||
| U file2 | U file2 | ||||
| $ hg --config commands.resolve.mark-check=warn resolve -m | $ hg --config commands.resolve.mark-check=warn resolve -m | ||||
| warning: the following files still have conflict markers: | warning: the following files still have conflict markers: | ||||
| file2 | file2 | ||||
| (no more unresolved files) | (no more unresolved files) | ||||
| $ hg resolve -l | $ hg resolve -l | ||||
| R file1 | R file1 | ||||
| R file2 | R file2 | ||||
| If the file is already marked as resolved, we don't warn about it | If the file is already marked as resolved, we don't warn about it | ||||
| $ hg resolve --unmark file1 | $ hg resolve --unmark file1 | ||||
| $ hg resolve -l | $ hg resolve -l | ||||
| U file1 | U file1 | ||||
| R file2 | R file2 | ||||
| $ hg --config commands.resolve.mark-check=warn resolve -m | $ hg --config commands.resolve.mark-check=warn resolve -m | ||||
| (no more unresolved files) | (no more unresolved files) | ||||
| $ hg resolve -l | $ hg resolve -l | ||||
| R file1 | R file1 | ||||
| R file2 | R file2 | ||||
| If the user passes an invalid value, we treat it as 'none'. | |||||
| $ hg resolve --unmark | |||||
| $ hg resolve -l | |||||
| U file1 | |||||
| U file2 | |||||
| $ hg --config commands.resolve.mark-check=nope resolve -m | |||||
| (no more unresolved files) | |||||
| $ hg resolve -l | |||||
| R file1 | |||||
| R file2 | |||||
| Test explicitly setting the otion to 'none' | |||||
| $ hg resolve --unmark | |||||
| $ hg resolve -l | |||||
| U file1 | |||||
| U file2 | |||||
| $ hg --config commands.resolve.mark-check=none resolve -m | |||||
| (no more unresolved files) | |||||
| $ hg resolve -l | |||||
| R file1 | |||||
| R file2 | |||||
| $ cd .. | $ cd .. | ||||
| ====================================================== | ====================================================== | ||||
| Test 'hg resolve' confirm config option functionality | | Test 'hg resolve' confirm config option functionality | | ||||
| ====================================================== | ====================================================== | ||||
| $ cat >> $HGRCPATH << EOF | $ cat >> $HGRCPATH << EOF | ||||
| > [extensions] | > [extensions] | ||||