Debian Codegraph @

tests/test-repo-filters-tiptoe.t

raw
1 ===================================
2 Test repository filtering avoidance
3 ===================================
4
5 This test file is a bit special as he does not check feature, but performance related internal code path.
6
7 Right now, filtering a repository comes with a cost that might be significant.
8 Until this get better, ther are various operation that try hard not to trigger
9 a filtering computation. This test file make sure we don't reintroduce code that trigger the filtering for these operation:
10
11 Setup
12 -----
13 $ hg init test-repo
14 $ cd test-repo
15 $ echo "some line" > z
16 $ echo a > a
17 $ hg commit -Am a
18 adding a
19 adding z
20 $ echo "in a" >> z
21 $ echo b > b
22 $ hg commit -Am b
23 adding b
24 $ echo "file" >> z
25 $ echo c > c
26 $ hg commit -Am c
27 adding c
28 $ hg rm a
29 $ echo c1 > c
30 $ hg add c
31 c already tracked!
32 $ echo d > d
33 $ hg add d
34 $ rm b
35
36 $ cat << EOF >> $HGRCPATH
37 > [devel]
38 > debug.repo-filters = yes
39 > [ui]
40 > debug = yes
41 > EOF
42
43
44 tests
45 -----
46
47 Getting the node of `null`
48
49 $ hg log -r null -T "{node}\n"
50 0000000000000000000000000000000000000000
51
52 Getting basic changeset inforation about `null`
53
54 $ hg log -r null -T "{node}\n{date}\n"
55 0000000000000000000000000000000000000000
56 0.00
57
58 Getting status of null
59
60 $ hg status --change null
61
62 Getting status of working copy
63
64 $ hg status
65 M c
66 A d
67 R a
68 ! b
69
70 $ hg status --copies
71 M c
72 A d
73 R a
74 ! b
75
76 Getting data about the working copy parent
77
78 $ hg log -r '.' -T "{node}\n{date}\n"
79 c2932ca7786be30b67154d541a8764fae5532261
80 0.00
81
82 Getting working copy diff
83
84 $ hg diff
85 diff -r c2932ca7786be30b67154d541a8764fae5532261 a
86 --- a/a Thu Jan 01 00:00:00 1970 +0000
87 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
88 @@ -1,1 +0,0 @@
89 -a
90 diff -r c2932ca7786be30b67154d541a8764fae5532261 c
91 --- a/c Thu Jan 01 00:00:00 1970 +0000
92 +++ b/c Thu Jan 01 00:00:00 1970 +0000
93 @@ -1,1 +1,1 @@
94 -c
95 +c1
96 diff -r c2932ca7786be30b67154d541a8764fae5532261 d
97 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
98 +++ b/d Thu Jan 01 00:00:00 1970 +0000
99 @@ -0,0 +1,1 @@
100 +d
101 $ hg diff --change .
102 diff -r 05293e5dd8d1ae4f84a8520a11c6f97cad26deca -r c2932ca7786be30b67154d541a8764fae5532261 c
103 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
104 +++ b/c Thu Jan 01 00:00:00 1970 +0000
105 @@ -0,0 +1,1 @@
106 +c
107 diff -r 05293e5dd8d1ae4f84a8520a11c6f97cad26deca -r c2932ca7786be30b67154d541a8764fae5532261 z
108 --- a/z Thu Jan 01 00:00:00 1970 +0000
109 +++ b/z Thu Jan 01 00:00:00 1970 +0000
110 @@ -1,2 +1,3 @@
111 some line
112 in a
113 +file
114
115 exporting the current changeset
116
117 $ hg export
118 exporting patch:
119 # HG changeset patch
120 # User test
121 # Date 0 0
122 # Thu Jan 01 00:00:00 1970 +0000
123 # Node ID c2932ca7786be30b67154d541a8764fae5532261
124 # Parent 05293e5dd8d1ae4f84a8520a11c6f97cad26deca
125 c
126
127 diff -r 05293e5dd8d1ae4f84a8520a11c6f97cad26deca -r c2932ca7786be30b67154d541a8764fae5532261 c
128 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
129 +++ b/c Thu Jan 01 00:00:00 1970 +0000
130 @@ -0,0 +1,1 @@
131 +c
132 diff -r 05293e5dd8d1ae4f84a8520a11c6f97cad26deca -r c2932ca7786be30b67154d541a8764fae5532261 z
133 --- a/z Thu Jan 01 00:00:00 1970 +0000
134 +++ b/z Thu Jan 01 00:00:00 1970 +0000
135 @@ -1,2 +1,3 @@
136 some line
137 in a
138 +file
139
140 using annotate
141
142 - file with a single change
143
144 $ hg annotate a
145 0: a
146
147 - file with multiple change
148
149 $ hg annotate z
150 0: some line
151 1: in a
152 2: file