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