##// END OF EJS Templates
config: graduate experimental.updatecheck to commands.update.check...
Augie Fackler -
r34706:23ed47a8 default
parent child Browse files
Show More
@@ -179,6 +179,9 b" coreconfigitem('commands', 'status.skips"
179 coreconfigitem('commands', 'status.verbose',
179 coreconfigitem('commands', 'status.verbose',
180 default=False,
180 default=False,
181 )
181 )
182 coreconfigitem('commands', 'update.check',
183 default=None,
184 )
182 coreconfigitem('commands', 'update.requiredest',
185 coreconfigitem('commands', 'update.requiredest',
183 default=False,
186 default=False,
184 )
187 )
@@ -409,6 +412,7 b" coreconfigitem('experimental', 'spacemov"
409 coreconfigitem('experimental', 'treemanifest',
412 coreconfigitem('experimental', 'treemanifest',
410 default=False,
413 default=False,
411 )
414 )
415 # Deprecated, remove after 4.4 release
412 coreconfigitem('experimental', 'updatecheck',
416 coreconfigitem('experimental', 'updatecheck',
413 default=None,
417 default=None,
414 )
418 )
@@ -442,6 +442,18 b' effect and style see :hg:`help color`.'
442 Make paths in :hg:`status` output relative to the current directory.
442 Make paths in :hg:`status` output relative to the current directory.
443 (default: False)
443 (default: False)
444
444
445 ``update.check``
446 Determines what level of checking :hg:`update` will perform before moving
447 to a destination revision. Valid values are ``abort``, ``none``,
448 ``linear``, and ``noconflict``. ``abort`` always fails if the working
449 directory has uncommitted changes. ``none`` performs no checking, and may
450 result in a merge with uncommitted changes. ``linear`` allows any update
451 as long as it follows a straight line in the revision history, and may
452 trigger a merge with uncommitted changes. ``noconflict`` will allow any
453 update which would not trigger a merge with uncommitted changes, if any
454 are present.
455 (default: ``linear``)
456
445 ``update.requiredest``
457 ``update.requiredest``
446 Require that the user pass a destination when running :hg:`update`.
458 Require that the user pass a destination when running :hg:`update`.
447 For example, :hg:`update .::` will be allowed, but a plain :hg:`update`
459 For example, :hg:`update .::` will be allowed, but a plain :hg:`update`
@@ -757,7 +757,10 b' def updatetotally(ui, repo, checkout, br'
757 This returns whether conflict is detected at updating or not.
757 This returns whether conflict is detected at updating or not.
758 """
758 """
759 if updatecheck is None:
759 if updatecheck is None:
760 updatecheck = ui.config('experimental', 'updatecheck')
760 updatecheck = ui.config('commands', 'update.check')
761 if updatecheck is None:
762 # pre-4.4 compat on the old spelling of this config item
763 updatecheck = ui.config('experimental', 'updatecheck')
761 if updatecheck not in ('abort', 'none', 'linear', 'noconflict'):
764 if updatecheck not in ('abort', 'none', 'linear', 'noconflict'):
762 # If not configured, or invalid value configured
765 # If not configured, or invalid value configured
763 updatecheck = 'linear'
766 updatecheck = 'linear'
@@ -19,7 +19,7 b''
19 Should respect config to disable dirty update
19 Should respect config to disable dirty update
20 $ hg co -qC 0
20 $ hg co -qC 0
21 $ echo 2 > foo
21 $ echo 2 > foo
22 $ hg --config experimental.updatecheck=abort pull -u ../tt
22 $ hg --config commands.update.check=abort pull -u ../tt
23 pulling from ../tt
23 pulling from ../tt
24 searching for changes
24 searching for changes
25 adding changesets
25 adding changesets
@@ -198,8 +198,8 b' Cases are run as shown in that table, ro'
198 parent=1
198 parent=1
199 M foo
199 M foo
200
200
201 $ echo '[experimental]' >> .hg/hgrc
201 $ echo '[commands]' >> .hg/hgrc
202 $ echo 'updatecheck = abort' >> .hg/hgrc
202 $ echo 'update.check = abort' >> .hg/hgrc
203
203
204 $ revtest 'none dirty linear' dirty 1 2
204 $ revtest 'none dirty linear' dirty 1 2
205 abort: uncommitted changes
205 abort: uncommitted changes
@@ -215,7 +215,7 b' Cases are run as shown in that table, ro'
215 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
215 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
216 parent=2
216 parent=2
217
217
218 $ echo 'updatecheck = none' >> .hg/hgrc
218 $ echo 'update.check = none' >> .hg/hgrc
219
219
220 $ revtest 'none dirty cross' dirty 3 4
220 $ revtest 'none dirty cross' dirty 3 4
221 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
221 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
@@ -258,7 +258,7 b' Cases are run as shown in that table, ro'
258 >>>>>>> destination: d047485b3896 b1 - test: 4
258 >>>>>>> destination: d047485b3896 b1 - test: 4
259 $ rm a.orig
259 $ rm a.orig
260
260
261 $ echo 'updatecheck = noconflict' >> .hg/hgrc
261 $ echo 'update.check = noconflict' >> .hg/hgrc
262
262
263 $ revtest 'none dirty cross' dirty 3 4
263 $ revtest 'none dirty cross' dirty 3 4
264 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
264 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
@@ -315,7 +315,7 b' Change/delete conflict is not allowed'
315 $ hg up -q 4
315 $ hg up -q 4
316
316
317 Uses default value of "linear" when value is misspelled
317 Uses default value of "linear" when value is misspelled
318 $ echo 'updatecheck = linyar' >> .hg/hgrc
318 $ echo 'update.check = linyar' >> .hg/hgrc
319
319
320 $ revtest 'dirty cross' dirty 3 4
320 $ revtest 'dirty cross' dirty 3 4
321 abort: uncommitted changes
321 abort: uncommitted changes
General Comments 0
You need to be logged in to leave comments. Login now