changeset 43756:3082ef682bc2

repoview: add a test to track operation not supposed to trigger filtering This test will be useful to confirm we removed filtering trigger and to prevent it to come back without us noticing. Differential Revision: https://phab.mercurial-scm.org/D7479
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Sun, 17 Nov 2019 07:11:06 +0100
parents d2a7f0aab540
children 998dd6a8fd98
files tests/test-repo-filters-tiptoe.t
diffstat 1 files changed, 53 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-repo-filters-tiptoe.t	Sun Nov 17 07:11:06 2019 +0100
@@ -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