Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/commands.py @ 40431:da2e874fe582 stable
resolve: when resolve.mark-check=abort, downgrade to warning if pats specified
Previously, with --config resolve.mark-check=abort, running `hg resolve -m foo`
would abort and emit a message saying to use --all. This command does not work,
though: `hg resolve -m foo --all`, and it's really weird for --all to be the
"--force" flag.
My original goal with the option was to make it so that `hg resolve -m` (no
filename arguments) was safer, which is why --all is used; in my mind, `hg
resolve -m foo` should always mark it as resolved, and `--all` is how you
specify "all the files", so that's why I chose `hg resolve -m --all` as the way
out of `hg resolve -m` aborting. This commit makes all of this work the way it
was meant to in my head :)
Differential Revision: https://phab.mercurial-scm.org/D5218
author | Kyle Lippincott <spectral@google.com> |
---|---|
date | Fri, 02 Nov 2018 11:57:45 -0700 |
parents | 1feb4b2c8e40 |
children | 3bc2e550f2bd db61a18148a4 |
comparison
equal
deleted
inserted
replaced
40430:5eaa5eb0db4e | 40431:da2e874fe582 |
---|---|
4910 raise | 4910 raise |
4911 | 4911 |
4912 if hasconflictmarkers: | 4912 if hasconflictmarkers: |
4913 ui.warn(_('warning: the following files still have conflict ' | 4913 ui.warn(_('warning: the following files still have conflict ' |
4914 'markers:\n ') + '\n '.join(hasconflictmarkers) + '\n') | 4914 'markers:\n ') + '\n '.join(hasconflictmarkers) + '\n') |
4915 if markcheck == 'abort' and not all: | 4915 if markcheck == 'abort' and not all and not pats: |
4916 raise error.Abort(_('conflict markers detected'), | 4916 raise error.Abort(_('conflict markers detected'), |
4917 hint=_('use --all to mark anyway')) | 4917 hint=_('use --all to mark anyway')) |
4918 | 4918 |
4919 for f in tocomplete: | 4919 for f in tocomplete: |
4920 try: | 4920 try: |