Mercurial > hg
comparison tests/test-resolve.t @ 40472: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 | f07ab9ddc0c0 |
children | db61a18148a4 |
comparison
equal
deleted
inserted
replaced
40459:5eaa5eb0db4e | 40472:da2e874fe582 |
---|---|
443 $ hg --config commands.resolve.mark-check=none resolve -m | 443 $ hg --config commands.resolve.mark-check=none resolve -m |
444 (no more unresolved files) | 444 (no more unresolved files) |
445 $ hg resolve -l | 445 $ hg resolve -l |
446 R file1 | 446 R file1 |
447 R file2 | 447 R file2 |
448 Test with marking an explicit file as resolved, this should not abort (since | |
449 there's no --force flag, we have no way of combining --all with a filename) | |
450 $ hg resolve --unmark | |
451 $ hg resolve -l | |
452 U file1 | |
453 U file2 | |
454 (This downgrades to a warning since an explicit file was specified). | |
455 $ hg --config commands.resolve.mark-check=abort resolve -m file2 | |
456 warning: the following files still have conflict markers: | |
457 file2 | |
458 $ hg resolve -l | |
459 U file1 | |
460 R file2 | |
448 Testing the --re-merge flag | 461 Testing the --re-merge flag |
449 $ hg resolve --unmark file1 | 462 $ hg resolve --unmark file1 |
450 $ hg resolve -l | 463 $ hg resolve -l |
451 U file1 | 464 U file1 |
452 R file2 | 465 R file2 |