# HG changeset patch # User Pulkit Goyal <7895pulkit@gmail.com> # Date 2020-09-18 11:49:49 # Node ID 68906595016c9b90107d0c53d49b25ff75b626ae # Parent 33ded2d3f4fc51ae518259e3d11043844f9792bc tests: update test-share-safe to work with non-zstd versions zstd is not available always like pure py versions. Hence we wrap that part around `#if zstd`. To make sure the functionality is tested on pure version as well, I have added another requirement addition test. Differential Revision: https://phab.mercurial-scm.org/D9045 diff --git a/tests/test-share-safe.t b/tests/test-share-safe.t --- a/tests/test-share-safe.t +++ b/tests/test-share-safe.t @@ -170,13 +170,12 @@ Test that if share source config is untr Update the source repository format and check that shared repo works $ cd ../source + +Disable zstd related tests because its not present on pure version +#if zstd $ echo "[format]" >> .hg/hgrc $ echo "revlog-compression=zstd" >> .hg/hgrc - $ hg debugupgraderepo --run -q -R ../shared1 - abort: cannot upgrade repository; unsupported source requirement: shared - [255] - $ hg debugupgraderepo --run -q upgrade will perform the following actions: @@ -190,6 +189,29 @@ Update the source repository format and date: Thu Jan 01 00:00:00 1970 +0000 summary: added b +#endif + $ echo "[format]" >> .hg/hgrc + $ echo "use-persistent-nodemap=True" >> .hg/hgrc + + $ hg debugupgraderepo --run -q -R ../shared1 + abort: cannot upgrade repository; unsupported source requirement: shared + [255] + + $ hg debugupgraderepo --run -q + upgrade will perform the following actions: + + requirements + preserved: dotencode, exp-sharesafe, fncache, generaldelta, revlogv1, sparserevlog, store (no-zstd !) + preserved: dotencode, exp-sharesafe, fncache, generaldelta, revlog-compression-zstd, revlogv1, sparserevlog, store (zstd !) + added: persistent-nodemap + + $ hg log -r . + changeset: 1:5f6d8a4bf34a + user: test + date: Thu Jan 01 00:00:00 1970 +0000 + summary: added b + + Shared one should work $ cd ../shared1 $ hg log -r .