[Updated] D11851: update: properly overwrite `check` config with `--no-` variants
marmoute (Pierre-Yves David)
phabricator at mercurial-scm.org
Fri Dec 3 14:53:30 UTC 2021
Closed by commit rHG4d59e0f909e0: update: properly overwrite `check` config with `--no-` variants (authored by marmoute).
This revision was automatically updated to reflect the committed changes.
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D11851?vs=31296&id=31301
CHANGES SINCE LAST ACTION
https://phab.mercurial-scm.org/D11851/new/
REVISION DETAIL
https://phab.mercurial-scm.org/D11851
AFFECTED FILES
mercurial/commands.py
relnotes/next
tests/test-update-branches.t
CHANGE DETAILS
diff --git a/tests/test-update-branches.t b/tests/test-update-branches.t
--- a/tests/test-update-branches.t
+++ b/tests/test-update-branches.t
@@ -226,6 +226,11 @@
parent=2
M foo
+ $ revtest '--merge none dirty linear' dirty 1 2 --no-check
+ 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+ parent=2
+ M foo
+
$ revtest 'none dirty linear' dirty 1 2 --clean
2 files updated, 0 files merged, 0 files removed, 0 files unresolved
parent=2
@@ -247,6 +252,11 @@
parent=1
M foo
+ $ revtest 'none dirty linear' dirty 1 2 --no-merge
+ abort: uncommitted changes
+ parent=1
+ M foo
+
$ revtest 'none dirty linear' dirty 1 2 --clean
2 files updated, 0 files merged, 0 files removed, 0 files unresolved
parent=2
diff --git a/relnotes/next b/relnotes/next
--- a/relnotes/next
+++ b/relnotes/next
@@ -11,6 +11,7 @@
== Bug Fixes ==
+The `--no-check` and `--no-merge` now properly overwrite the behavior from `commands.update.check`.
== Backwards Compatibility Changes ==
diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -7832,9 +7832,9 @@
raise error.InputError(_(b"you can't specify a revision and a date"))
updatecheck = None
- if check:
+ if check or merge is not None and not merge:
updatecheck = b'abort'
- elif merge:
+ elif merge or check is not None and not check:
updatecheck = b'none'
with repo.wlock():
To: marmoute, #hg-reviewers, Alphare
Cc: mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20211203/aaee7601/attachment-0002.html>
More information about the Mercurial-patches
mailing list