diff tests/test-persistent-nodemap.t @ 46311:014ac7a32048

persistent-nodemap: add a "abort" option to the slow-path config We make it the default, and document the behavior in the help for the main config option. Differential Revision: https://phab.mercurial-scm.org/D9762
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Wed, 13 Jan 2021 23:41:37 +0100
parents fc2d5c0aed7f
children 95a615dd77bf
line wrap: on
line diff
--- a/tests/test-persistent-nodemap.t	Wed Jan 13 23:07:41 2021 +0100
+++ b/tests/test-persistent-nodemap.t	Wed Jan 13 23:41:37 2021 +0100
@@ -17,9 +17,9 @@
 #if no-pure no-rust
 
   $ hg id
-  warning: accessing `persistent-nodemap` repository without associated fast implementation.
+  abort: accessing `persistent-nodemap` repository without associated fast implementation.
   (check `hg help config.format.use-persistent-nodemap` for details)
-  000000000000 tip
+  [255]
 
 Unlock further check (we are here to test the feature)
 
@@ -135,14 +135,14 @@
 Check slow-path config value handling
 -------------------------------------
 
+#if no-pure no-rust
+
   $ hg id --config "storage.revlog.persistent-nodemap.slow-path=invalid-value"
   unknown value for config "storage.revlog.persistent-nodemap.slow-path": "invalid-value"
-  falling back to default value: warn
-  warning: accessing `persistent-nodemap` repository without associated fast implementation. (no-pure no-rust !)
-  (check `hg help config.format.use-persistent-nodemap` for details) (no-pure no-rust !)
-  6b02b8c7b966+ tip
-
-#if no-pure no-rust
+  falling back to default value: abort
+  abort: accessing `persistent-nodemap` repository without associated fast implementation.
+  (check `hg help config.format.use-persistent-nodemap` for details)
+  [255]
 
   $ hg log -r . --config "storage.revlog.persistent-nodemap.slow-path=warn"
   warning: accessing `persistent-nodemap` repository without associated fast implementation.
@@ -153,12 +153,18 @@
   date:        Thu Jan 01 01:23:20 1970 +0000
   summary:     r5000
   
-  $ hg ci -m 'foo' --config "storage.revlog.nodemap.mode=strict"
-  transaction abort!
-  rollback completed
-  abort: persistent nodemap in strict mode without efficient method
+  $ hg ci -m 'foo' --config "storage.revlog.persistent-nodemap.slow-path=abort"
+  abort: accessing `persistent-nodemap` repository without associated fast implementation.
+  (check `hg help config.format.use-persistent-nodemap` for details)
   [255]
 
+#else
+
+  $ hg id --config "storage.revlog.persistent-nodemap.slow-path=invalid-value"
+  unknown value for config "storage.revlog.persistent-nodemap.slow-path": "invalid-value"
+  falling back to default value: abort
+  6b02b8c7b966+ tip
+
 #endif
 
   $ hg ci -m 'foo'