From patchwork Sat Nov 23 04:07:21 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: D7479: repoview: add a test to track operation not supposed to trigger filtering From: phabricator X-Patchwork-Id: 43458 Message-Id: <96436a4a4e747fc25535e18abdce1dab@localhost.localdomain> To: Phabricator Cc: mercurial-devel@mercurial-scm.org Date: Sat, 23 Nov 2019 04:07:21 +0000 Closed by commit rHGa7a4b3b28c52: repoview: add a test to track operation not supposed to trigger filtering (authored by marmoute). This revision was automatically updated to reflect the committed changes. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7479?vs=18286&id=18331 CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7479/new/ REVISION DETAIL https://phab.mercurial-scm.org/D7479 AFFECTED FILES tests/test-repo-filters-tiptoe.t CHANGE DETAILS To: marmoute, #hg-reviewers, indygreg Cc: mjpieters, mercurial-devel diff --git a/tests/test-repo-filters-tiptoe.t b/tests/test-repo-filters-tiptoe.t new file mode 100644 --- /dev/null +++ b/tests/test-repo-filters-tiptoe.t @@ -0,0 +1,53 @@ +=================================== +Test repository filtering avoidance +=================================== + +This test file is a bit special as he does not check feature, but performance related internal code path. + +Right now, filtering a repository comes with a cost that might be significant. +Until this get better, ther are various operation that try hard not to trigger +a filtering computation. This test file make sure we don't reintroduce code that trigger the filtering for these operation: + +Setup +----- + $ hg init test-repo + $ cd test-repo + $ echo "some line" > z + $ echo a > a + $ hg commit -Am a + adding a + adding z + $ echo "in a" >> z + $ echo b > b + $ hg commit -Am b + adding b + $ echo "file" >> z + $ echo c > c + $ hg commit -Am c + adding c + $ hg rm a + $ echo c1 > c + $ hg add c + c already tracked! + $ echo d > d + $ hg add d + $ rm b + + $ cat << EOF >> $HGRCPATH + > [devel] + > debug.repo-filters = yes + > [ui] + > debug = yes + > EOF + + +tests +----- + +Getting the node of `null` + + $ hg init test-repo + $ cd test-repo + $ hg log -r null -T "{node}\n" + debug.filters: computing revision filter for "visible" + 0000000000000000000000000000000000000000