From patchwork Fri Sep 18 12:08:50 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: D9045: tests: update test-share-safe to work with pure-python versions From: phabricator X-Patchwork-Id: 47220 Message-Id: To: Phabricator Cc: mercurial-devel@mercurial-scm.org Date: Fri, 18 Sep 2020 12:08:50 +0000 pulkit created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY zstd is not available on pure-python versions. Hence we need to wrap that part around `#if no-pure`. To make sure the functionality is tested on pure version as well, I have added another requirement addition test. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D9045 AFFECTED FILES tests/test-share-safe.t CHANGE DETAILS To: pulkit, #hg-reviewers Cc: mercurial-patches, mercurial-devel 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 @@ 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 no-pure $ 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 @@ 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 (pure !) + preserved: dotencode, exp-sharesafe, fncache, generaldelta, revlog-compression-zstd, revlogv1, sparserevlog, store (no-pure !) + 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 .