Mercurial > public > mercurial-scm > hg-stable
diff tests/test-persistent-nodemap.t @ 46310:fc2d5c0aed7f
persistent-nodemap: add a "warn" option to the slow-path config
And make it the default until we get an abort option.
Differential Revision: https://phab.mercurial-scm.org/D9761
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Wed, 13 Jan 2021 23:07:41 +0100 |
parents | 2c9c88879ab7 |
children | 014ac7a32048 |
line wrap: on
line diff
--- a/tests/test-persistent-nodemap.t Wed Jan 13 18:33:48 2021 +0100 +++ b/tests/test-persistent-nodemap.t Wed Jan 13 23:07:41 2021 +0100 @@ -8,8 +8,30 @@ > [devel] > persistent-nodemap=yes > EOF - $ hg init test-repo + + $ hg init test-repo --config storage.revlog.persistent-nodemap.slow-path=allow $ cd test-repo + +Check handling of the default slow-path value + +#if no-pure no-rust + + $ hg id + warning: accessing `persistent-nodemap` repository without associated fast implementation. + (check `hg help config.format.use-persistent-nodemap` for details) + 000000000000 tip + +Unlock further check (we are here to test the feature) + + $ cat << EOF >> $HGRCPATH + > [storage] + > # to avoid spamming the test + > revlog.persistent-nodemap.slow-path=allow + > EOF + +#endif + + $ hg debugformat format-variant repo fncache: yes @@ -23,9 +45,8 @@ plain-cl-delta: yes compression: zlib compression-level: default - $ hg debugbuilddag .+5000 --new-file --config "storage.revlog.nodemap.mode=warn" - persistent nodemap in strict mode without efficient method (no-rust no-pure !) - persistent nodemap in strict mode without efficient method (no-rust no-pure !) + $ hg debugbuilddag .+5000 --new-file + $ hg debugnodemap --metadata uid: ???????????????? (glob) tip-rev: 5000 @@ -116,11 +137,22 @@ $ 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: allow + 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 + $ hg log -r . --config "storage.revlog.persistent-nodemap.slow-path=warn" + warning: accessing `persistent-nodemap` repository without associated fast implementation. + (check `hg help config.format.use-persistent-nodemap` for details) + changeset: 5000:6b02b8c7b966 + tag: tip + user: debugbuilddag + 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