D1070: config: graduate experimental.updatecheck to commands.update.check
durin42 (Augie Fackler)
phabricator at mercurial-scm.org
Sat Oct 14 07:15:29 UTC 2017
durin42 created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.
REVISION SUMMARY
No backwards compatibility provided for the legacy name. Perhaps we
should provide that for a release cycle? I don't feel strongly.
REPOSITORY
rHG Mercurial
REVISION DETAIL
https://phab.mercurial-scm.org/D1070
AFFECTED FILES
mercurial/configitems.py
mercurial/hg.py
tests/test-pull-update.t
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
@@ -198,8 +198,8 @@
parent=1
M foo
- $ echo '[experimental]' >> .hg/hgrc
- $ echo 'updatecheck = abort' >> .hg/hgrc
+ $ echo '[commands]' >> .hg/hgrc
+ $ echo 'update.check = abort' >> .hg/hgrc
$ revtest 'none dirty linear' dirty 1 2
abort: uncommitted changes
@@ -215,7 +215,7 @@
2 files updated, 0 files merged, 0 files removed, 0 files unresolved
parent=2
- $ echo 'updatecheck = none' >> .hg/hgrc
+ $ echo 'update.check = none' >> .hg/hgrc
$ revtest 'none dirty cross' dirty 3 4
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
@@ -258,7 +258,7 @@
>>>>>>> destination: d047485b3896 b1 - test: 4
$ rm a.orig
- $ echo 'updatecheck = noconflict' >> .hg/hgrc
+ $ echo 'update.check = noconflict' >> .hg/hgrc
$ revtest 'none dirty cross' dirty 3 4
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
@@ -315,7 +315,7 @@
$ hg up -q 4
Uses default value of "linear" when value is misspelled
- $ echo 'updatecheck = linyar' >> .hg/hgrc
+ $ echo 'update.check = linyar' >> .hg/hgrc
$ revtest 'dirty cross' dirty 3 4
abort: uncommitted changes
diff --git a/tests/test-pull-update.t b/tests/test-pull-update.t
--- a/tests/test-pull-update.t
+++ b/tests/test-pull-update.t
@@ -19,7 +19,7 @@
Should respect config to disable dirty update
$ hg co -qC 0
$ echo 2 > foo
- $ hg --config experimental.updatecheck=abort pull -u ../tt
+ $ hg --config commands.update.check=abort pull -u ../tt
pulling from ../tt
searching for changes
adding changesets
diff --git a/mercurial/hg.py b/mercurial/hg.py
--- a/mercurial/hg.py
+++ b/mercurial/hg.py
@@ -757,7 +757,7 @@
This returns whether conflict is detected at updating or not.
"""
if updatecheck is None:
- updatecheck = ui.config('experimental', 'updatecheck')
+ updatecheck = ui.config('commands', 'update.check')
if updatecheck not in ('abort', 'none', 'linear', 'noconflict'):
# If not configured, or invalid value configured
updatecheck = 'linear'
diff --git a/mercurial/configitems.py b/mercurial/configitems.py
--- a/mercurial/configitems.py
+++ b/mercurial/configitems.py
@@ -179,6 +179,9 @@
coreconfigitem('commands', 'status.verbose',
default=False,
)
+coreconfigitem('commands', 'update.check',
+ default=None,
+)
coreconfigitem('commands', 'update.requiredest',
default=False,
)
@@ -409,9 +412,6 @@
coreconfigitem('experimental', 'treemanifest',
default=False,
)
-coreconfigitem('experimental', 'updatecheck',
- default=None,
-)
coreconfigitem('extensions', '.*',
default=None,
generic=True,
To: durin42, #hg-reviewers
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list