Before this change --merge override commands.update.check=abort/noconflict,
and --check "override" commands.update.check=none/linear. However the
--no-merge and --no-check version where not doing anything.
The --no- two flags now behave properly.
Alphare |
hg-reviewers |
Before this change --merge override commands.update.check=abort/noconflict,
and --check "override" commands.update.check=none/linear. However the
--no-merge and --no-check version where not doing anything.
The --no- two flags now behave properly.
Automatic diff as part of commit; lint not applicable. |
Automatic diff as part of commit; unit tests not applicable. |
Path | Packages | |||
---|---|---|---|---|
M | mercurial/commands.py (4 lines) | |||
M | relnotes/next (1 line) | |||
M | tests/test-update-branches.t (10 lines) |
if rev is None or rev == b'': | if rev is None or rev == b'': | ||||
rev = node | rev = node | ||||
if date and rev is not None: | if date and rev is not None: | ||||
raise error.InputError(_(b"you can't specify a revision and a date")) | raise error.InputError(_(b"you can't specify a revision and a date")) | ||||
updatecheck = None | updatecheck = None | ||||
if check: | if check or merge is not None and not merge: | ||||
updatecheck = b'abort' | updatecheck = b'abort' | ||||
elif merge: | elif merge or check is not None and not check: | ||||
updatecheck = b'none' | updatecheck = b'none' | ||||
with repo.wlock(): | with repo.wlock(): | ||||
cmdutil.clearunfinished(repo) | cmdutil.clearunfinished(repo) | ||||
if date: | if date: | ||||
rev = cmdutil.finddate(ui, repo, date) | rev = cmdutil.finddate(ui, repo, date) | ||||
# if we defined a bookmark, we have to remember the original name | # if we defined a bookmark, we have to remember the original name |
== New Features == | == New Features == | ||||
== Default Format Change == | == Default Format Change == | ||||
These changes affects newly created repositories (or new clone) done with | These changes affects newly created repositories (or new clone) done with | ||||
Mercurial XXX. | Mercurial XXX. | ||||
== New Experimental Features == | == New Experimental Features == | ||||
== Bug Fixes == | == Bug Fixes == | ||||
The `--no-check` and `--no-merge` now properly overwrite the behavior from `commands.update.check`. | |||||
== Backwards Compatibility Changes == | == Backwards Compatibility Changes == | ||||
== Internal API Changes == | == Internal API Changes == | ||||
The following functions have been removed: | The following functions have been removed: | ||||
Miscellaneous: | Miscellaneous: |
parent=1 | parent=1 | ||||
M foo | M foo | ||||
$ revtest '--merge none dirty linear' dirty 1 2 --merge | $ revtest '--merge none dirty linear' dirty 1 2 --merge | ||||
1 files updated, 0 files merged, 0 files removed, 0 files unresolved | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | ||||
parent=2 | parent=2 | ||||
M foo | 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 | $ revtest 'none dirty linear' dirty 1 2 --clean | ||||
2 files updated, 0 files merged, 0 files removed, 0 files unresolved | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | ||||
parent=2 | parent=2 | ||||
$ echo 'update.check = none' >> .hg/hgrc | $ echo 'update.check = none' >> .hg/hgrc | ||||
$ revtest 'none dirty cross' dirty 3 4 | $ revtest 'none dirty cross' dirty 3 4 | ||||
1 files updated, 0 files merged, 0 files removed, 0 files unresolved | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | ||||
parent=4 | parent=4 | ||||
M foo | M foo | ||||
$ revtest 'none dirty linear' dirty 1 2 | $ revtest 'none dirty linear' dirty 1 2 | ||||
1 files updated, 0 files merged, 0 files removed, 0 files unresolved | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | ||||
parent=2 | parent=2 | ||||
M foo | M foo | ||||
$ revtest 'none dirty linear' dirty 1 2 --check | $ revtest 'none dirty linear' dirty 1 2 --check | ||||
abort: uncommitted changes | abort: uncommitted changes | ||||
parent=1 | parent=1 | ||||
M foo | 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 | $ revtest 'none dirty linear' dirty 1 2 --clean | ||||
2 files updated, 0 files merged, 0 files removed, 0 files unresolved | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | ||||
parent=2 | parent=2 | ||||
$ hg co -qC 3 | $ hg co -qC 3 | ||||
$ echo dirty >> a | $ echo dirty >> a | ||||
$ hg co --tool :merge3 4 | $ hg co --tool :merge3 4 | ||||
merging a | merging a |