Show More
@@ -1,146 +1,153 | |||
|
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 | 49 | $ hg log -r null -T "{node}\n" |
|
50 | 50 | 0000000000000000000000000000000000000000 |
|
51 | 51 | |
|
52 | 52 | Getting basic changeset inforation about `null` |
|
53 | 53 | |
|
54 | 54 | $ hg log -r null -T "{node}\n{date}\n" |
|
55 | 55 | 0000000000000000000000000000000000000000 |
|
56 | 56 | 0.00 |
|
57 | 57 | |
|
58 | 58 | Getting status of null |
|
59 | 59 | |
|
60 | 60 | $ hg status --change null |
|
61 | 61 | |
|
62 | 62 | Getting status of working copy |
|
63 | 63 | |
|
64 | 64 | $ hg status |
|
65 | 65 | M c |
|
66 | 66 | A d |
|
67 | 67 | R a |
|
68 | 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 | 77 | Getting data about the working copy parent |
|
71 | 78 | |
|
72 | 79 | $ hg log -r '.' -T "{node}\n{date}\n" |
|
73 | 80 | c2932ca7786be30b67154d541a8764fae5532261 |
|
74 | 81 | 0.00 |
|
75 | 82 | |
|
76 | 83 | Getting working copy diff |
|
77 | 84 | |
|
78 | 85 | $ hg diff |
|
79 | 86 | diff -r c2932ca7786be30b67154d541a8764fae5532261 a |
|
80 | 87 | --- a/a Thu Jan 01 00:00:00 1970 +0000 |
|
81 | 88 | +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
82 | 89 | @@ -1,1 +0,0 @@ |
|
83 | 90 | -a |
|
84 | 91 | diff -r c2932ca7786be30b67154d541a8764fae5532261 c |
|
85 | 92 | --- a/c Thu Jan 01 00:00:00 1970 +0000 |
|
86 | 93 | +++ b/c Thu Jan 01 00:00:00 1970 +0000 |
|
87 | 94 | @@ -1,1 +1,1 @@ |
|
88 | 95 | -c |
|
89 | 96 | +c1 |
|
90 | 97 | diff -r c2932ca7786be30b67154d541a8764fae5532261 d |
|
91 | 98 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
92 | 99 | +++ b/d Thu Jan 01 00:00:00 1970 +0000 |
|
93 | 100 | @@ -0,0 +1,1 @@ |
|
94 | 101 | +d |
|
95 | 102 | $ hg diff --change . |
|
96 | 103 | diff -r 05293e5dd8d1ae4f84a8520a11c6f97cad26deca -r c2932ca7786be30b67154d541a8764fae5532261 c |
|
97 | 104 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
98 | 105 | +++ b/c Thu Jan 01 00:00:00 1970 +0000 |
|
99 | 106 | @@ -0,0 +1,1 @@ |
|
100 | 107 | +c |
|
101 | 108 | diff -r 05293e5dd8d1ae4f84a8520a11c6f97cad26deca -r c2932ca7786be30b67154d541a8764fae5532261 z |
|
102 | 109 | --- a/z Thu Jan 01 00:00:00 1970 +0000 |
|
103 | 110 | +++ b/z Thu Jan 01 00:00:00 1970 +0000 |
|
104 | 111 | @@ -1,2 +1,3 @@ |
|
105 | 112 | some line |
|
106 | 113 | in a |
|
107 | 114 | +file |
|
108 | 115 | |
|
109 | 116 | exporting the current changeset |
|
110 | 117 | |
|
111 | 118 | $ hg export |
|
112 | 119 | exporting patch: |
|
113 | 120 | # HG changeset patch |
|
114 | 121 | # User test |
|
115 | 122 | # Date 0 0 |
|
116 | 123 | # Thu Jan 01 00:00:00 1970 +0000 |
|
117 | 124 | # Node ID c2932ca7786be30b67154d541a8764fae5532261 |
|
118 | 125 | # Parent 05293e5dd8d1ae4f84a8520a11c6f97cad26deca |
|
119 | 126 | c |
|
120 | 127 | |
|
121 | 128 | diff -r 05293e5dd8d1ae4f84a8520a11c6f97cad26deca -r c2932ca7786be30b67154d541a8764fae5532261 c |
|
122 | 129 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
123 | 130 | +++ b/c Thu Jan 01 00:00:00 1970 +0000 |
|
124 | 131 | @@ -0,0 +1,1 @@ |
|
125 | 132 | +c |
|
126 | 133 | diff -r 05293e5dd8d1ae4f84a8520a11c6f97cad26deca -r c2932ca7786be30b67154d541a8764fae5532261 z |
|
127 | 134 | --- a/z Thu Jan 01 00:00:00 1970 +0000 |
|
128 | 135 | +++ b/z Thu Jan 01 00:00:00 1970 +0000 |
|
129 | 136 | @@ -1,2 +1,3 @@ |
|
130 | 137 | some line |
|
131 | 138 | in a |
|
132 | 139 | +file |
|
133 | 140 | |
|
134 | 141 | using annotate |
|
135 | 142 | |
|
136 | 143 | - file with a single change |
|
137 | 144 | |
|
138 | 145 | $ hg annotate a |
|
139 | 146 | 0: a |
|
140 | 147 | |
|
141 | 148 | - file with multiple change |
|
142 | 149 | |
|
143 | 150 | $ hg annotate z |
|
144 | 151 | 0: some line |
|
145 | 152 | 1: in a |
|
146 | 153 | 2: file |
General Comments 0
You need to be logged in to leave comments.
Login now