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