Show More
@@ -1,795 +1,795 | |||||
1 | $ hg init repo |
|
1 | $ hg init repo | |
2 | $ cd repo |
|
2 | $ cd repo | |
3 |
|
3 | |||
4 | committing changes |
|
4 | committing changes | |
5 |
|
5 | |||
6 | $ count=0 |
|
6 | $ count=0 | |
7 | $ echo > a |
|
7 | $ echo > a | |
8 | $ while test $count -lt 32 ; do |
|
8 | $ while test $count -lt 32 ; do | |
9 | > echo 'a' >> a |
|
9 | > echo 'a' >> a | |
10 | > test $count -eq 0 && hg add |
|
10 | > test $count -eq 0 && hg add | |
11 | > hg ci -m "msg $count" -d "$count 0" |
|
11 | > hg ci -m "msg $count" -d "$count 0" | |
12 | > count=`expr $count + 1` |
|
12 | > count=`expr $count + 1` | |
13 | > done |
|
13 | > done | |
14 | adding a |
|
14 | adding a | |
15 |
|
15 | |||
16 |
|
16 | |||
17 | $ hg log -G |
|
17 | $ hg log -G | |
18 | @ changeset: 31:58c80a7c8a40 |
|
18 | @ changeset: 31:58c80a7c8a40 | |
19 | | tag: tip |
|
19 | | tag: tip | |
20 | | user: test |
|
20 | | user: test | |
21 | | date: Thu Jan 01 00:00:31 1970 +0000 |
|
21 | | date: Thu Jan 01 00:00:31 1970 +0000 | |
22 | | summary: msg 31 |
|
22 | | summary: msg 31 | |
23 | | |
|
23 | | | |
24 | o changeset: 30:ed2d2f24b11c |
|
24 | o changeset: 30:ed2d2f24b11c | |
25 | | user: test |
|
25 | | user: test | |
26 | | date: Thu Jan 01 00:00:30 1970 +0000 |
|
26 | | date: Thu Jan 01 00:00:30 1970 +0000 | |
27 | | summary: msg 30 |
|
27 | | summary: msg 30 | |
28 | | |
|
28 | | | |
29 | o changeset: 29:b5bd63375ab9 |
|
29 | o changeset: 29:b5bd63375ab9 | |
30 | | user: test |
|
30 | | user: test | |
31 | | date: Thu Jan 01 00:00:29 1970 +0000 |
|
31 | | date: Thu Jan 01 00:00:29 1970 +0000 | |
32 | | summary: msg 29 |
|
32 | | summary: msg 29 | |
33 | | |
|
33 | | | |
34 | o changeset: 28:8e0c2264c8af |
|
34 | o changeset: 28:8e0c2264c8af | |
35 | | user: test |
|
35 | | user: test | |
36 | | date: Thu Jan 01 00:00:28 1970 +0000 |
|
36 | | date: Thu Jan 01 00:00:28 1970 +0000 | |
37 | | summary: msg 28 |
|
37 | | summary: msg 28 | |
38 | | |
|
38 | | | |
39 | o changeset: 27:288867a866e9 |
|
39 | o changeset: 27:288867a866e9 | |
40 | | user: test |
|
40 | | user: test | |
41 | | date: Thu Jan 01 00:00:27 1970 +0000 |
|
41 | | date: Thu Jan 01 00:00:27 1970 +0000 | |
42 | | summary: msg 27 |
|
42 | | summary: msg 27 | |
43 | | |
|
43 | | | |
44 | o changeset: 26:3efc6fd51aeb |
|
44 | o changeset: 26:3efc6fd51aeb | |
45 | | user: test |
|
45 | | user: test | |
46 | | date: Thu Jan 01 00:00:26 1970 +0000 |
|
46 | | date: Thu Jan 01 00:00:26 1970 +0000 | |
47 | | summary: msg 26 |
|
47 | | summary: msg 26 | |
48 | | |
|
48 | | | |
49 | o changeset: 25:02a84173a97a |
|
49 | o changeset: 25:02a84173a97a | |
50 | | user: test |
|
50 | | user: test | |
51 | | date: Thu Jan 01 00:00:25 1970 +0000 |
|
51 | | date: Thu Jan 01 00:00:25 1970 +0000 | |
52 | | summary: msg 25 |
|
52 | | summary: msg 25 | |
53 | | |
|
53 | | | |
54 | o changeset: 24:10e0acd3809e |
|
54 | o changeset: 24:10e0acd3809e | |
55 | | user: test |
|
55 | | user: test | |
56 | | date: Thu Jan 01 00:00:24 1970 +0000 |
|
56 | | date: Thu Jan 01 00:00:24 1970 +0000 | |
57 | | summary: msg 24 |
|
57 | | summary: msg 24 | |
58 | | |
|
58 | | | |
59 | o changeset: 23:5ec79163bff4 |
|
59 | o changeset: 23:5ec79163bff4 | |
60 | | user: test |
|
60 | | user: test | |
61 | | date: Thu Jan 01 00:00:23 1970 +0000 |
|
61 | | date: Thu Jan 01 00:00:23 1970 +0000 | |
62 | | summary: msg 23 |
|
62 | | summary: msg 23 | |
63 | | |
|
63 | | | |
64 | o changeset: 22:06c7993750ce |
|
64 | o changeset: 22:06c7993750ce | |
65 | | user: test |
|
65 | | user: test | |
66 | | date: Thu Jan 01 00:00:22 1970 +0000 |
|
66 | | date: Thu Jan 01 00:00:22 1970 +0000 | |
67 | | summary: msg 22 |
|
67 | | summary: msg 22 | |
68 | | |
|
68 | | | |
69 | o changeset: 21:e5db6aa3fe2a |
|
69 | o changeset: 21:e5db6aa3fe2a | |
70 | | user: test |
|
70 | | user: test | |
71 | | date: Thu Jan 01 00:00:21 1970 +0000 |
|
71 | | date: Thu Jan 01 00:00:21 1970 +0000 | |
72 | | summary: msg 21 |
|
72 | | summary: msg 21 | |
73 | | |
|
73 | | | |
74 | o changeset: 20:7128fb4fdbc9 |
|
74 | o changeset: 20:7128fb4fdbc9 | |
75 | | user: test |
|
75 | | user: test | |
76 | | date: Thu Jan 01 00:00:20 1970 +0000 |
|
76 | | date: Thu Jan 01 00:00:20 1970 +0000 | |
77 | | summary: msg 20 |
|
77 | | summary: msg 20 | |
78 | | |
|
78 | | | |
79 | o changeset: 19:52798545b482 |
|
79 | o changeset: 19:52798545b482 | |
80 | | user: test |
|
80 | | user: test | |
81 | | date: Thu Jan 01 00:00:19 1970 +0000 |
|
81 | | date: Thu Jan 01 00:00:19 1970 +0000 | |
82 | | summary: msg 19 |
|
82 | | summary: msg 19 | |
83 | | |
|
83 | | | |
84 | o changeset: 18:86977a90077e |
|
84 | o changeset: 18:86977a90077e | |
85 | | user: test |
|
85 | | user: test | |
86 | | date: Thu Jan 01 00:00:18 1970 +0000 |
|
86 | | date: Thu Jan 01 00:00:18 1970 +0000 | |
87 | | summary: msg 18 |
|
87 | | summary: msg 18 | |
88 | | |
|
88 | | | |
89 | o changeset: 17:03515f4a9080 |
|
89 | o changeset: 17:03515f4a9080 | |
90 | | user: test |
|
90 | | user: test | |
91 | | date: Thu Jan 01 00:00:17 1970 +0000 |
|
91 | | date: Thu Jan 01 00:00:17 1970 +0000 | |
92 | | summary: msg 17 |
|
92 | | summary: msg 17 | |
93 | | |
|
93 | | | |
94 | o changeset: 16:a2e6ea4973e9 |
|
94 | o changeset: 16:a2e6ea4973e9 | |
95 | | user: test |
|
95 | | user: test | |
96 | | date: Thu Jan 01 00:00:16 1970 +0000 |
|
96 | | date: Thu Jan 01 00:00:16 1970 +0000 | |
97 | | summary: msg 16 |
|
97 | | summary: msg 16 | |
98 | | |
|
98 | | | |
99 | o changeset: 15:e7fa0811edb0 |
|
99 | o changeset: 15:e7fa0811edb0 | |
100 | | user: test |
|
100 | | user: test | |
101 | | date: Thu Jan 01 00:00:15 1970 +0000 |
|
101 | | date: Thu Jan 01 00:00:15 1970 +0000 | |
102 | | summary: msg 15 |
|
102 | | summary: msg 15 | |
103 | | |
|
103 | | | |
104 | o changeset: 14:ce8f0998e922 |
|
104 | o changeset: 14:ce8f0998e922 | |
105 | | user: test |
|
105 | | user: test | |
106 | | date: Thu Jan 01 00:00:14 1970 +0000 |
|
106 | | date: Thu Jan 01 00:00:14 1970 +0000 | |
107 | | summary: msg 14 |
|
107 | | summary: msg 14 | |
108 | | |
|
108 | | | |
109 | o changeset: 13:9d7d07bc967c |
|
109 | o changeset: 13:9d7d07bc967c | |
110 | | user: test |
|
110 | | user: test | |
111 | | date: Thu Jan 01 00:00:13 1970 +0000 |
|
111 | | date: Thu Jan 01 00:00:13 1970 +0000 | |
112 | | summary: msg 13 |
|
112 | | summary: msg 13 | |
113 | | |
|
113 | | | |
114 | o changeset: 12:1941b52820a5 |
|
114 | o changeset: 12:1941b52820a5 | |
115 | | user: test |
|
115 | | user: test | |
116 | | date: Thu Jan 01 00:00:12 1970 +0000 |
|
116 | | date: Thu Jan 01 00:00:12 1970 +0000 | |
117 | | summary: msg 12 |
|
117 | | summary: msg 12 | |
118 | | |
|
118 | | | |
119 | o changeset: 11:7b4cd9578619 |
|
119 | o changeset: 11:7b4cd9578619 | |
120 | | user: test |
|
120 | | user: test | |
121 | | date: Thu Jan 01 00:00:11 1970 +0000 |
|
121 | | date: Thu Jan 01 00:00:11 1970 +0000 | |
122 | | summary: msg 11 |
|
122 | | summary: msg 11 | |
123 | | |
|
123 | | | |
124 | o changeset: 10:7c5eff49a6b6 |
|
124 | o changeset: 10:7c5eff49a6b6 | |
125 | | user: test |
|
125 | | user: test | |
126 | | date: Thu Jan 01 00:00:10 1970 +0000 |
|
126 | | date: Thu Jan 01 00:00:10 1970 +0000 | |
127 | | summary: msg 10 |
|
127 | | summary: msg 10 | |
128 | | |
|
128 | | | |
129 | o changeset: 9:eb44510ef29a |
|
129 | o changeset: 9:eb44510ef29a | |
130 | | user: test |
|
130 | | user: test | |
131 | | date: Thu Jan 01 00:00:09 1970 +0000 |
|
131 | | date: Thu Jan 01 00:00:09 1970 +0000 | |
132 | | summary: msg 9 |
|
132 | | summary: msg 9 | |
133 | | |
|
133 | | | |
134 | o changeset: 8:453eb4dba229 |
|
134 | o changeset: 8:453eb4dba229 | |
135 | | user: test |
|
135 | | user: test | |
136 | | date: Thu Jan 01 00:00:08 1970 +0000 |
|
136 | | date: Thu Jan 01 00:00:08 1970 +0000 | |
137 | | summary: msg 8 |
|
137 | | summary: msg 8 | |
138 | | |
|
138 | | | |
139 | o changeset: 7:03750880c6b5 |
|
139 | o changeset: 7:03750880c6b5 | |
140 | | user: test |
|
140 | | user: test | |
141 | | date: Thu Jan 01 00:00:07 1970 +0000 |
|
141 | | date: Thu Jan 01 00:00:07 1970 +0000 | |
142 | | summary: msg 7 |
|
142 | | summary: msg 7 | |
143 | | |
|
143 | | | |
144 | o changeset: 6:a3d5c6fdf0d3 |
|
144 | o changeset: 6:a3d5c6fdf0d3 | |
145 | | user: test |
|
145 | | user: test | |
146 | | date: Thu Jan 01 00:00:06 1970 +0000 |
|
146 | | date: Thu Jan 01 00:00:06 1970 +0000 | |
147 | | summary: msg 6 |
|
147 | | summary: msg 6 | |
148 | | |
|
148 | | | |
149 | o changeset: 5:7874a09ea728 |
|
149 | o changeset: 5:7874a09ea728 | |
150 | | user: test |
|
150 | | user: test | |
151 | | date: Thu Jan 01 00:00:05 1970 +0000 |
|
151 | | date: Thu Jan 01 00:00:05 1970 +0000 | |
152 | | summary: msg 5 |
|
152 | | summary: msg 5 | |
153 | | |
|
153 | | | |
154 | o changeset: 4:9b2ba8336a65 |
|
154 | o changeset: 4:9b2ba8336a65 | |
155 | | user: test |
|
155 | | user: test | |
156 | | date: Thu Jan 01 00:00:04 1970 +0000 |
|
156 | | date: Thu Jan 01 00:00:04 1970 +0000 | |
157 | | summary: msg 4 |
|
157 | | summary: msg 4 | |
158 | | |
|
158 | | | |
159 | o changeset: 3:b53bea5e2fcb |
|
159 | o changeset: 3:b53bea5e2fcb | |
160 | | user: test |
|
160 | | user: test | |
161 | | date: Thu Jan 01 00:00:03 1970 +0000 |
|
161 | | date: Thu Jan 01 00:00:03 1970 +0000 | |
162 | | summary: msg 3 |
|
162 | | summary: msg 3 | |
163 | | |
|
163 | | | |
164 | o changeset: 2:db07c04beaca |
|
164 | o changeset: 2:db07c04beaca | |
165 | | user: test |
|
165 | | user: test | |
166 | | date: Thu Jan 01 00:00:02 1970 +0000 |
|
166 | | date: Thu Jan 01 00:00:02 1970 +0000 | |
167 | | summary: msg 2 |
|
167 | | summary: msg 2 | |
168 | | |
|
168 | | | |
169 | o changeset: 1:5cd978ea5149 |
|
169 | o changeset: 1:5cd978ea5149 | |
170 | | user: test |
|
170 | | user: test | |
171 | | date: Thu Jan 01 00:00:01 1970 +0000 |
|
171 | | date: Thu Jan 01 00:00:01 1970 +0000 | |
172 | | summary: msg 1 |
|
172 | | summary: msg 1 | |
173 | | |
|
173 | | | |
174 | o changeset: 0:b99c7b9c8e11 |
|
174 | o changeset: 0:b99c7b9c8e11 | |
175 | user: test |
|
175 | user: test | |
176 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
176 | date: Thu Jan 01 00:00:00 1970 +0000 | |
177 | summary: msg 0 |
|
177 | summary: msg 0 | |
178 |
|
178 | |||
179 |
|
179 | |||
180 | $ hg up -C |
|
180 | $ hg up -C | |
181 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
181 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
182 |
|
182 | |||
183 | bisect test |
|
183 | bisect test | |
184 |
|
184 | |||
185 | $ hg bisect -r |
|
185 | $ hg bisect -r | |
186 | $ hg bisect -b |
|
186 | $ hg bisect -b | |
187 | $ hg status -v |
|
187 | $ hg status -v | |
188 | # The repository is in an unfinished *bisect* state. |
|
188 | # The repository is in an unfinished *bisect* state. | |
189 |
|
189 | |||
190 | # To mark the changeset good: hg bisect --good |
|
190 | # To mark the changeset good: hg bisect --good | |
191 | # To mark the changeset bad: hg bisect --bad |
|
191 | # To mark the changeset bad: hg bisect --bad | |
192 | # To abort: hg bisect --reset |
|
192 | # To abort: hg bisect --reset | |
193 |
|
193 | |||
194 | $ hg status -v --config commands.status.skipstates=bisect |
|
194 | $ hg status -v --config commands.status.skipstates=bisect | |
195 | $ hg summary |
|
195 | $ hg summary | |
196 | parent: 31:58c80a7c8a40 tip |
|
196 | parent: 31:58c80a7c8a40 tip | |
197 | msg 31 |
|
197 | msg 31 | |
198 | branch: default |
|
198 | branch: default | |
199 | commit: (clean) |
|
199 | commit: (clean) | |
200 | update: (current) |
|
200 | update: (current) | |
201 | phases: 32 draft |
|
201 | phases: 32 draft | |
202 | $ hg bisect -g 1 |
|
202 | $ hg bisect -g 1 | |
203 | Testing changeset 16:a2e6ea4973e9 "msg 16" (30 changesets remaining, ~4 tests) |
|
203 | Testing changeset 16:a2e6ea4973e9 "msg 16" (30 changesets remaining, ~4 tests) | |
204 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
204 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
205 | $ hg bisect -g |
|
205 | $ hg bisect -g | |
206 | Testing changeset 23:5ec79163bff4 "msg 23" (15 changesets remaining, ~3 tests) |
|
206 | Testing changeset 23:5ec79163bff4 "msg 23" (15 changesets remaining, ~3 tests) | |
207 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
207 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
208 |
|
208 | |||
209 | skip |
|
209 | skip | |
210 |
|
210 | |||
211 | $ hg bisect -s |
|
211 | $ hg bisect -s | |
212 | Testing changeset 24:10e0acd3809e "msg 24" (15 changesets remaining, ~3 tests) |
|
212 | Testing changeset 24:10e0acd3809e "msg 24" (15 changesets remaining, ~3 tests) | |
213 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
213 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
214 | $ hg bisect -g |
|
214 | $ hg bisect -g | |
215 | Testing changeset 27:288867a866e9 "msg 27" (7 changesets remaining, ~2 tests) |
|
215 | Testing changeset 27:288867a866e9 "msg 27" (7 changesets remaining, ~2 tests) | |
216 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
216 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
217 | $ hg bisect -g |
|
217 | $ hg bisect -g | |
218 | Testing changeset 29:b5bd63375ab9 "msg 29" (4 changesets remaining, ~2 tests) |
|
218 | Testing changeset 29:b5bd63375ab9 "msg 29" (4 changesets remaining, ~2 tests) | |
219 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
219 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
220 | $ hg bisect -b |
|
220 | $ hg bisect -b | |
221 | Testing changeset 28:8e0c2264c8af "msg 28" (2 changesets remaining, ~1 tests) |
|
221 | Testing changeset 28:8e0c2264c8af "msg 28" (2 changesets remaining, ~1 tests) | |
222 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
222 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
223 | $ hg bisect -g |
|
223 | $ hg bisect -g | |
224 | The first bad revision is: |
|
224 | The first bad revision is: | |
225 | changeset: 29:b5bd63375ab9 |
|
225 | changeset: 29:b5bd63375ab9 | |
226 | user: test |
|
226 | user: test | |
227 | date: Thu Jan 01 00:00:29 1970 +0000 |
|
227 | date: Thu Jan 01 00:00:29 1970 +0000 | |
228 | summary: msg 29 |
|
228 | summary: msg 29 | |
229 |
|
229 | |||
230 |
|
230 | |||
231 | mark revsets instead of single revs |
|
231 | mark revsets instead of single revs | |
232 |
|
232 | |||
233 | $ hg bisect -r |
|
233 | $ hg bisect -r | |
234 | $ hg bisect -b "0::3" |
|
234 | $ hg bisect -b "0::3" | |
235 | $ hg bisect -s "13::16" |
|
235 | $ hg bisect -s "13::16" | |
236 | $ hg bisect -g "26::tip" |
|
236 | $ hg bisect -g "26::tip" | |
237 | Testing changeset 12:1941b52820a5 "msg 12" (23 changesets remaining, ~4 tests) |
|
237 | Testing changeset 12:1941b52820a5 "msg 12" (23 changesets remaining, ~4 tests) | |
238 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
238 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
239 | $ cat .hg/bisect.state |
|
239 | $ cat .hg/bisect.state | |
240 | bad b99c7b9c8e11558adef3fad9af211c58d46f325b |
|
240 | bad b99c7b9c8e11558adef3fad9af211c58d46f325b | |
241 | bad 5cd978ea51499179507ee7b6f340d2dbaa401185 |
|
241 | bad 5cd978ea51499179507ee7b6f340d2dbaa401185 | |
242 | bad db07c04beaca44cf24832541e7f4a2346a95275b |
|
242 | bad db07c04beaca44cf24832541e7f4a2346a95275b | |
243 | bad b53bea5e2fcb30d3e00bd3409507a5659ce0fd8b |
|
243 | bad b53bea5e2fcb30d3e00bd3409507a5659ce0fd8b | |
244 | current 1941b52820a544549596820a8ae006842b0e2c64 |
|
244 | current 1941b52820a544549596820a8ae006842b0e2c64 | |
245 | good 3efc6fd51aeb8594398044c6c846ca59ae021203 |
|
245 | good 3efc6fd51aeb8594398044c6c846ca59ae021203 | |
246 | good 288867a866e9adb7a29880b66936c874b80f4651 |
|
246 | good 288867a866e9adb7a29880b66936c874b80f4651 | |
247 | good 8e0c2264c8af790daf3585ada0669d93dee09c83 |
|
247 | good 8e0c2264c8af790daf3585ada0669d93dee09c83 | |
248 | good b5bd63375ab9a290419f2024b7f4ee9ea7ce90a8 |
|
248 | good b5bd63375ab9a290419f2024b7f4ee9ea7ce90a8 | |
249 | good ed2d2f24b11c368fa8aa0da9f4e1db580abade59 |
|
249 | good ed2d2f24b11c368fa8aa0da9f4e1db580abade59 | |
250 | good 58c80a7c8a4025a94cedaf7b4a4e3124e8909a96 |
|
250 | good 58c80a7c8a4025a94cedaf7b4a4e3124e8909a96 | |
251 | skip 9d7d07bc967ca98ad0600c24953fd289ad5fa991 |
|
251 | skip 9d7d07bc967ca98ad0600c24953fd289ad5fa991 | |
252 | skip ce8f0998e922c179e80819d5066fbe46e2998784 |
|
252 | skip ce8f0998e922c179e80819d5066fbe46e2998784 | |
253 | skip e7fa0811edb063f6319531f0d0a865882138e180 |
|
253 | skip e7fa0811edb063f6319531f0d0a865882138e180 | |
254 | skip a2e6ea4973e9196ddd3386493b0c214b41fd97d3 |
|
254 | skip a2e6ea4973e9196ddd3386493b0c214b41fd97d3 | |
255 |
|
255 | |||
256 | bisect reverse test |
|
256 | bisect reverse test | |
257 |
|
257 | |||
258 | $ hg bisect -r |
|
258 | $ hg bisect -r | |
259 | $ hg bisect -b null |
|
259 | $ hg bisect -b null | |
260 | $ hg bisect -g tip |
|
260 | $ hg bisect -g tip | |
261 | Testing changeset 15:e7fa0811edb0 "msg 15" (32 changesets remaining, ~5 tests) |
|
261 | Testing changeset 15:e7fa0811edb0 "msg 15" (32 changesets remaining, ~5 tests) | |
262 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
262 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
263 | $ hg bisect -g |
|
263 | $ hg bisect -g | |
264 | Testing changeset 7:03750880c6b5 "msg 7" (16 changesets remaining, ~4 tests) |
|
264 | Testing changeset 7:03750880c6b5 "msg 7" (16 changesets remaining, ~4 tests) | |
265 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
265 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
266 |
|
266 | |||
267 | skip |
|
267 | skip | |
268 |
|
268 | |||
269 | $ hg bisect -s |
|
269 | $ hg bisect -s | |
270 | Testing changeset 6:a3d5c6fdf0d3 "msg 6" (16 changesets remaining, ~4 tests) |
|
270 | Testing changeset 6:a3d5c6fdf0d3 "msg 6" (16 changesets remaining, ~4 tests) | |
271 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
271 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
272 | $ hg bisect -g |
|
272 | $ hg bisect -g | |
273 | Testing changeset 2:db07c04beaca "msg 2" (7 changesets remaining, ~2 tests) |
|
273 | Testing changeset 2:db07c04beaca "msg 2" (7 changesets remaining, ~2 tests) | |
274 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
274 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
275 | $ hg bisect -g |
|
275 | $ hg bisect -g | |
276 | Testing changeset 0:b99c7b9c8e11 "msg 0" (3 changesets remaining, ~1 tests) |
|
276 | Testing changeset 0:b99c7b9c8e11 "msg 0" (3 changesets remaining, ~1 tests) | |
277 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
277 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
278 | $ hg bisect -b |
|
278 | $ hg bisect -b | |
279 | Testing changeset 1:5cd978ea5149 "msg 1" (2 changesets remaining, ~1 tests) |
|
279 | Testing changeset 1:5cd978ea5149 "msg 1" (2 changesets remaining, ~1 tests) | |
280 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
280 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
281 | $ hg bisect -g |
|
281 | $ hg bisect -g | |
282 | The first good revision is: |
|
282 | The first good revision is: | |
283 | changeset: 1:5cd978ea5149 |
|
283 | changeset: 1:5cd978ea5149 | |
284 | user: test |
|
284 | user: test | |
285 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
285 | date: Thu Jan 01 00:00:01 1970 +0000 | |
286 | summary: msg 1 |
|
286 | summary: msg 1 | |
287 |
|
287 | |||
288 |
|
288 | |||
289 | $ hg bisect -r |
|
289 | $ hg bisect -r | |
290 | $ hg bisect -g tip |
|
290 | $ hg bisect -g tip | |
291 | $ hg bisect -b tip |
|
291 | $ hg bisect -b tip | |
292 | abort: inconsistent state, 31:58c80a7c8a40 is good and bad |
|
292 | abort: inconsistent state, 31:58c80a7c8a40 is good and bad | |
293 | [255] |
|
293 | [255] | |
294 |
|
294 | |||
295 | $ hg bisect -r |
|
295 | $ hg bisect -r | |
296 | $ hg bisect -g null |
|
296 | $ hg bisect -g null | |
297 | $ hg bisect -bU tip |
|
297 | $ hg bisect -bU tip | |
298 | Testing changeset 15:e7fa0811edb0 "msg 15" (32 changesets remaining, ~5 tests) |
|
298 | Testing changeset 15:e7fa0811edb0 "msg 15" (32 changesets remaining, ~5 tests) | |
299 | $ hg id |
|
299 | $ hg id | |
300 | 5cd978ea5149 |
|
300 | 5cd978ea5149 | |
301 |
|
301 | |||
302 |
|
302 | |||
303 | Issue1228: hg bisect crashes when you skip the last rev in bisection |
|
303 | Issue1228: hg bisect crashes when you skip the last rev in bisection | |
304 | Issue1182: hg bisect exception |
|
304 | Issue1182: hg bisect exception | |
305 |
|
305 | |||
306 | $ hg bisect -r |
|
306 | $ hg bisect -r | |
307 | $ hg bisect -b 4 |
|
307 | $ hg bisect -b 4 | |
308 | $ hg bisect -g 0 |
|
308 | $ hg bisect -g 0 | |
309 | Testing changeset 2:db07c04beaca "msg 2" (4 changesets remaining, ~2 tests) |
|
309 | Testing changeset 2:db07c04beaca "msg 2" (4 changesets remaining, ~2 tests) | |
310 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
310 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
311 | $ hg bisect -s |
|
311 | $ hg bisect -s | |
312 | Testing changeset 1:5cd978ea5149 "msg 1" (4 changesets remaining, ~2 tests) |
|
312 | Testing changeset 1:5cd978ea5149 "msg 1" (4 changesets remaining, ~2 tests) | |
313 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
313 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
314 | $ hg bisect -s |
|
314 | $ hg bisect -s | |
315 | Testing changeset 3:b53bea5e2fcb "msg 3" (4 changesets remaining, ~2 tests) |
|
315 | Testing changeset 3:b53bea5e2fcb "msg 3" (4 changesets remaining, ~2 tests) | |
316 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
316 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
317 | $ hg bisect -s |
|
317 | $ hg bisect -s | |
318 | Due to skipped revisions, the first bad revision could be any of: |
|
318 | Due to skipped revisions, the first bad revision could be any of: | |
319 | changeset: 1:5cd978ea5149 |
|
319 | changeset: 1:5cd978ea5149 | |
320 | user: test |
|
320 | user: test | |
321 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
321 | date: Thu Jan 01 00:00:01 1970 +0000 | |
322 | summary: msg 1 |
|
322 | summary: msg 1 | |
323 |
|
323 | |||
324 | changeset: 2:db07c04beaca |
|
324 | changeset: 2:db07c04beaca | |
325 | user: test |
|
325 | user: test | |
326 | date: Thu Jan 01 00:00:02 1970 +0000 |
|
326 | date: Thu Jan 01 00:00:02 1970 +0000 | |
327 | summary: msg 2 |
|
327 | summary: msg 2 | |
328 |
|
328 | |||
329 | changeset: 3:b53bea5e2fcb |
|
329 | changeset: 3:b53bea5e2fcb | |
330 | user: test |
|
330 | user: test | |
331 | date: Thu Jan 01 00:00:03 1970 +0000 |
|
331 | date: Thu Jan 01 00:00:03 1970 +0000 | |
332 | summary: msg 3 |
|
332 | summary: msg 3 | |
333 |
|
333 | |||
334 | changeset: 4:9b2ba8336a65 |
|
334 | changeset: 4:9b2ba8336a65 | |
335 | user: test |
|
335 | user: test | |
336 | date: Thu Jan 01 00:00:04 1970 +0000 |
|
336 | date: Thu Jan 01 00:00:04 1970 +0000 | |
337 | summary: msg 4 |
|
337 | summary: msg 4 | |
338 |
|
338 | |||
339 |
|
339 | |||
340 |
|
340 | |||
341 | reproduce non converging bisect, issue1182 |
|
341 | reproduce non converging bisect, issue1182 | |
342 |
|
342 | |||
343 | $ hg bisect -r |
|
343 | $ hg bisect -r | |
344 | $ hg bisect -g 0 |
|
344 | $ hg bisect -g 0 | |
345 | $ hg bisect -b 2 |
|
345 | $ hg bisect -b 2 | |
346 | Testing changeset 1:5cd978ea5149 "msg 1" (2 changesets remaining, ~1 tests) |
|
346 | Testing changeset 1:5cd978ea5149 "msg 1" (2 changesets remaining, ~1 tests) | |
347 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
347 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
348 | $ hg bisect -s |
|
348 | $ hg bisect -s | |
349 | Due to skipped revisions, the first bad revision could be any of: |
|
349 | Due to skipped revisions, the first bad revision could be any of: | |
350 | changeset: 1:5cd978ea5149 |
|
350 | changeset: 1:5cd978ea5149 | |
351 | user: test |
|
351 | user: test | |
352 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
352 | date: Thu Jan 01 00:00:01 1970 +0000 | |
353 | summary: msg 1 |
|
353 | summary: msg 1 | |
354 |
|
354 | |||
355 | changeset: 2:db07c04beaca |
|
355 | changeset: 2:db07c04beaca | |
356 | user: test |
|
356 | user: test | |
357 | date: Thu Jan 01 00:00:02 1970 +0000 |
|
357 | date: Thu Jan 01 00:00:02 1970 +0000 | |
358 | summary: msg 2 |
|
358 | summary: msg 2 | |
359 |
|
359 | |||
360 |
|
360 | |||
361 |
|
361 | |||
362 | test no action |
|
362 | test no action | |
363 |
|
363 | |||
364 | $ hg bisect -r |
|
364 | $ hg bisect -r | |
365 | $ hg bisect |
|
365 | $ hg bisect | |
366 | abort: cannot bisect (no known good revisions) |
|
366 | abort: cannot bisect (no known good revisions) | |
367 | [20] |
|
367 | [20] | |
368 |
|
368 | |||
369 |
|
369 | |||
370 | reproduce AssertionError, issue1445 |
|
370 | reproduce AssertionError, issue1445 | |
371 |
|
371 | |||
372 | $ hg bisect -r |
|
372 | $ hg bisect -r | |
373 | $ hg bisect -b 6 |
|
373 | $ hg bisect -b 6 | |
374 | $ hg bisect -g 0 |
|
374 | $ hg bisect -g 0 | |
375 | Testing changeset 3:b53bea5e2fcb "msg 3" (6 changesets remaining, ~2 tests) |
|
375 | Testing changeset 3:b53bea5e2fcb "msg 3" (6 changesets remaining, ~2 tests) | |
376 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
376 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
377 | $ hg bisect -s |
|
377 | $ hg bisect -s | |
378 | Testing changeset 2:db07c04beaca "msg 2" (6 changesets remaining, ~2 tests) |
|
378 | Testing changeset 2:db07c04beaca "msg 2" (6 changesets remaining, ~2 tests) | |
379 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
379 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
380 | $ hg bisect -s |
|
380 | $ hg bisect -s | |
381 | Testing changeset 4:9b2ba8336a65 "msg 4" (6 changesets remaining, ~2 tests) |
|
381 | Testing changeset 4:9b2ba8336a65 "msg 4" (6 changesets remaining, ~2 tests) | |
382 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
382 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
383 | $ hg bisect -s |
|
383 | $ hg bisect -s | |
384 | Testing changeset 1:5cd978ea5149 "msg 1" (6 changesets remaining, ~2 tests) |
|
384 | Testing changeset 1:5cd978ea5149 "msg 1" (6 changesets remaining, ~2 tests) | |
385 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
385 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
386 | $ hg bisect -s |
|
386 | $ hg bisect -s | |
387 | Testing changeset 5:7874a09ea728 "msg 5" (6 changesets remaining, ~2 tests) |
|
387 | Testing changeset 5:7874a09ea728 "msg 5" (6 changesets remaining, ~2 tests) | |
388 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
388 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
389 | $ hg bisect -g |
|
389 | $ hg bisect -g | |
390 | The first bad revision is: |
|
390 | The first bad revision is: | |
391 | changeset: 6:a3d5c6fdf0d3 |
|
391 | changeset: 6:a3d5c6fdf0d3 | |
392 | user: test |
|
392 | user: test | |
393 | date: Thu Jan 01 00:00:06 1970 +0000 |
|
393 | date: Thu Jan 01 00:00:06 1970 +0000 | |
394 | summary: msg 6 |
|
394 | summary: msg 6 | |
395 |
|
395 | |||
396 | $ hg log -r "bisect(good)" |
|
396 | $ hg log -r "bisect(good)" | |
397 | changeset: 0:b99c7b9c8e11 |
|
397 | changeset: 0:b99c7b9c8e11 | |
398 | user: test |
|
398 | user: test | |
399 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
399 | date: Thu Jan 01 00:00:00 1970 +0000 | |
400 | summary: msg 0 |
|
400 | summary: msg 0 | |
401 |
|
401 | |||
402 | changeset: 5:7874a09ea728 |
|
402 | changeset: 5:7874a09ea728 | |
403 | user: test |
|
403 | user: test | |
404 | date: Thu Jan 01 00:00:05 1970 +0000 |
|
404 | date: Thu Jan 01 00:00:05 1970 +0000 | |
405 | summary: msg 5 |
|
405 | summary: msg 5 | |
406 |
|
406 | |||
407 | $ hg log -r "bisect(bad)" |
|
407 | $ hg log -r "bisect(bad)" | |
408 | changeset: 6:a3d5c6fdf0d3 |
|
408 | changeset: 6:a3d5c6fdf0d3 | |
409 | user: test |
|
409 | user: test | |
410 | date: Thu Jan 01 00:00:06 1970 +0000 |
|
410 | date: Thu Jan 01 00:00:06 1970 +0000 | |
411 | summary: msg 6 |
|
411 | summary: msg 6 | |
412 |
|
412 | |||
413 | $ hg log -r "bisect(current)" |
|
413 | $ hg log -r "bisect(current)" | |
414 | changeset: 5:7874a09ea728 |
|
414 | changeset: 5:7874a09ea728 | |
415 | user: test |
|
415 | user: test | |
416 | date: Thu Jan 01 00:00:05 1970 +0000 |
|
416 | date: Thu Jan 01 00:00:05 1970 +0000 | |
417 | summary: msg 5 |
|
417 | summary: msg 5 | |
418 |
|
418 | |||
419 | $ hg log -r "bisect(skip)" |
|
419 | $ hg log -r "bisect(skip)" | |
420 | changeset: 1:5cd978ea5149 |
|
420 | changeset: 1:5cd978ea5149 | |
421 | user: test |
|
421 | user: test | |
422 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
422 | date: Thu Jan 01 00:00:01 1970 +0000 | |
423 | summary: msg 1 |
|
423 | summary: msg 1 | |
424 |
|
424 | |||
425 | changeset: 2:db07c04beaca |
|
425 | changeset: 2:db07c04beaca | |
426 | user: test |
|
426 | user: test | |
427 | date: Thu Jan 01 00:00:02 1970 +0000 |
|
427 | date: Thu Jan 01 00:00:02 1970 +0000 | |
428 | summary: msg 2 |
|
428 | summary: msg 2 | |
429 |
|
429 | |||
430 | changeset: 3:b53bea5e2fcb |
|
430 | changeset: 3:b53bea5e2fcb | |
431 | user: test |
|
431 | user: test | |
432 | date: Thu Jan 01 00:00:03 1970 +0000 |
|
432 | date: Thu Jan 01 00:00:03 1970 +0000 | |
433 | summary: msg 3 |
|
433 | summary: msg 3 | |
434 |
|
434 | |||
435 | changeset: 4:9b2ba8336a65 |
|
435 | changeset: 4:9b2ba8336a65 | |
436 | user: test |
|
436 | user: test | |
437 | date: Thu Jan 01 00:00:04 1970 +0000 |
|
437 | date: Thu Jan 01 00:00:04 1970 +0000 | |
438 | summary: msg 4 |
|
438 | summary: msg 4 | |
439 |
|
439 | |||
440 |
|
440 | |||
441 | test legacy bisected() keyword |
|
441 | test legacy bisected() keyword | |
442 |
|
442 | |||
443 | $ hg log -r "bisected(bad)" |
|
443 | $ hg log -r "bisected(bad)" | |
444 | changeset: 6:a3d5c6fdf0d3 |
|
444 | changeset: 6:a3d5c6fdf0d3 | |
445 | user: test |
|
445 | user: test | |
446 | date: Thu Jan 01 00:00:06 1970 +0000 |
|
446 | date: Thu Jan 01 00:00:06 1970 +0000 | |
447 | summary: msg 6 |
|
447 | summary: msg 6 | |
448 |
|
448 | |||
449 |
|
449 | |||
450 | $ set +e |
|
450 | $ set +e | |
451 |
|
451 | |||
452 | test invalid command |
|
452 | test invalid command | |
453 | assuming that the shell returns 127 if command not found ... |
|
453 | assuming that the shell returns 127 if command not found ... | |
454 |
|
454 | |||
455 | $ hg bisect -r |
|
455 | $ hg bisect -r | |
456 | $ hg bisect --command 'exit 127' |
|
456 | $ hg bisect --command 'exit 127' | |
457 | abort: failed to execute exit 127 |
|
457 | abort: failed to execute exit 127 | |
458 | [255] |
|
458 | [255] | |
459 |
|
459 | |||
460 |
|
460 | |||
461 | test bisecting command |
|
461 | test bisecting command | |
462 |
|
462 | |||
463 | $ cat > "$TESTTMP/script.py" <<EOF |
|
463 | $ cat > "$TESTTMP/script.py" <<EOF | |
464 | > #!$PYTHON |
|
464 | > #!$PYTHON | |
465 | > import sys |
|
465 | > import sys | |
466 | > from mercurial import hg, ui as uimod |
|
466 | > from mercurial import hg, ui as uimod | |
467 | > repo = hg.repository(uimod.ui.load(), b'.') |
|
467 | > repo = hg.repository(uimod.ui.load(), b'.') | |
468 | > if repo[b'.'].rev() < 6: |
|
468 | > if repo[b'.'].rev() < 6: | |
469 | > sys.exit(1) |
|
469 | > sys.exit(1) | |
470 | > EOF |
|
470 | > EOF | |
471 | $ chmod +x "$TESTTMP/script.py" |
|
471 | $ chmod +x "$TESTTMP/script.py" | |
472 | $ hg bisect -r |
|
472 | $ hg bisect -r | |
473 | $ hg up -qr tip |
|
473 | $ hg up -qr tip | |
474 | $ hg bisect --command "\"$PYTHON\" \"$TESTTMP/script.py\" and some parameters" |
|
474 | $ hg bisect --command "\"$PYTHON\" \"$TESTTMP/script.py\" and some parameters" | |
475 | changeset 31:58c80a7c8a40 tip "msg 31": good |
|
475 | changeset 31:58c80a7c8a40 tip "msg 31": good | |
476 | abort: cannot bisect (no known bad revisions) |
|
476 | abort: cannot bisect (no known bad revisions) | |
477 | [20] |
|
477 | [20] | |
478 | $ hg up -qr 0 |
|
478 | $ hg up -qr 0 | |
479 | $ hg bisect --command "\"$PYTHON\" \"$TESTTMP/script.py\" and some parameters" |
|
479 | $ hg bisect --command "\"$PYTHON\" \"$TESTTMP/script.py\" and some parameters" | |
480 | changeset 0:b99c7b9c8e11 "msg 0": bad |
|
480 | changeset 0:b99c7b9c8e11 "msg 0": bad | |
481 | changeset 15:e7fa0811edb0 "msg 15": good |
|
481 | changeset 15:e7fa0811edb0 "msg 15": good | |
482 | changeset 7:03750880c6b5 "msg 7": good |
|
482 | changeset 7:03750880c6b5 "msg 7": good | |
483 | changeset 3:b53bea5e2fcb "msg 3": bad |
|
483 | changeset 3:b53bea5e2fcb "msg 3": bad | |
484 | changeset 5:7874a09ea728 "msg 5": bad |
|
484 | changeset 5:7874a09ea728 "msg 5": bad | |
485 | changeset 6:a3d5c6fdf0d3 "msg 6": good |
|
485 | changeset 6:a3d5c6fdf0d3 "msg 6": good | |
486 | The first good revision is: |
|
486 | The first good revision is: | |
487 | changeset: 6:a3d5c6fdf0d3 |
|
487 | changeset: 6:a3d5c6fdf0d3 | |
488 | user: test |
|
488 | user: test | |
489 | date: Thu Jan 01 00:00:06 1970 +0000 |
|
489 | date: Thu Jan 01 00:00:06 1970 +0000 | |
490 | summary: msg 6 |
|
490 | summary: msg 6 | |
491 |
|
491 | |||
492 |
|
492 | |||
493 |
|
493 | |||
494 | test bisecting via a command without updating the working dir, and |
|
494 | test bisecting via a command without updating the working dir, and | |
495 | ensure that the bisect state file is updated before running a test |
|
495 | ensure that the bisect state file is updated before running a test | |
496 | command |
|
496 | command | |
497 |
|
497 | |||
498 | $ hg update null |
|
498 | $ hg update null | |
499 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
499 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
500 | $ cat > "$TESTTMP/script.sh" <<'EOF' |
|
500 | $ cat > "$TESTTMP/script.sh" <<'EOF' | |
501 | > #!/bin/sh |
|
501 | > #!/bin/sh | |
502 | > test -n "$HG_NODE" || (echo HG_NODE missing; exit 127) |
|
502 | > test -n "$HG_NODE" || (echo HG_NODE missing; exit 127) | |
503 | > current="`hg log -r \"bisect(current)\" --template {node}`" |
|
503 | > current="`hg log -r \"bisect(current)\" --template {node}`" | |
504 | > test "$current" = "$HG_NODE" || (echo current is bad: $current; exit 127) |
|
504 | > test "$current" = "$HG_NODE" || (echo current is bad: $current; exit 127) | |
505 | > rev="`hg log -r $HG_NODE --template {rev}`" |
|
505 | > rev="`hg log -r $HG_NODE --template {rev}`" | |
506 | > test "$rev" -ge 6 |
|
506 | > test "$rev" -ge 6 | |
507 | > EOF |
|
507 | > EOF | |
508 | $ chmod +x "$TESTTMP/script.sh" |
|
508 | $ chmod +x "$TESTTMP/script.sh" | |
509 | $ hg bisect -r |
|
509 | $ hg bisect -r | |
510 | $ hg bisect --good tip --noupdate |
|
510 | $ hg bisect --good tip --noupdate | |
511 | $ hg bisect --bad 0 --noupdate |
|
511 | $ hg bisect --bad 0 --noupdate | |
512 | Testing changeset 15:e7fa0811edb0 "msg 15" (31 changesets remaining, ~4 tests) |
|
512 | Testing changeset 15:e7fa0811edb0 "msg 15" (31 changesets remaining, ~4 tests) | |
513 | $ hg bisect --command "sh \"$TESTTMP/script.sh\" and some params" --noupdate |
|
513 | $ hg bisect --command "sh \"$TESTTMP/script.sh\" and some params" --noupdate | |
514 | changeset 15:e7fa0811edb0 "msg 15": good |
|
514 | changeset 15:e7fa0811edb0 "msg 15": good | |
515 | changeset 7:03750880c6b5 "msg 7": good |
|
515 | changeset 7:03750880c6b5 "msg 7": good | |
516 | changeset 3:b53bea5e2fcb "msg 3": bad |
|
516 | changeset 3:b53bea5e2fcb "msg 3": bad | |
517 | changeset 5:7874a09ea728 "msg 5": bad |
|
517 | changeset 5:7874a09ea728 "msg 5": bad | |
518 | changeset 6:a3d5c6fdf0d3 "msg 6": good |
|
518 | changeset 6:a3d5c6fdf0d3 "msg 6": good | |
519 | The first good revision is: |
|
519 | The first good revision is: | |
520 | changeset: 6:a3d5c6fdf0d3 |
|
520 | changeset: 6:a3d5c6fdf0d3 | |
521 | user: test |
|
521 | user: test | |
522 | date: Thu Jan 01 00:00:06 1970 +0000 |
|
522 | date: Thu Jan 01 00:00:06 1970 +0000 | |
523 | summary: msg 6 |
|
523 | summary: msg 6 | |
524 |
|
524 | |||
525 |
|
525 | |||
526 | ensure that we still don't have a working dir |
|
526 | ensure that we still don't have a working dir | |
527 |
|
527 | |||
528 | $ hg parents |
|
528 | $ hg parents | |
529 |
|
529 | |||
530 |
|
530 | |||
531 | test the same case, this time with updating |
|
531 | test the same case, this time with updating | |
532 |
|
532 | |||
533 | $ cat > "$TESTTMP/script.sh" <<'EOF' |
|
533 | $ cat > "$TESTTMP/script.sh" <<'EOF' | |
534 | > #!/bin/sh |
|
534 | > #!/bin/sh | |
535 | > test -n "$HG_NODE" || (echo HG_NODE missing; exit 127) |
|
535 | > test -n "$HG_NODE" || (echo HG_NODE missing; exit 127) | |
536 | > current="`hg log -r \"bisect(current)\" --template {node}`" |
|
536 | > current="`hg log -r \"bisect(current)\" --template {node}`" | |
537 | > test "$current" = "$HG_NODE" || (echo current is bad: $current; exit 127) |
|
537 | > test "$current" = "$HG_NODE" || (echo current is bad: $current; exit 127) | |
538 | > rev="`hg log -r . --template {rev}`" |
|
538 | > rev="`hg log -r . --template {rev}`" | |
539 | > test "$rev" -ge 6 |
|
539 | > test "$rev" -ge 6 | |
540 | > EOF |
|
540 | > EOF | |
541 | $ chmod +x "$TESTTMP/script.sh" |
|
541 | $ chmod +x "$TESTTMP/script.sh" | |
542 | $ hg bisect -r |
|
542 | $ hg bisect -r | |
543 | $ hg up -qr tip |
|
543 | $ hg up -qr tip | |
544 | $ hg bisect --command "sh \"$TESTTMP/script.sh\" and some params" |
|
544 | $ hg bisect --command "sh \"$TESTTMP/script.sh\" and some params" | |
545 | changeset 31:58c80a7c8a40 tip "msg 31": good |
|
545 | changeset 31:58c80a7c8a40 tip "msg 31": good | |
546 | abort: cannot bisect (no known bad revisions) |
|
546 | abort: cannot bisect (no known bad revisions) | |
547 | [20] |
|
547 | [20] | |
548 | $ hg up -qr 0 |
|
548 | $ hg up -qr 0 | |
549 | $ hg bisect --command "sh \"$TESTTMP/script.sh\" and some params" |
|
549 | $ hg bisect --command "sh \"$TESTTMP/script.sh\" and some params" | |
550 | changeset 0:b99c7b9c8e11 "msg 0": bad |
|
550 | changeset 0:b99c7b9c8e11 "msg 0": bad | |
551 | changeset 15:e7fa0811edb0 "msg 15": good |
|
551 | changeset 15:e7fa0811edb0 "msg 15": good | |
552 | changeset 7:03750880c6b5 "msg 7": good |
|
552 | changeset 7:03750880c6b5 "msg 7": good | |
553 | changeset 3:b53bea5e2fcb "msg 3": bad |
|
553 | changeset 3:b53bea5e2fcb "msg 3": bad | |
554 | changeset 5:7874a09ea728 "msg 5": bad |
|
554 | changeset 5:7874a09ea728 "msg 5": bad | |
555 | changeset 6:a3d5c6fdf0d3 "msg 6": good |
|
555 | changeset 6:a3d5c6fdf0d3 "msg 6": good | |
556 | The first good revision is: |
|
556 | The first good revision is: | |
557 | changeset: 6:a3d5c6fdf0d3 |
|
557 | changeset: 6:a3d5c6fdf0d3 | |
558 | user: test |
|
558 | user: test | |
559 | date: Thu Jan 01 00:00:06 1970 +0000 |
|
559 | date: Thu Jan 01 00:00:06 1970 +0000 | |
560 | summary: msg 6 |
|
560 | summary: msg 6 | |
561 |
|
561 | |||
562 | $ hg graft -q 15 |
|
562 | $ hg graft -q 15 | |
563 | warning: conflicts while merging a! (edit, then use 'hg resolve --mark') |
|
563 | warning: conflicts while merging a! (edit, then use 'hg resolve --mark') | |
564 | abort: unresolved conflicts, can't continue |
|
564 | abort: unresolved conflicts, can't continue | |
565 | (use 'hg resolve' and 'hg graft --continue') |
|
565 | (use 'hg resolve' and 'hg graft --continue') | |
566 | [1] |
|
566 | [1] | |
567 | $ hg bisect --reset |
|
567 | $ hg bisect --reset | |
568 | $ hg up -C . |
|
568 | $ hg up -C . | |
569 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
569 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
570 |
|
570 | |||
571 | Check that bisect does not break on obsolete changesets |
|
571 | Check that bisect does not break on obsolete changesets | |
572 | ========================================================= |
|
572 | ========================================================= | |
573 |
|
573 | |||
574 | $ cat >> $HGRCPATH << EOF |
|
574 | $ cat >> $HGRCPATH << EOF | |
575 | > [experimental] |
|
575 | > [experimental] | |
576 | > evolution.createmarkers=True |
|
576 | > evolution.createmarkers=True | |
577 | > EOF |
|
577 | > EOF | |
578 |
|
578 | |||
579 | tip is obsolete |
|
579 | tip is obsolete | |
580 | --------------------- |
|
580 | --------------------- | |
581 |
|
581 | |||
582 |
$ hg debugobsolete `hg id - |
|
582 | $ hg debugobsolete `hg id -T "{node}" -r tip` | |
583 | 1 new obsolescence markers |
|
583 | 1 new obsolescence markers | |
584 | obsoleted 1 changesets |
|
584 | obsoleted 1 changesets | |
585 | $ hg bisect --reset |
|
585 | $ hg bisect --reset | |
586 | $ hg bisect --good 15 |
|
586 | $ hg bisect --good 15 | |
587 | $ hg bisect --bad 30 |
|
587 | $ hg bisect --bad 30 | |
588 | Testing changeset 22:06c7993750ce "msg 22" (15 changesets remaining, ~3 tests) |
|
588 | Testing changeset 22:06c7993750ce "msg 22" (15 changesets remaining, ~3 tests) | |
589 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
589 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
590 | $ hg bisect --command true |
|
590 | $ hg bisect --command true | |
591 | changeset 22:06c7993750ce "msg 22": good |
|
591 | changeset 22:06c7993750ce "msg 22": good | |
592 | changeset 26:3efc6fd51aeb "msg 26": good |
|
592 | changeset 26:3efc6fd51aeb "msg 26": good | |
593 | changeset 28:8e0c2264c8af "msg 28": good |
|
593 | changeset 28:8e0c2264c8af "msg 28": good | |
594 | changeset 29:b5bd63375ab9 "msg 29": good |
|
594 | changeset 29:b5bd63375ab9 "msg 29": good | |
595 | The first bad revision is: |
|
595 | The first bad revision is: | |
596 | changeset: 30:ed2d2f24b11c |
|
596 | changeset: 30:ed2d2f24b11c | |
597 | tag: tip |
|
597 | tag: tip | |
598 | user: test |
|
598 | user: test | |
599 | date: Thu Jan 01 00:00:30 1970 +0000 |
|
599 | date: Thu Jan 01 00:00:30 1970 +0000 | |
600 | summary: msg 30 |
|
600 | summary: msg 30 | |
601 |
|
601 | |||
602 |
|
602 | |||
603 | Rewritten commits should not crash |
|
603 | Rewritten commits should not crash | |
604 |
|
604 | |||
605 | $ hg co 29 |
|
605 | $ hg co 29 | |
606 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
606 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
607 | $ hg revert --all -r 30 |
|
607 | $ hg revert --all -r 30 | |
608 | reverting a |
|
608 | reverting a | |
609 | $ hg commit -m 'msg 30 -- fixed' |
|
609 | $ hg commit -m 'msg 30 -- fixed' | |
610 | created new head |
|
610 | created new head | |
611 |
$ hg debugobsolete `hg id - |
|
611 | $ hg debugobsolete `hg id -T "{node}" -r 30` `hg id -T "{node}" -r .` | |
612 | 1 new obsolescence markers |
|
612 | 1 new obsolescence markers | |
613 | obsoleted 1 changesets |
|
613 | obsoleted 1 changesets | |
614 | $ hg bisect |
|
614 | $ hg bisect | |
615 | The first bad revision is: |
|
615 | The first bad revision is: | |
616 | changeset: 30:ed2d2f24b11c |
|
616 | changeset: 30:ed2d2f24b11c | |
617 | user: test |
|
617 | user: test | |
618 | date: Thu Jan 01 00:00:30 1970 +0000 |
|
618 | date: Thu Jan 01 00:00:30 1970 +0000 | |
619 | obsolete: rewritten as 32:8a638ebd1122 |
|
619 | obsolete: rewritten as 32:8a638ebd1122 | |
620 | summary: msg 30 |
|
620 | summary: msg 30 | |
621 |
|
621 | |||
622 |
|
622 | |||
623 | Log template does not crash |
|
623 | Log template does not crash | |
624 |
|
624 | |||
625 | $ hg log -GTbisect -r 15:: |
|
625 | $ hg log -GTbisect -r 15:: | |
626 | @ changeset: 32:8a638ebd1122 |
|
626 | @ changeset: 32:8a638ebd1122 | |
627 | | bisect: good (implicit) |
|
627 | | bisect: good (implicit) | |
628 | | tag: tip |
|
628 | | tag: tip | |
629 | | parent: 29:b5bd63375ab9 |
|
629 | | parent: 29:b5bd63375ab9 | |
630 | | user: test |
|
630 | | user: test | |
631 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
631 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
632 | | summary: msg 30 -- fixed |
|
632 | | summary: msg 30 -- fixed | |
633 | | |
|
633 | | | |
634 | o changeset: 29:b5bd63375ab9 |
|
634 | o changeset: 29:b5bd63375ab9 | |
635 | | bisect: good |
|
635 | | bisect: good | |
636 | | user: test |
|
636 | | user: test | |
637 | | date: Thu Jan 01 00:00:29 1970 +0000 |
|
637 | | date: Thu Jan 01 00:00:29 1970 +0000 | |
638 | | summary: msg 29 |
|
638 | | summary: msg 29 | |
639 | | |
|
639 | | | |
640 | o changeset: 28:8e0c2264c8af |
|
640 | o changeset: 28:8e0c2264c8af | |
641 | | bisect: good |
|
641 | | bisect: good | |
642 | | user: test |
|
642 | | user: test | |
643 | | date: Thu Jan 01 00:00:28 1970 +0000 |
|
643 | | date: Thu Jan 01 00:00:28 1970 +0000 | |
644 | | summary: msg 28 |
|
644 | | summary: msg 28 | |
645 | | |
|
645 | | | |
646 | o changeset: 27:288867a866e9 |
|
646 | o changeset: 27:288867a866e9 | |
647 | | bisect: ignored |
|
647 | | bisect: ignored | |
648 | | user: test |
|
648 | | user: test | |
649 | | date: Thu Jan 01 00:00:27 1970 +0000 |
|
649 | | date: Thu Jan 01 00:00:27 1970 +0000 | |
650 | | summary: msg 27 |
|
650 | | summary: msg 27 | |
651 | | |
|
651 | | | |
652 | o changeset: 26:3efc6fd51aeb |
|
652 | o changeset: 26:3efc6fd51aeb | |
653 | | bisect: good |
|
653 | | bisect: good | |
654 | | user: test |
|
654 | | user: test | |
655 | | date: Thu Jan 01 00:00:26 1970 +0000 |
|
655 | | date: Thu Jan 01 00:00:26 1970 +0000 | |
656 | | summary: msg 26 |
|
656 | | summary: msg 26 | |
657 | | |
|
657 | | | |
658 | o changeset: 25:02a84173a97a |
|
658 | o changeset: 25:02a84173a97a | |
659 | | bisect: ignored |
|
659 | | bisect: ignored | |
660 | | user: test |
|
660 | | user: test | |
661 | | date: Thu Jan 01 00:00:25 1970 +0000 |
|
661 | | date: Thu Jan 01 00:00:25 1970 +0000 | |
662 | | summary: msg 25 |
|
662 | | summary: msg 25 | |
663 | | |
|
663 | | | |
664 | o changeset: 24:10e0acd3809e |
|
664 | o changeset: 24:10e0acd3809e | |
665 | | bisect: ignored |
|
665 | | bisect: ignored | |
666 | | user: test |
|
666 | | user: test | |
667 | | date: Thu Jan 01 00:00:24 1970 +0000 |
|
667 | | date: Thu Jan 01 00:00:24 1970 +0000 | |
668 | | summary: msg 24 |
|
668 | | summary: msg 24 | |
669 | | |
|
669 | | | |
670 | o changeset: 23:5ec79163bff4 |
|
670 | o changeset: 23:5ec79163bff4 | |
671 | | bisect: ignored |
|
671 | | bisect: ignored | |
672 | | user: test |
|
672 | | user: test | |
673 | | date: Thu Jan 01 00:00:23 1970 +0000 |
|
673 | | date: Thu Jan 01 00:00:23 1970 +0000 | |
674 | | summary: msg 23 |
|
674 | | summary: msg 23 | |
675 | | |
|
675 | | | |
676 | o changeset: 22:06c7993750ce |
|
676 | o changeset: 22:06c7993750ce | |
677 | | bisect: good |
|
677 | | bisect: good | |
678 | | user: test |
|
678 | | user: test | |
679 | | date: Thu Jan 01 00:00:22 1970 +0000 |
|
679 | | date: Thu Jan 01 00:00:22 1970 +0000 | |
680 | | summary: msg 22 |
|
680 | | summary: msg 22 | |
681 | | |
|
681 | | | |
682 | o changeset: 21:e5db6aa3fe2a |
|
682 | o changeset: 21:e5db6aa3fe2a | |
683 | | bisect: ignored |
|
683 | | bisect: ignored | |
684 | | user: test |
|
684 | | user: test | |
685 | | date: Thu Jan 01 00:00:21 1970 +0000 |
|
685 | | date: Thu Jan 01 00:00:21 1970 +0000 | |
686 | | summary: msg 21 |
|
686 | | summary: msg 21 | |
687 | | |
|
687 | | | |
688 | o changeset: 20:7128fb4fdbc9 |
|
688 | o changeset: 20:7128fb4fdbc9 | |
689 | | bisect: ignored |
|
689 | | bisect: ignored | |
690 | | user: test |
|
690 | | user: test | |
691 | | date: Thu Jan 01 00:00:20 1970 +0000 |
|
691 | | date: Thu Jan 01 00:00:20 1970 +0000 | |
692 | | summary: msg 20 |
|
692 | | summary: msg 20 | |
693 | | |
|
693 | | | |
694 | o changeset: 19:52798545b482 |
|
694 | o changeset: 19:52798545b482 | |
695 | | bisect: ignored |
|
695 | | bisect: ignored | |
696 | | user: test |
|
696 | | user: test | |
697 | | date: Thu Jan 01 00:00:19 1970 +0000 |
|
697 | | date: Thu Jan 01 00:00:19 1970 +0000 | |
698 | | summary: msg 19 |
|
698 | | summary: msg 19 | |
699 | | |
|
699 | | | |
700 | o changeset: 18:86977a90077e |
|
700 | o changeset: 18:86977a90077e | |
701 | | bisect: ignored |
|
701 | | bisect: ignored | |
702 | | user: test |
|
702 | | user: test | |
703 | | date: Thu Jan 01 00:00:18 1970 +0000 |
|
703 | | date: Thu Jan 01 00:00:18 1970 +0000 | |
704 | | summary: msg 18 |
|
704 | | summary: msg 18 | |
705 | | |
|
705 | | | |
706 | o changeset: 17:03515f4a9080 |
|
706 | o changeset: 17:03515f4a9080 | |
707 | | bisect: ignored |
|
707 | | bisect: ignored | |
708 | | user: test |
|
708 | | user: test | |
709 | | date: Thu Jan 01 00:00:17 1970 +0000 |
|
709 | | date: Thu Jan 01 00:00:17 1970 +0000 | |
710 | | summary: msg 17 |
|
710 | | summary: msg 17 | |
711 | | |
|
711 | | | |
712 | o changeset: 16:a2e6ea4973e9 |
|
712 | o changeset: 16:a2e6ea4973e9 | |
713 | | bisect: ignored |
|
713 | | bisect: ignored | |
714 | | user: test |
|
714 | | user: test | |
715 | | date: Thu Jan 01 00:00:16 1970 +0000 |
|
715 | | date: Thu Jan 01 00:00:16 1970 +0000 | |
716 | | summary: msg 16 |
|
716 | | summary: msg 16 | |
717 | | |
|
717 | | | |
718 | o changeset: 15:e7fa0811edb0 |
|
718 | o changeset: 15:e7fa0811edb0 | |
719 | | bisect: good |
|
719 | | bisect: good | |
720 | ~ user: test |
|
720 | ~ user: test | |
721 | date: Thu Jan 01 00:00:15 1970 +0000 |
|
721 | date: Thu Jan 01 00:00:15 1970 +0000 | |
722 | summary: msg 15 |
|
722 | summary: msg 15 | |
723 |
|
723 | |||
724 | $ hg debugobsolete --delete `hg debugobsolete --index -T'{index}\n' | tail -1` |
|
724 | $ hg debugobsolete --delete `hg debugobsolete --index -T'{index}\n' | tail -1` | |
725 | deleted 1 obsolescence markers |
|
725 | deleted 1 obsolescence markers | |
726 |
|
726 | |||
727 | Changeset in the bad:good range is obsolete |
|
727 | Changeset in the bad:good range is obsolete | |
728 | --------------------------------------------- |
|
728 | --------------------------------------------- | |
729 |
|
729 | |||
730 | $ hg up 30 |
|
730 | $ hg up 30 | |
731 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
731 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
732 | $ echo 'a' >> a |
|
732 | $ echo 'a' >> a | |
733 | $ hg ci -m "msg 32" -d "32 0" |
|
733 | $ hg ci -m "msg 32" -d "32 0" | |
734 | $ hg bisect --reset |
|
734 | $ hg bisect --reset | |
735 | $ hg bisect --good . |
|
735 | $ hg bisect --good . | |
736 | $ hg bisect --bad 25 |
|
736 | $ hg bisect --bad 25 | |
737 | Testing changeset 28:8e0c2264c8af "msg 28" (6 changesets remaining, ~2 tests) |
|
737 | Testing changeset 28:8e0c2264c8af "msg 28" (6 changesets remaining, ~2 tests) | |
738 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
738 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
739 | $ hg bisect --command true |
|
739 | $ hg bisect --command true | |
740 | changeset 28:8e0c2264c8af "msg 28": good |
|
740 | changeset 28:8e0c2264c8af "msg 28": good | |
741 | changeset 26:3efc6fd51aeb "msg 26": good |
|
741 | changeset 26:3efc6fd51aeb "msg 26": good | |
742 | The first good revision is: |
|
742 | The first good revision is: | |
743 | changeset: 26:3efc6fd51aeb |
|
743 | changeset: 26:3efc6fd51aeb | |
744 | user: test |
|
744 | user: test | |
745 | date: Thu Jan 01 00:00:26 1970 +0000 |
|
745 | date: Thu Jan 01 00:00:26 1970 +0000 | |
746 | summary: msg 26 |
|
746 | summary: msg 26 | |
747 |
|
747 | |||
748 | Test the validation message when exclusive options are used: |
|
748 | Test the validation message when exclusive options are used: | |
749 |
|
749 | |||
750 | $ hg bisect -r |
|
750 | $ hg bisect -r | |
751 | $ hg bisect -b -c false |
|
751 | $ hg bisect -b -c false | |
752 | abort: --bad and --command are incompatible |
|
752 | abort: --bad and --command are incompatible | |
753 | [10] |
|
753 | [10] | |
754 | $ hg bisect -b -e |
|
754 | $ hg bisect -b -e | |
755 | abort: --bad and --extend are incompatible |
|
755 | abort: --bad and --extend are incompatible | |
756 | [10] |
|
756 | [10] | |
757 | $ hg bisect -b -g |
|
757 | $ hg bisect -b -g | |
758 | abort: --bad and --good are incompatible |
|
758 | abort: --bad and --good are incompatible | |
759 | [10] |
|
759 | [10] | |
760 | $ hg bisect -b -r |
|
760 | $ hg bisect -b -r | |
761 | abort: --bad and --reset are incompatible |
|
761 | abort: --bad and --reset are incompatible | |
762 | [10] |
|
762 | [10] | |
763 | $ hg bisect -b -s |
|
763 | $ hg bisect -b -s | |
764 | abort: --bad and --skip are incompatible |
|
764 | abort: --bad and --skip are incompatible | |
765 | [10] |
|
765 | [10] | |
766 | $ hg bisect -c false -e |
|
766 | $ hg bisect -c false -e | |
767 | abort: --command and --extend are incompatible |
|
767 | abort: --command and --extend are incompatible | |
768 | [10] |
|
768 | [10] | |
769 | $ hg bisect -c false -g |
|
769 | $ hg bisect -c false -g | |
770 | abort: --command and --good are incompatible |
|
770 | abort: --command and --good are incompatible | |
771 | [10] |
|
771 | [10] | |
772 | $ hg bisect -c false -r |
|
772 | $ hg bisect -c false -r | |
773 | abort: --command and --reset are incompatible |
|
773 | abort: --command and --reset are incompatible | |
774 | [10] |
|
774 | [10] | |
775 | $ hg bisect -c false -s |
|
775 | $ hg bisect -c false -s | |
776 | abort: --command and --skip are incompatible |
|
776 | abort: --command and --skip are incompatible | |
777 | [10] |
|
777 | [10] | |
778 | $ hg bisect -e -g |
|
778 | $ hg bisect -e -g | |
779 | abort: --extend and --good are incompatible |
|
779 | abort: --extend and --good are incompatible | |
780 | [10] |
|
780 | [10] | |
781 | $ hg bisect -e -r |
|
781 | $ hg bisect -e -r | |
782 | abort: --extend and --reset are incompatible |
|
782 | abort: --extend and --reset are incompatible | |
783 | [10] |
|
783 | [10] | |
784 | $ hg bisect -e -s |
|
784 | $ hg bisect -e -s | |
785 | abort: --extend and --skip are incompatible |
|
785 | abort: --extend and --skip are incompatible | |
786 | [10] |
|
786 | [10] | |
787 | $ hg bisect -g -r |
|
787 | $ hg bisect -g -r | |
788 | abort: --good and --reset are incompatible |
|
788 | abort: --good and --reset are incompatible | |
789 | [10] |
|
789 | [10] | |
790 | $ hg bisect -g -s |
|
790 | $ hg bisect -g -s | |
791 | abort: --good and --skip are incompatible |
|
791 | abort: --good and --skip are incompatible | |
792 | [10] |
|
792 | [10] | |
793 | $ hg bisect -r -s |
|
793 | $ hg bisect -r -s | |
794 | abort: --reset and --skip are incompatible |
|
794 | abort: --reset and --skip are incompatible | |
795 | [10] |
|
795 | [10] |
@@ -1,665 +1,665 | |||||
1 | #require no-reposimplestore |
|
1 | #require no-reposimplestore | |
2 | #testcases revlogv1 revlogv2 |
|
2 | #testcases revlogv1 revlogv2 | |
3 |
|
3 | |||
4 | #if revlogv2 |
|
4 | #if revlogv2 | |
5 |
|
5 | |||
6 | $ cat >> $HGRCPATH <<EOF |
|
6 | $ cat >> $HGRCPATH <<EOF | |
7 | > [experimental] |
|
7 | > [experimental] | |
8 | > revlogv2=enable-unstable-format-and-corrupt-my-data |
|
8 | > revlogv2=enable-unstable-format-and-corrupt-my-data | |
9 | > EOF |
|
9 | > EOF | |
10 |
|
10 | |||
11 | #endif |
|
11 | #endif | |
12 |
|
12 | |||
13 | $ cp $HGRCPATH $HGRCPATH.orig |
|
13 | $ cp $HGRCPATH $HGRCPATH.orig | |
14 |
|
14 | |||
15 | Create repo with unimpeachable content |
|
15 | Create repo with unimpeachable content | |
16 |
|
16 | |||
17 | $ hg init r |
|
17 | $ hg init r | |
18 | $ cd r |
|
18 | $ cd r | |
19 | $ echo 'Initially untainted file' > target |
|
19 | $ echo 'Initially untainted file' > target | |
20 | $ echo 'Normal file here' > bystander |
|
20 | $ echo 'Normal file here' > bystander | |
21 | $ hg add target bystander |
|
21 | $ hg add target bystander | |
22 | $ hg ci -m init |
|
22 | $ hg ci -m init | |
23 |
|
23 | |||
24 | Clone repo so we can test pull later |
|
24 | Clone repo so we can test pull later | |
25 |
|
25 | |||
26 | $ cd .. |
|
26 | $ cd .. | |
27 | $ hg clone r rpull |
|
27 | $ hg clone r rpull | |
28 | updating to branch default |
|
28 | updating to branch default | |
29 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
29 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
30 | $ cd r |
|
30 | $ cd r | |
31 |
|
31 | |||
32 | Introduce content which will ultimately require censorship. Name the first |
|
32 | Introduce content which will ultimately require censorship. Name the first | |
33 | censored node C1, second C2, and so on |
|
33 | censored node C1, second C2, and so on | |
34 |
|
34 | |||
35 | $ echo 'Tainted file' > target |
|
35 | $ echo 'Tainted file' > target | |
36 | $ echo 'Passwords: hunter2' >> target |
|
36 | $ echo 'Passwords: hunter2' >> target | |
37 | $ hg ci -m taint target |
|
37 | $ hg ci -m taint target | |
38 |
$ C1=`hg id - |
|
38 | $ C1=`hg id -r . -T "{node}"` | |
39 |
|
39 | |||
40 | $ echo 'hunter3' >> target |
|
40 | $ echo 'hunter3' >> target | |
41 | $ echo 'Normal file v2' > bystander |
|
41 | $ echo 'Normal file v2' > bystander | |
42 | $ hg ci -m moretaint target bystander |
|
42 | $ hg ci -m moretaint target bystander | |
43 |
$ C2=`hg id - |
|
43 | $ C2=`hg id -r . -T "{node}"` | |
44 |
|
44 | |||
45 | Add a new sanitized versions to correct our mistake. Name the first head H1, |
|
45 | Add a new sanitized versions to correct our mistake. Name the first head H1, | |
46 | the second head H2, and so on |
|
46 | the second head H2, and so on | |
47 |
|
47 | |||
48 | $ echo 'Tainted file is now sanitized' > target |
|
48 | $ echo 'Tainted file is now sanitized' > target | |
49 | $ hg ci -m sanitized target |
|
49 | $ hg ci -m sanitized target | |
50 |
$ H1=`hg id - |
|
50 | $ H1=`hg id -r . -T "{node}"` | |
51 |
|
51 | |||
52 | $ hg update -r $C2 |
|
52 | $ hg update -r $C2 | |
53 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
53 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
54 | $ echo 'Tainted file now super sanitized' > target |
|
54 | $ echo 'Tainted file now super sanitized' > target | |
55 | $ hg ci -m 'super sanitized' target |
|
55 | $ hg ci -m 'super sanitized' target | |
56 | created new head |
|
56 | created new head | |
57 |
$ H2=`hg id - |
|
57 | $ H2=`hg id -r . -T "{node}"` | |
58 |
|
58 | |||
59 | Verify target contents before censorship at each revision |
|
59 | Verify target contents before censorship at each revision | |
60 |
|
60 | |||
61 | $ hg cat -r $H1 target | head -n 10 |
|
61 | $ hg cat -r $H1 target | head -n 10 | |
62 | Tainted file is now sanitized |
|
62 | Tainted file is now sanitized | |
63 | $ hg cat -r $H2 target | head -n 10 |
|
63 | $ hg cat -r $H2 target | head -n 10 | |
64 | Tainted file now super sanitized |
|
64 | Tainted file now super sanitized | |
65 | $ hg cat -r $C2 target | head -n 10 |
|
65 | $ hg cat -r $C2 target | head -n 10 | |
66 | Tainted file |
|
66 | Tainted file | |
67 | Passwords: hunter2 |
|
67 | Passwords: hunter2 | |
68 | hunter3 |
|
68 | hunter3 | |
69 | $ hg cat -r $C1 target | head -n 10 |
|
69 | $ hg cat -r $C1 target | head -n 10 | |
70 | Tainted file |
|
70 | Tainted file | |
71 | Passwords: hunter2 |
|
71 | Passwords: hunter2 | |
72 | $ hg cat -r 0 target | head -n 10 |
|
72 | $ hg cat -r 0 target | head -n 10 | |
73 | Initially untainted file |
|
73 | Initially untainted file | |
74 |
|
74 | |||
75 | Censor revision with 2 offenses |
|
75 | Censor revision with 2 offenses | |
76 |
|
76 | |||
77 | (this also tests file pattern matching: path relative to cwd case) |
|
77 | (this also tests file pattern matching: path relative to cwd case) | |
78 |
|
78 | |||
79 | $ mkdir -p foo/bar/baz |
|
79 | $ mkdir -p foo/bar/baz | |
80 | $ hg --config extensions.censor= --cwd foo/bar/baz censor -r $C2 -t "remove password" ../../../target |
|
80 | $ hg --config extensions.censor= --cwd foo/bar/baz censor -r $C2 -t "remove password" ../../../target | |
81 | checking for the censored content in 2 heads |
|
81 | checking for the censored content in 2 heads | |
82 | checking for the censored content in the working directory |
|
82 | checking for the censored content in the working directory | |
83 | censoring 1 file revisions |
|
83 | censoring 1 file revisions | |
84 | $ hg cat -r $H1 target | head -n 10 |
|
84 | $ hg cat -r $H1 target | head -n 10 | |
85 | Tainted file is now sanitized |
|
85 | Tainted file is now sanitized | |
86 | $ hg cat -r $H2 target | head -n 10 |
|
86 | $ hg cat -r $H2 target | head -n 10 | |
87 | Tainted file now super sanitized |
|
87 | Tainted file now super sanitized | |
88 | $ hg cat -r $C2 target | head -n 10 |
|
88 | $ hg cat -r $C2 target | head -n 10 | |
89 | abort: censored node: 1e0247a9a4b7 |
|
89 | abort: censored node: 1e0247a9a4b7 | |
90 | (set censor.policy to ignore errors) |
|
90 | (set censor.policy to ignore errors) | |
91 | $ hg cat -r $C1 target | head -n 10 |
|
91 | $ hg cat -r $C1 target | head -n 10 | |
92 | Tainted file |
|
92 | Tainted file | |
93 | Passwords: hunter2 |
|
93 | Passwords: hunter2 | |
94 | $ hg cat -r 0 target | head -n 10 |
|
94 | $ hg cat -r 0 target | head -n 10 | |
95 | Initially untainted file |
|
95 | Initially untainted file | |
96 |
|
96 | |||
97 | Censor revision with 1 offense |
|
97 | Censor revision with 1 offense | |
98 |
|
98 | |||
99 | (this also tests file pattern matching: with 'path:' scheme) |
|
99 | (this also tests file pattern matching: with 'path:' scheme) | |
100 |
|
100 | |||
101 | $ hg --config extensions.censor= --cwd foo/bar/baz censor -r $C1 path:target |
|
101 | $ hg --config extensions.censor= --cwd foo/bar/baz censor -r $C1 path:target | |
102 | checking for the censored content in 2 heads |
|
102 | checking for the censored content in 2 heads | |
103 | checking for the censored content in the working directory |
|
103 | checking for the censored content in the working directory | |
104 | censoring 1 file revisions |
|
104 | censoring 1 file revisions | |
105 | $ hg cat -r $H1 target | head -n 10 |
|
105 | $ hg cat -r $H1 target | head -n 10 | |
106 | Tainted file is now sanitized |
|
106 | Tainted file is now sanitized | |
107 | $ hg cat -r $H2 target | head -n 10 |
|
107 | $ hg cat -r $H2 target | head -n 10 | |
108 | Tainted file now super sanitized |
|
108 | Tainted file now super sanitized | |
109 | $ hg cat -r $C2 target | head -n 10 |
|
109 | $ hg cat -r $C2 target | head -n 10 | |
110 | abort: censored node: 1e0247a9a4b7 |
|
110 | abort: censored node: 1e0247a9a4b7 | |
111 | (set censor.policy to ignore errors) |
|
111 | (set censor.policy to ignore errors) | |
112 | $ hg cat -r $C1 target | head -n 10 |
|
112 | $ hg cat -r $C1 target | head -n 10 | |
113 | abort: censored node: 613bc869fceb |
|
113 | abort: censored node: 613bc869fceb | |
114 | (set censor.policy to ignore errors) |
|
114 | (set censor.policy to ignore errors) | |
115 | $ hg cat -r 0 target | head -n 10 |
|
115 | $ hg cat -r 0 target | head -n 10 | |
116 | Initially untainted file |
|
116 | Initially untainted file | |
117 |
|
117 | |||
118 | Can only checkout target at uncensored revisions, -X is workaround for --all |
|
118 | Can only checkout target at uncensored revisions, -X is workaround for --all | |
119 |
|
119 | |||
120 | $ hg revert -r $C2 target | head -n 10 |
|
120 | $ hg revert -r $C2 target | head -n 10 | |
121 | abort: censored node: 1e0247a9a4b7 |
|
121 | abort: censored node: 1e0247a9a4b7 | |
122 | (set censor.policy to ignore errors) |
|
122 | (set censor.policy to ignore errors) | |
123 | $ hg revert -r $C1 target | head -n 10 |
|
123 | $ hg revert -r $C1 target | head -n 10 | |
124 | abort: censored node: 613bc869fceb |
|
124 | abort: censored node: 613bc869fceb | |
125 | (set censor.policy to ignore errors) |
|
125 | (set censor.policy to ignore errors) | |
126 | $ hg revert -r $C1 --all |
|
126 | $ hg revert -r $C1 --all | |
127 | reverting bystander |
|
127 | reverting bystander | |
128 | reverting target |
|
128 | reverting target | |
129 | abort: censored node: 613bc869fceb |
|
129 | abort: censored node: 613bc869fceb | |
130 | (set censor.policy to ignore errors) |
|
130 | (set censor.policy to ignore errors) | |
131 | [255] |
|
131 | [255] | |
132 | $ hg revert -r $C1 --all -X target |
|
132 | $ hg revert -r $C1 --all -X target | |
133 | $ cat target | head -n 10 |
|
133 | $ cat target | head -n 10 | |
134 | Tainted file now super sanitized |
|
134 | Tainted file now super sanitized | |
135 | $ hg revert -r 0 --all |
|
135 | $ hg revert -r 0 --all | |
136 | reverting target |
|
136 | reverting target | |
137 | $ cat target | head -n 10 |
|
137 | $ cat target | head -n 10 | |
138 | Initially untainted file |
|
138 | Initially untainted file | |
139 | $ hg revert -r $H2 --all |
|
139 | $ hg revert -r $H2 --all | |
140 | reverting bystander |
|
140 | reverting bystander | |
141 | reverting target |
|
141 | reverting target | |
142 | $ cat target | head -n 10 |
|
142 | $ cat target | head -n 10 | |
143 | Tainted file now super sanitized |
|
143 | Tainted file now super sanitized | |
144 |
|
144 | |||
145 | Uncensored file can be viewed at any revision |
|
145 | Uncensored file can be viewed at any revision | |
146 |
|
146 | |||
147 | $ hg cat -r $H1 bystander | head -n 10 |
|
147 | $ hg cat -r $H1 bystander | head -n 10 | |
148 | Normal file v2 |
|
148 | Normal file v2 | |
149 | $ hg cat -r $C2 bystander | head -n 10 |
|
149 | $ hg cat -r $C2 bystander | head -n 10 | |
150 | Normal file v2 |
|
150 | Normal file v2 | |
151 | $ hg cat -r $C1 bystander | head -n 10 |
|
151 | $ hg cat -r $C1 bystander | head -n 10 | |
152 | Normal file here |
|
152 | Normal file here | |
153 | $ hg cat -r 0 bystander | head -n 10 |
|
153 | $ hg cat -r 0 bystander | head -n 10 | |
154 | Normal file here |
|
154 | Normal file here | |
155 |
|
155 | |||
156 | Can update to children of censored revision |
|
156 | Can update to children of censored revision | |
157 |
|
157 | |||
158 | $ hg update -r $H1 |
|
158 | $ hg update -r $H1 | |
159 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
159 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
160 | $ cat target | head -n 10 |
|
160 | $ cat target | head -n 10 | |
161 | Tainted file is now sanitized |
|
161 | Tainted file is now sanitized | |
162 | $ hg update -r $H2 |
|
162 | $ hg update -r $H2 | |
163 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
163 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
164 | $ cat target | head -n 10 |
|
164 | $ cat target | head -n 10 | |
165 | Tainted file now super sanitized |
|
165 | Tainted file now super sanitized | |
166 |
|
166 | |||
167 | Set censor policy to abort in trusted $HGRC so hg verify fails |
|
167 | Set censor policy to abort in trusted $HGRC so hg verify fails | |
168 |
|
168 | |||
169 | $ cp $HGRCPATH.orig $HGRCPATH |
|
169 | $ cp $HGRCPATH.orig $HGRCPATH | |
170 | $ cat >> $HGRCPATH <<EOF |
|
170 | $ cat >> $HGRCPATH <<EOF | |
171 | > [censor] |
|
171 | > [censor] | |
172 | > policy = abort |
|
172 | > policy = abort | |
173 | > EOF |
|
173 | > EOF | |
174 |
|
174 | |||
175 | Repo fails verification due to censorship |
|
175 | Repo fails verification due to censorship | |
176 |
|
176 | |||
177 | $ hg verify |
|
177 | $ hg verify | |
178 | checking changesets |
|
178 | checking changesets | |
179 | checking manifests |
|
179 | checking manifests | |
180 | crosschecking files in changesets and manifests |
|
180 | crosschecking files in changesets and manifests | |
181 | checking files |
|
181 | checking files | |
182 | target@1: censored file data |
|
182 | target@1: censored file data | |
183 | target@2: censored file data |
|
183 | target@2: censored file data | |
184 | not checking dirstate because of previous errors |
|
184 | not checking dirstate because of previous errors | |
185 | checked 5 changesets with 7 changes to 2 files |
|
185 | checked 5 changesets with 7 changes to 2 files | |
186 | 2 integrity errors encountered! |
|
186 | 2 integrity errors encountered! | |
187 | (first damaged changeset appears to be 1) |
|
187 | (first damaged changeset appears to be 1) | |
188 | [1] |
|
188 | [1] | |
189 |
|
189 | |||
190 | Cannot update to revision with censored data |
|
190 | Cannot update to revision with censored data | |
191 |
|
191 | |||
192 | $ hg update -r $C2 |
|
192 | $ hg update -r $C2 | |
193 | abort: censored node: 1e0247a9a4b7 |
|
193 | abort: censored node: 1e0247a9a4b7 | |
194 | (set censor.policy to ignore errors) |
|
194 | (set censor.policy to ignore errors) | |
195 | [255] |
|
195 | [255] | |
196 | $ hg update -r $C1 |
|
196 | $ hg update -r $C1 | |
197 | abort: censored node: 613bc869fceb |
|
197 | abort: censored node: 613bc869fceb | |
198 | (set censor.policy to ignore errors) |
|
198 | (set censor.policy to ignore errors) | |
199 | [255] |
|
199 | [255] | |
200 | $ hg update -r 0 |
|
200 | $ hg update -r 0 | |
201 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
201 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
202 | $ hg update -r $H2 |
|
202 | $ hg update -r $H2 | |
203 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
203 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
204 |
|
204 | |||
205 | Set censor policy to ignore in trusted $HGRC so hg verify passes |
|
205 | Set censor policy to ignore in trusted $HGRC so hg verify passes | |
206 |
|
206 | |||
207 | $ cp $HGRCPATH.orig $HGRCPATH |
|
207 | $ cp $HGRCPATH.orig $HGRCPATH | |
208 | $ cat >> $HGRCPATH <<EOF |
|
208 | $ cat >> $HGRCPATH <<EOF | |
209 | > [censor] |
|
209 | > [censor] | |
210 | > policy = ignore |
|
210 | > policy = ignore | |
211 | > EOF |
|
211 | > EOF | |
212 |
|
212 | |||
213 | Repo passes verification with warnings with explicit config |
|
213 | Repo passes verification with warnings with explicit config | |
214 |
|
214 | |||
215 | $ hg verify -q |
|
215 | $ hg verify -q | |
216 |
|
216 | |||
217 | May update to revision with censored data with explicit config |
|
217 | May update to revision with censored data with explicit config | |
218 |
|
218 | |||
219 | $ hg update -r $C2 |
|
219 | $ hg update -r $C2 | |
220 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
220 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
221 | $ cat target | head -n 10 |
|
221 | $ cat target | head -n 10 | |
222 | $ hg update -r $C1 |
|
222 | $ hg update -r $C1 | |
223 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
223 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
224 | $ cat target | head -n 10 |
|
224 | $ cat target | head -n 10 | |
225 | $ hg update -r 0 |
|
225 | $ hg update -r 0 | |
226 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
226 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
227 | $ cat target | head -n 10 |
|
227 | $ cat target | head -n 10 | |
228 | Initially untainted file |
|
228 | Initially untainted file | |
229 | $ hg update -r $H2 |
|
229 | $ hg update -r $H2 | |
230 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
230 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
231 | $ cat target | head -n 10 |
|
231 | $ cat target | head -n 10 | |
232 | Tainted file now super sanitized |
|
232 | Tainted file now super sanitized | |
233 |
|
233 | |||
234 | Can merge in revision with censored data. Test requires one branch of history |
|
234 | Can merge in revision with censored data. Test requires one branch of history | |
235 | with the file censored, but we can't censor at a head, so advance H1. |
|
235 | with the file censored, but we can't censor at a head, so advance H1. | |
236 |
|
236 | |||
237 | $ hg update -r $H1 |
|
237 | $ hg update -r $H1 | |
238 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
238 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
239 | $ C3=$H1 |
|
239 | $ C3=$H1 | |
240 | $ echo 'advanced head H1' > target |
|
240 | $ echo 'advanced head H1' > target | |
241 | $ hg ci -m 'advance head H1' target |
|
241 | $ hg ci -m 'advance head H1' target | |
242 |
$ H1=`hg id - |
|
242 | $ H1=`hg id -r . -T "{node}"` | |
243 | $ hg --config extensions.censor= censor -r $C3 target |
|
243 | $ hg --config extensions.censor= censor -r $C3 target | |
244 | checking for the censored content in 2 heads |
|
244 | checking for the censored content in 2 heads | |
245 | checking for the censored content in the working directory |
|
245 | checking for the censored content in the working directory | |
246 | censoring 1 file revisions |
|
246 | censoring 1 file revisions | |
247 | $ hg update -r $H2 |
|
247 | $ hg update -r $H2 | |
248 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
248 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
249 | $ hg merge -r $C3 |
|
249 | $ hg merge -r $C3 | |
250 | merging target |
|
250 | merging target | |
251 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
251 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
252 | (branch merge, don't forget to commit) |
|
252 | (branch merge, don't forget to commit) | |
253 |
|
253 | |||
254 | Revisions present in repository heads may not be censored |
|
254 | Revisions present in repository heads may not be censored | |
255 |
|
255 | |||
256 | $ hg update -C -r $H2 |
|
256 | $ hg update -C -r $H2 | |
257 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
257 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
258 | $ hg --config extensions.censor= censor -r $H2 target |
|
258 | $ hg --config extensions.censor= censor -r $H2 target | |
259 | checking for the censored content in 2 heads |
|
259 | checking for the censored content in 2 heads | |
260 | abort: cannot censor file in heads (78a8fc215e79) |
|
260 | abort: cannot censor file in heads (78a8fc215e79) | |
261 | (clean/delete and commit first) |
|
261 | (clean/delete and commit first) | |
262 | [255] |
|
262 | [255] | |
263 | $ echo 'twiddling thumbs' > bystander |
|
263 | $ echo 'twiddling thumbs' > bystander | |
264 | $ hg ci -m 'bystander commit' |
|
264 | $ hg ci -m 'bystander commit' | |
265 |
$ H2=`hg id - |
|
265 | $ H2=`hg id -r . -T "{node}"` | |
266 | $ hg --config extensions.censor= censor -r "$H2^" target |
|
266 | $ hg --config extensions.censor= censor -r "$H2^" target | |
267 | checking for the censored content in 2 heads |
|
267 | checking for the censored content in 2 heads | |
268 | abort: cannot censor file in heads (efbe78065929) |
|
268 | abort: cannot censor file in heads (efbe78065929) | |
269 | (clean/delete and commit first) |
|
269 | (clean/delete and commit first) | |
270 | [255] |
|
270 | [255] | |
271 |
|
271 | |||
272 | Cannot censor working directory |
|
272 | Cannot censor working directory | |
273 |
|
273 | |||
274 | $ echo 'seriously no passwords' > target |
|
274 | $ echo 'seriously no passwords' > target | |
275 | $ hg ci -m 'extend second head arbitrarily' target |
|
275 | $ hg ci -m 'extend second head arbitrarily' target | |
276 |
$ H2=`hg id - |
|
276 | $ H2=`hg id -r . -T "{node}"` | |
277 | $ hg update -r "$H2^" |
|
277 | $ hg update -r "$H2^" | |
278 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
278 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
279 | $ hg --config extensions.censor= censor -r . target |
|
279 | $ hg --config extensions.censor= censor -r . target | |
280 | checking for the censored content in 2 heads |
|
280 | checking for the censored content in 2 heads | |
281 | checking for the censored content in the working directory |
|
281 | checking for the censored content in the working directory | |
282 | abort: cannot censor working directory |
|
282 | abort: cannot censor working directory | |
283 | (clean/delete/update first) |
|
283 | (clean/delete/update first) | |
284 | [255] |
|
284 | [255] | |
285 | $ hg update -r $H2 |
|
285 | $ hg update -r $H2 | |
286 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
286 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
287 |
|
287 | |||
288 | Can re-add file after being deleted + censored |
|
288 | Can re-add file after being deleted + censored | |
289 |
|
289 | |||
290 | $ C4=$H2 |
|
290 | $ C4=$H2 | |
291 | $ hg rm target |
|
291 | $ hg rm target | |
292 | $ hg ci -m 'delete target so it may be censored' |
|
292 | $ hg ci -m 'delete target so it may be censored' | |
293 |
$ H2=`hg id - |
|
293 | $ H2=`hg id -r . -T "{node}"` | |
294 | $ hg --config extensions.censor= censor -r $C4 target |
|
294 | $ hg --config extensions.censor= censor -r $C4 target | |
295 | checking for the censored content in 2 heads |
|
295 | checking for the censored content in 2 heads | |
296 | checking for the censored content in the working directory |
|
296 | checking for the censored content in the working directory | |
297 | censoring 1 file revisions |
|
297 | censoring 1 file revisions | |
298 | $ hg cat -r $C4 target | head -n 10 |
|
298 | $ hg cat -r $C4 target | head -n 10 | |
299 | $ hg cat -r "$H2^^" target | head -n 10 |
|
299 | $ hg cat -r "$H2^^" target | head -n 10 | |
300 | Tainted file now super sanitized |
|
300 | Tainted file now super sanitized | |
301 | $ echo 'fresh start' > target |
|
301 | $ echo 'fresh start' > target | |
302 | $ hg add target |
|
302 | $ hg add target | |
303 | $ hg ci -m reincarnated target |
|
303 | $ hg ci -m reincarnated target | |
304 |
$ H2=`hg id - |
|
304 | $ H2=`hg id -r . -T "{node}"` | |
305 | $ hg cat -r $H2 target | head -n 10 |
|
305 | $ hg cat -r $H2 target | head -n 10 | |
306 | fresh start |
|
306 | fresh start | |
307 | $ hg cat -r "$H2^" target | head -n 10 |
|
307 | $ hg cat -r "$H2^" target | head -n 10 | |
308 | target: no such file in rev 452ec1762369 |
|
308 | target: no such file in rev 452ec1762369 | |
309 | $ hg cat -r $C4 target | head -n 10 |
|
309 | $ hg cat -r $C4 target | head -n 10 | |
310 | $ hg cat -r "$H2^^^" target | head -n 10 |
|
310 | $ hg cat -r "$H2^^^" target | head -n 10 | |
311 | Tainted file now super sanitized |
|
311 | Tainted file now super sanitized | |
312 |
|
312 | |||
313 | Can censor enough revision to move back to inline storage |
|
313 | Can censor enough revision to move back to inline storage | |
314 |
|
314 | |||
315 | $ hg debugrevlogstats | grep target |
|
315 | $ hg debugrevlogstats | grep target | |
316 | rev-count data-size inl type target |
|
316 | rev-count data-size inl type target | |
317 | 8 ??? no file target (glob) (revlogv2 !) |
|
317 | 8 ??? no file target (glob) (revlogv2 !) | |
318 | 8 ??? yes file target (glob) (revlogv1 !) |
|
318 | 8 ??? yes file target (glob) (revlogv1 !) | |
319 | $ $TESTDIR/seq.py 4000 | $TESTDIR/sha256line.py > target |
|
319 | $ $TESTDIR/seq.py 4000 | $TESTDIR/sha256line.py > target | |
320 | $ hg ci -m 'add 100k passwords' |
|
320 | $ hg ci -m 'add 100k passwords' | |
321 |
$ H2=`hg id - |
|
321 | $ H2=`hg id -r . -T "{node}"` | |
322 | $ C5=$H2 |
|
322 | $ C5=$H2 | |
323 | $ hg revert -r "$H2^" target |
|
323 | $ hg revert -r "$H2^" target | |
324 | $ hg ci -m 'cleaned 100k passwords' |
|
324 | $ hg ci -m 'cleaned 100k passwords' | |
325 |
$ H2=`hg id - |
|
325 | $ H2=`hg id -r . -T "{node}"` | |
326 | $ hg debugrevlogstats | grep target |
|
326 | $ hg debugrevlogstats | grep target | |
327 | rev-count data-size inl type target |
|
327 | rev-count data-size inl type target | |
328 | 10 ?????? no file target (glob) |
|
328 | 10 ?????? no file target (glob) | |
329 | $ hg --config extensions.censor= censor -r $C5 target |
|
329 | $ hg --config extensions.censor= censor -r $C5 target | |
330 | checking for the censored content in 2 heads |
|
330 | checking for the censored content in 2 heads | |
331 | checking for the censored content in the working directory |
|
331 | checking for the censored content in the working directory | |
332 | censoring 1 file revisions |
|
332 | censoring 1 file revisions | |
333 |
|
333 | |||
334 | The important part is for the censor operation to not crash and the repository |
|
334 | The important part is for the censor operation to not crash and the repository | |
335 | to not be corrupted. Right now this involve keeping the revlog split. |
|
335 | to not be corrupted. Right now this involve keeping the revlog split. | |
336 |
|
336 | |||
337 | $ hg debugrevlogstats | grep target |
|
337 | $ hg debugrevlogstats | grep target | |
338 | rev-count data-size inl type target |
|
338 | rev-count data-size inl type target | |
339 | 10 ??? no file target (glob) |
|
339 | 10 ??? no file target (glob) | |
340 | $ hg cat -r $C5 target | head -n 10 |
|
340 | $ hg cat -r $C5 target | head -n 10 | |
341 | $ hg cat -r $H2 target | head -n 10 |
|
341 | $ hg cat -r $H2 target | head -n 10 | |
342 | fresh start |
|
342 | fresh start | |
343 | $ hg verify |
|
343 | $ hg verify | |
344 | checking changesets |
|
344 | checking changesets | |
345 | checking manifests |
|
345 | checking manifests | |
346 | crosschecking files in changesets and manifests |
|
346 | crosschecking files in changesets and manifests | |
347 | checking files |
|
347 | checking files | |
348 | checking dirstate |
|
348 | checking dirstate | |
349 | checked 12 changesets with 13 changes to 2 files |
|
349 | checked 12 changesets with 13 changes to 2 files | |
350 |
|
350 | |||
351 | Repo with censored nodes can be cloned and cloned nodes are censored |
|
351 | Repo with censored nodes can be cloned and cloned nodes are censored | |
352 |
|
352 | |||
353 | $ cd .. |
|
353 | $ cd .. | |
354 | $ hg clone r rclone |
|
354 | $ hg clone r rclone | |
355 | updating to branch default |
|
355 | updating to branch default | |
356 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
356 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
357 | $ cd rclone |
|
357 | $ cd rclone | |
358 | $ hg cat -r $H1 target | head -n 10 |
|
358 | $ hg cat -r $H1 target | head -n 10 | |
359 | advanced head H1 |
|
359 | advanced head H1 | |
360 | $ hg cat -r $H2~5 target | head -n 10 |
|
360 | $ hg cat -r $H2~5 target | head -n 10 | |
361 | Tainted file now super sanitized |
|
361 | Tainted file now super sanitized | |
362 | $ hg cat -r $C2 target | head -n 10 |
|
362 | $ hg cat -r $C2 target | head -n 10 | |
363 | $ hg cat -r $C1 target | head -n 10 |
|
363 | $ hg cat -r $C1 target | head -n 10 | |
364 | $ hg cat -r 0 target | head -n 10 |
|
364 | $ hg cat -r 0 target | head -n 10 | |
365 | Initially untainted file |
|
365 | Initially untainted file | |
366 | $ hg verify -q |
|
366 | $ hg verify -q | |
367 |
|
367 | |||
368 | Repo cloned before tainted content introduced can pull censored nodes |
|
368 | Repo cloned before tainted content introduced can pull censored nodes | |
369 |
|
369 | |||
370 | $ cd ../rpull |
|
370 | $ cd ../rpull | |
371 | $ hg cat -r tip target | head -n 10 |
|
371 | $ hg cat -r tip target | head -n 10 | |
372 | Initially untainted file |
|
372 | Initially untainted file | |
373 | $ hg verify -q |
|
373 | $ hg verify -q | |
374 | $ hg pull -r $H1 -r $H2 |
|
374 | $ hg pull -r $H1 -r $H2 | |
375 | pulling from $TESTTMP/r |
|
375 | pulling from $TESTTMP/r | |
376 | searching for changes |
|
376 | searching for changes | |
377 | adding changesets |
|
377 | adding changesets | |
378 | adding manifests |
|
378 | adding manifests | |
379 | adding file changes |
|
379 | adding file changes | |
380 | added 11 changesets with 11 changes to 2 files (+1 heads) |
|
380 | added 11 changesets with 11 changes to 2 files (+1 heads) | |
381 | new changesets * (glob) |
|
381 | new changesets * (glob) | |
382 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
382 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
383 | $ hg update 4 |
|
383 | $ hg update 4 | |
384 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
384 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
385 | $ cat target | head -n 10 |
|
385 | $ cat target | head -n 10 | |
386 | Tainted file now super sanitized |
|
386 | Tainted file now super sanitized | |
387 | $ hg cat -r $H1 target | head -n 10 |
|
387 | $ hg cat -r $H1 target | head -n 10 | |
388 | advanced head H1 |
|
388 | advanced head H1 | |
389 | $ hg cat -r $H2~5 target | head -n 10 |
|
389 | $ hg cat -r $H2~5 target | head -n 10 | |
390 | Tainted file now super sanitized |
|
390 | Tainted file now super sanitized | |
391 | $ hg cat -r $C2 target | head -n 10 |
|
391 | $ hg cat -r $C2 target | head -n 10 | |
392 | $ hg cat -r $C1 target | head -n 10 |
|
392 | $ hg cat -r $C1 target | head -n 10 | |
393 | $ hg cat -r 0 target | head -n 10 |
|
393 | $ hg cat -r 0 target | head -n 10 | |
394 | Initially untainted file |
|
394 | Initially untainted file | |
395 | $ hg verify -q |
|
395 | $ hg verify -q | |
396 |
|
396 | |||
397 | Censored nodes can be pushed if they censor previously unexchanged nodes |
|
397 | Censored nodes can be pushed if they censor previously unexchanged nodes | |
398 |
|
398 | |||
399 | $ echo 'Passwords: hunter2hunter2' > target |
|
399 | $ echo 'Passwords: hunter2hunter2' > target | |
400 | $ hg ci -m 're-add password from clone' target |
|
400 | $ hg ci -m 're-add password from clone' target | |
401 | created new head |
|
401 | created new head | |
402 |
$ H3=`hg id - |
|
402 | $ H3=`hg id -r . -T "{node}"` | |
403 | $ REV=$H3 |
|
403 | $ REV=$H3 | |
404 | $ echo 'Re-sanitized; nothing to see here' > target |
|
404 | $ echo 'Re-sanitized; nothing to see here' > target | |
405 | $ hg ci -m 're-sanitized' target |
|
405 | $ hg ci -m 're-sanitized' target | |
406 |
$ H2=`hg id - |
|
406 | $ H2=`hg id -r . -T "{node}"` | |
407 | $ CLEANREV=$H2 |
|
407 | $ CLEANREV=$H2 | |
408 | $ hg cat -r $REV target | head -n 10 |
|
408 | $ hg cat -r $REV target | head -n 10 | |
409 | Passwords: hunter2hunter2 |
|
409 | Passwords: hunter2hunter2 | |
410 | $ hg --config extensions.censor= censor -r $REV target |
|
410 | $ hg --config extensions.censor= censor -r $REV target | |
411 | checking for the censored content in 3 heads |
|
411 | checking for the censored content in 3 heads | |
412 | checking for the censored content in the working directory |
|
412 | checking for the censored content in the working directory | |
413 | censoring 1 file revisions |
|
413 | censoring 1 file revisions | |
414 | $ hg cat -r $REV target | head -n 10 |
|
414 | $ hg cat -r $REV target | head -n 10 | |
415 | $ hg cat -r $CLEANREV target | head -n 10 |
|
415 | $ hg cat -r $CLEANREV target | head -n 10 | |
416 | Re-sanitized; nothing to see here |
|
416 | Re-sanitized; nothing to see here | |
417 | $ hg push -f -r $H2 |
|
417 | $ hg push -f -r $H2 | |
418 | pushing to $TESTTMP/r |
|
418 | pushing to $TESTTMP/r | |
419 | searching for changes |
|
419 | searching for changes | |
420 | adding changesets |
|
420 | adding changesets | |
421 | adding manifests |
|
421 | adding manifests | |
422 | adding file changes |
|
422 | adding file changes | |
423 | added 2 changesets with 2 changes to 1 files (+1 heads) |
|
423 | added 2 changesets with 2 changes to 1 files (+1 heads) | |
424 |
|
424 | |||
425 | $ cd ../r |
|
425 | $ cd ../r | |
426 | $ hg cat -r $REV target | head -n 10 |
|
426 | $ hg cat -r $REV target | head -n 10 | |
427 | $ hg cat -r $CLEANREV target | head -n 10 |
|
427 | $ hg cat -r $CLEANREV target | head -n 10 | |
428 | Re-sanitized; nothing to see here |
|
428 | Re-sanitized; nothing to see here | |
429 | $ hg update $CLEANREV |
|
429 | $ hg update $CLEANREV | |
430 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
430 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
431 | $ cat target | head -n 10 |
|
431 | $ cat target | head -n 10 | |
432 | Re-sanitized; nothing to see here |
|
432 | Re-sanitized; nothing to see here | |
433 |
|
433 | |||
434 | Censored nodes can be bundled up and unbundled in another repo |
|
434 | Censored nodes can be bundled up and unbundled in another repo | |
435 |
|
435 | |||
436 | $ hg bundle --base 0 ../pwbundle |
|
436 | $ hg bundle --base 0 ../pwbundle | |
437 | 13 changesets found |
|
437 | 13 changesets found | |
438 | $ cd ../rclone |
|
438 | $ cd ../rclone | |
439 | $ hg unbundle ../pwbundle |
|
439 | $ hg unbundle ../pwbundle | |
440 | adding changesets |
|
440 | adding changesets | |
441 | adding manifests |
|
441 | adding manifests | |
442 | adding file changes |
|
442 | adding file changes | |
443 | added 2 changesets with 2 changes to 2 files (+1 heads) |
|
443 | added 2 changesets with 2 changes to 2 files (+1 heads) | |
444 | new changesets * (glob) |
|
444 | new changesets * (glob) | |
445 | (run 'hg heads .' to see heads, 'hg merge' to merge) |
|
445 | (run 'hg heads .' to see heads, 'hg merge' to merge) | |
446 | $ hg cat -r $REV target | head -n 10 |
|
446 | $ hg cat -r $REV target | head -n 10 | |
447 | $ hg cat -r $CLEANREV target | head -n 10 |
|
447 | $ hg cat -r $CLEANREV target | head -n 10 | |
448 | Re-sanitized; nothing to see here |
|
448 | Re-sanitized; nothing to see here | |
449 | $ hg update $CLEANREV |
|
449 | $ hg update $CLEANREV | |
450 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
450 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
451 | $ cat target | head -n 10 |
|
451 | $ cat target | head -n 10 | |
452 | Re-sanitized; nothing to see here |
|
452 | Re-sanitized; nothing to see here | |
453 | $ hg verify -q |
|
453 | $ hg verify -q | |
454 |
|
454 | |||
455 | Grepping only warns, doesn't error out |
|
455 | Grepping only warns, doesn't error out | |
456 |
|
456 | |||
457 | $ cd ../rpull |
|
457 | $ cd ../rpull | |
458 | $ hg grep 'Normal file' |
|
458 | $ hg grep 'Normal file' | |
459 | bystander:Normal file v2 |
|
459 | bystander:Normal file v2 | |
460 | $ hg grep nothing |
|
460 | $ hg grep nothing | |
461 | target:Re-sanitized; nothing to see here |
|
461 | target:Re-sanitized; nothing to see here | |
462 | $ hg grep --diff 'Normal file' |
|
462 | $ hg grep --diff 'Normal file' | |
463 | cannot search in censored file: target:7 |
|
463 | cannot search in censored file: target:7 | |
464 | cannot search in censored file: target:10 |
|
464 | cannot search in censored file: target:10 | |
465 | cannot search in censored file: target:12 |
|
465 | cannot search in censored file: target:12 | |
466 | bystander:6:-:Normal file v2 |
|
466 | bystander:6:-:Normal file v2 | |
467 | cannot search in censored file: target:1 |
|
467 | cannot search in censored file: target:1 | |
468 | cannot search in censored file: target:2 |
|
468 | cannot search in censored file: target:2 | |
469 | cannot search in censored file: target:3 |
|
469 | cannot search in censored file: target:3 | |
470 | bystander:2:-:Normal file here |
|
470 | bystander:2:-:Normal file here | |
471 | bystander:2:+:Normal file v2 |
|
471 | bystander:2:+:Normal file v2 | |
472 | bystander:0:+:Normal file here |
|
472 | bystander:0:+:Normal file here | |
473 | $ hg grep --diff nothing |
|
473 | $ hg grep --diff nothing | |
474 | cannot search in censored file: target:7 |
|
474 | cannot search in censored file: target:7 | |
475 | cannot search in censored file: target:10 |
|
475 | cannot search in censored file: target:10 | |
476 | cannot search in censored file: target:12 |
|
476 | cannot search in censored file: target:12 | |
477 | target:13:+:Re-sanitized; nothing to see here |
|
477 | target:13:+:Re-sanitized; nothing to see here | |
478 | cannot search in censored file: target:1 |
|
478 | cannot search in censored file: target:1 | |
479 | cannot search in censored file: target:2 |
|
479 | cannot search in censored file: target:2 | |
480 | cannot search in censored file: target:3 |
|
480 | cannot search in censored file: target:3 | |
481 |
|
481 | |||
482 | Censored nodes can be imported on top of censored nodes, consecutively |
|
482 | Censored nodes can be imported on top of censored nodes, consecutively | |
483 |
|
483 | |||
484 | $ hg init ../rimport |
|
484 | $ hg init ../rimport | |
485 | $ hg bundle --base 1 ../rimport/splitbundle |
|
485 | $ hg bundle --base 1 ../rimport/splitbundle | |
486 | 12 changesets found |
|
486 | 12 changesets found | |
487 | $ cd ../rimport |
|
487 | $ cd ../rimport | |
488 | $ hg pull -r $H1 -r $H2 ../r |
|
488 | $ hg pull -r $H1 -r $H2 ../r | |
489 | pulling from ../r |
|
489 | pulling from ../r | |
490 | adding changesets |
|
490 | adding changesets | |
491 | adding manifests |
|
491 | adding manifests | |
492 | adding file changes |
|
492 | adding file changes | |
493 | added 8 changesets with 10 changes to 2 files (+1 heads) |
|
493 | added 8 changesets with 10 changes to 2 files (+1 heads) | |
494 | new changesets e97f55b2665a:dcbaf17bf3a1 |
|
494 | new changesets e97f55b2665a:dcbaf17bf3a1 | |
495 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
495 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
496 | $ hg unbundle splitbundle |
|
496 | $ hg unbundle splitbundle | |
497 | adding changesets |
|
497 | adding changesets | |
498 | adding manifests |
|
498 | adding manifests | |
499 | adding file changes |
|
499 | adding file changes | |
500 | added 6 changesets with 5 changes to 2 files (+1 heads) |
|
500 | added 6 changesets with 5 changes to 2 files (+1 heads) | |
501 | new changesets * (glob) |
|
501 | new changesets * (glob) | |
502 | (run 'hg heads .' to see heads, 'hg merge' to merge) |
|
502 | (run 'hg heads .' to see heads, 'hg merge' to merge) | |
503 | $ hg update $H2 |
|
503 | $ hg update $H2 | |
504 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
504 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
505 | $ cat target | head -n 10 |
|
505 | $ cat target | head -n 10 | |
506 | Re-sanitized; nothing to see here |
|
506 | Re-sanitized; nothing to see here | |
507 | $ hg verify -q |
|
507 | $ hg verify -q | |
508 | $ cd ../r |
|
508 | $ cd ../r | |
509 |
|
509 | |||
510 | Can import bundle where first revision of a file is censored |
|
510 | Can import bundle where first revision of a file is censored | |
511 |
|
511 | |||
512 | $ hg init ../rinit |
|
512 | $ hg init ../rinit | |
513 | $ hg --config extensions.censor= censor -r 0 target |
|
513 | $ hg --config extensions.censor= censor -r 0 target | |
514 | checking for the censored content in 3 heads |
|
514 | checking for the censored content in 3 heads | |
515 | checking for the censored content in the working directory |
|
515 | checking for the censored content in the working directory | |
516 | censoring 1 file revisions |
|
516 | censoring 1 file revisions | |
517 | $ hg bundle -r 0 --base null ../rinit/initbundle |
|
517 | $ hg bundle -r 0 --base null ../rinit/initbundle | |
518 | 1 changesets found |
|
518 | 1 changesets found | |
519 | $ cd ../rinit |
|
519 | $ cd ../rinit | |
520 | $ hg unbundle initbundle |
|
520 | $ hg unbundle initbundle | |
521 | adding changesets |
|
521 | adding changesets | |
522 | adding manifests |
|
522 | adding manifests | |
523 | adding file changes |
|
523 | adding file changes | |
524 | added 1 changesets with 2 changes to 2 files |
|
524 | added 1 changesets with 2 changes to 2 files | |
525 | new changesets e97f55b2665a (1 drafts) |
|
525 | new changesets e97f55b2665a (1 drafts) | |
526 | (run 'hg update' to get a working copy) |
|
526 | (run 'hg update' to get a working copy) | |
527 | $ hg cat -r 0 target | head -n 10 |
|
527 | $ hg cat -r 0 target | head -n 10 | |
528 |
|
528 | |||
529 | Can skip the head checking steps |
|
529 | Can skip the head checking steps | |
530 |
|
530 | |||
531 | $ hg --config extensions.censor= censor -r 0 --no-check-heads target |
|
531 | $ hg --config extensions.censor= censor -r 0 --no-check-heads target | |
532 | checking for the censored content in the working directory |
|
532 | checking for the censored content in the working directory | |
533 | censoring 1 file revisions |
|
533 | censoring 1 file revisions | |
534 |
|
534 | |||
535 | Can censor multiple revision in one go. |
|
535 | Can censor multiple revision in one go. | |
536 |
|
536 | |||
537 | $ cd ../r |
|
537 | $ cd ../r | |
538 | $ hg --config extensions.censor= censor -r 0+1 target |
|
538 | $ hg --config extensions.censor= censor -r 0+1 target | |
539 | checking for the censored content in 3 heads |
|
539 | checking for the censored content in 3 heads | |
540 | checking for the censored content in the working directory |
|
540 | checking for the censored content in the working directory | |
541 | censoring 2 file revisions |
|
541 | censoring 2 file revisions | |
542 |
|
542 | |||
543 |
|
543 | |||
544 |
|
544 | |||
545 | #if revlogv2 |
|
545 | #if revlogv2 | |
546 |
|
546 | |||
547 | Testing feature that does not work in revlog v1 |
|
547 | Testing feature that does not work in revlog v1 | |
548 | =============================================== |
|
548 | =============================================== | |
549 |
|
549 | |||
550 | Censoring a revision that is used as delta base |
|
550 | Censoring a revision that is used as delta base | |
551 | ----------------------------------------------- |
|
551 | ----------------------------------------------- | |
552 |
|
552 | |||
553 | $ cd .. |
|
553 | $ cd .. | |
554 | $ hg init censor-with-delta |
|
554 | $ hg init censor-with-delta | |
555 | $ cd censor-with-delta |
|
555 | $ cd censor-with-delta | |
556 | $ echo root > target |
|
556 | $ echo root > target | |
557 | $ hg add target |
|
557 | $ hg add target | |
558 | $ hg commit -m root |
|
558 | $ hg commit -m root | |
559 |
$ B0=`hg id - |
|
559 | $ B0=`hg id -r . -T "{node}"` | |
560 | $ for x in `"$PYTHON" $TESTDIR/seq.py 0 50000` |
|
560 | $ for x in `"$PYTHON" $TESTDIR/seq.py 0 50000` | |
561 | > do |
|
561 | > do | |
562 | > echo "Password: hunter$x" >> target |
|
562 | > echo "Password: hunter$x" >> target | |
563 | > done |
|
563 | > done | |
564 | $ hg ci -m 'write a long file' |
|
564 | $ hg ci -m 'write a long file' | |
565 |
$ B1=`hg id - |
|
565 | $ B1=`hg id -r . -T "{node}"` | |
566 | $ echo 'small change (should create a delta)' >> target |
|
566 | $ echo 'small change (should create a delta)' >> target | |
567 | $ hg ci -m 'create a delta over the password' |
|
567 | $ hg ci -m 'create a delta over the password' | |
568 | (should show that the last revision is a delta, not a snapshot) |
|
568 | (should show that the last revision is a delta, not a snapshot) | |
569 |
$ B2=`hg id - |
|
569 | $ B2=`hg id -r . -T "{node}"` | |
570 |
|
570 | |||
571 | Make sure the last revision is a delta against the revision we will censor |
|
571 | Make sure the last revision is a delta against the revision we will censor | |
572 |
|
572 | |||
573 | $ hg debugdeltachain target -T '{rev} {chainid} {chainlen} {prevrev}\n' |
|
573 | $ hg debugdeltachain target -T '{rev} {chainid} {chainlen} {prevrev}\n' | |
574 | 0 1 1 -1 |
|
574 | 0 1 1 -1 | |
575 | 1 2 1 -1 |
|
575 | 1 2 1 -1 | |
576 | 2 2 2 1 |
|
576 | 2 2 2 1 | |
577 |
|
577 | |||
578 | Censor the file |
|
578 | Censor the file | |
579 |
|
579 | |||
580 | $ hg cat -r $B1 target | wc -l |
|
580 | $ hg cat -r $B1 target | wc -l | |
581 | *50002 (re) |
|
581 | *50002 (re) | |
582 | $ hg --config extensions.censor= censor -r $B1 target |
|
582 | $ hg --config extensions.censor= censor -r $B1 target | |
583 | checking for the censored content in 1 heads |
|
583 | checking for the censored content in 1 heads | |
584 | checking for the censored content in the working directory |
|
584 | checking for the censored content in the working directory | |
585 | censoring 1 file revisions |
|
585 | censoring 1 file revisions | |
586 | $ hg cat -r $B1 target | wc -l |
|
586 | $ hg cat -r $B1 target | wc -l | |
587 | *0 (re) |
|
587 | *0 (re) | |
588 |
|
588 | |||
589 | Check the children is fine |
|
589 | Check the children is fine | |
590 |
|
590 | |||
591 | $ hg cat -r $B2 target | wc -l |
|
591 | $ hg cat -r $B2 target | wc -l | |
592 | *50003 (re) |
|
592 | *50003 (re) | |
593 |
|
593 | |||
594 | #endif |
|
594 | #endif | |
595 |
|
595 | |||
596 | Testing repository upgrade with censors revision |
|
596 | Testing repository upgrade with censors revision | |
597 | ================================================ |
|
597 | ================================================ | |
598 |
|
598 | |||
599 | $ cd ../rclone |
|
599 | $ cd ../rclone | |
600 |
|
600 | |||
601 | With the "abort" policy |
|
601 | With the "abort" policy | |
602 | ======================= |
|
602 | ======================= | |
603 |
|
603 | |||
604 | $ hg verify --config censor.policy=ignore |
|
604 | $ hg verify --config censor.policy=ignore | |
605 | checking changesets |
|
605 | checking changesets | |
606 | checking manifests |
|
606 | checking manifests | |
607 | crosschecking files in changesets and manifests |
|
607 | crosschecking files in changesets and manifests | |
608 | checking files |
|
608 | checking files | |
609 | checking dirstate |
|
609 | checking dirstate | |
610 | checked 14 changesets with 15 changes to 2 files |
|
610 | checked 14 changesets with 15 changes to 2 files | |
611 | $ hg debugupgraderepo --run --quiet \ |
|
611 | $ hg debugupgraderepo --run --quiet \ | |
612 | > --optimize re-delta-parent \ |
|
612 | > --optimize re-delta-parent \ | |
613 | > --config censor.policy=abort |
|
613 | > --config censor.policy=abort | |
614 | upgrade will perform the following actions: |
|
614 | upgrade will perform the following actions: | |
615 |
|
615 | |||
616 | requirements |
|
616 | requirements | |
617 | preserved: * (glob) |
|
617 | preserved: * (glob) | |
618 |
|
618 | |||
619 | optimisations: re-delta-parent |
|
619 | optimisations: re-delta-parent | |
620 |
|
620 | |||
621 | processed revlogs: |
|
621 | processed revlogs: | |
622 | - all-filelogs |
|
622 | - all-filelogs | |
623 | - changelog |
|
623 | - changelog | |
624 | - manifest |
|
624 | - manifest | |
625 |
|
625 | |||
626 | $ hg verify --config censor.policy=ignore |
|
626 | $ hg verify --config censor.policy=ignore | |
627 | checking changesets |
|
627 | checking changesets | |
628 | checking manifests |
|
628 | checking manifests | |
629 | crosschecking files in changesets and manifests |
|
629 | crosschecking files in changesets and manifests | |
630 | checking files |
|
630 | checking files | |
631 | checking dirstate |
|
631 | checking dirstate | |
632 | checked 14 changesets with 15 changes to 2 files |
|
632 | checked 14 changesets with 15 changes to 2 files | |
633 |
|
633 | |||
634 | With the "ignore" policy |
|
634 | With the "ignore" policy | |
635 | ======================== |
|
635 | ======================== | |
636 |
|
636 | |||
637 | $ hg verify --config censor.policy=ignore |
|
637 | $ hg verify --config censor.policy=ignore | |
638 | checking changesets |
|
638 | checking changesets | |
639 | checking manifests |
|
639 | checking manifests | |
640 | crosschecking files in changesets and manifests |
|
640 | crosschecking files in changesets and manifests | |
641 | checking files |
|
641 | checking files | |
642 | checking dirstate |
|
642 | checking dirstate | |
643 | checked 14 changesets with 15 changes to 2 files |
|
643 | checked 14 changesets with 15 changes to 2 files | |
644 | $ hg debugupgraderepo --run --quiet \ |
|
644 | $ hg debugupgraderepo --run --quiet \ | |
645 | > --optimize re-delta-parent \ |
|
645 | > --optimize re-delta-parent \ | |
646 | > --config censor.policy=ignore |
|
646 | > --config censor.policy=ignore | |
647 | upgrade will perform the following actions: |
|
647 | upgrade will perform the following actions: | |
648 |
|
648 | |||
649 | requirements |
|
649 | requirements | |
650 | preserved: * (glob) |
|
650 | preserved: * (glob) | |
651 |
|
651 | |||
652 | optimisations: re-delta-parent |
|
652 | optimisations: re-delta-parent | |
653 |
|
653 | |||
654 | processed revlogs: |
|
654 | processed revlogs: | |
655 | - all-filelogs |
|
655 | - all-filelogs | |
656 | - changelog |
|
656 | - changelog | |
657 | - manifest |
|
657 | - manifest | |
658 |
|
658 | |||
659 | $ hg verify --config censor.policy=ignore |
|
659 | $ hg verify --config censor.policy=ignore | |
660 | checking changesets |
|
660 | checking changesets | |
661 | checking manifests |
|
661 | checking manifests | |
662 | crosschecking files in changesets and manifests |
|
662 | crosschecking files in changesets and manifests | |
663 | checking files |
|
663 | checking files | |
664 | checking dirstate |
|
664 | checking dirstate | |
665 | checked 14 changesets with 15 changes to 2 files |
|
665 | checked 14 changesets with 15 changes to 2 files |
@@ -1,241 +1,241 | |||||
1 |
|
1 | |||
2 | $ echo "[extensions]" >> $HGRCPATH |
|
2 | $ echo "[extensions]" >> $HGRCPATH | |
3 | $ echo "convert=" >> $HGRCPATH |
|
3 | $ echo "convert=" >> $HGRCPATH | |
4 | $ glog() |
|
4 | $ glog() | |
5 | > { |
|
5 | > { | |
6 | > hg log -G --template '{rev}:{node|short} "{desc|firstline}"\ |
|
6 | > hg log -G --template '{rev}:{node|short} "{desc|firstline}"\ | |
7 | > files: {files}\n' "$@" |
|
7 | > files: {files}\n' "$@" | |
8 | > } |
|
8 | > } | |
9 | $ hg init repo1 |
|
9 | $ hg init repo1 | |
10 | $ cd repo1 |
|
10 | $ cd repo1 | |
11 | $ echo a > a |
|
11 | $ echo a > a | |
12 | $ hg ci -Am adda |
|
12 | $ hg ci -Am adda | |
13 | adding a |
|
13 | adding a | |
14 | $ echo b > b |
|
14 | $ echo b > b | |
15 | $ echo a >> a |
|
15 | $ echo a >> a | |
16 | $ hg ci -Am addb |
|
16 | $ hg ci -Am addb | |
17 | adding b |
|
17 | adding b | |
18 |
$ PARENTID1=`hg id - |
|
18 | $ PARENTID1=`hg id -r . -T "{node}"` | |
19 | $ echo c > c |
|
19 | $ echo c > c | |
20 | $ hg ci -Am addc |
|
20 | $ hg ci -Am addc | |
21 | adding c |
|
21 | adding c | |
22 |
$ PARENTID2=`hg id - |
|
22 | $ PARENTID2=`hg id -r . -T "{node}"` | |
23 | $ cd .. |
|
23 | $ cd .. | |
24 | $ glog -R repo1 |
|
24 | $ glog -R repo1 | |
25 | @ 2:e55c719b85b6 "addc" files: c |
|
25 | @ 2:e55c719b85b6 "addc" files: c | |
26 | | |
|
26 | | | |
27 | o 1:6d4c2037ddc2 "addb" files: a b |
|
27 | o 1:6d4c2037ddc2 "addb" files: a b | |
28 | | |
|
28 | | | |
29 | o 0:07f494440405 "adda" files: a |
|
29 | o 0:07f494440405 "adda" files: a | |
30 |
|
30 | |||
31 |
|
31 | |||
32 | $ hg init repo2 |
|
32 | $ hg init repo2 | |
33 | $ cd repo2 |
|
33 | $ cd repo2 | |
34 | $ echo b > a |
|
34 | $ echo b > a | |
35 | $ echo d > d |
|
35 | $ echo d > d | |
36 | $ hg ci -Am addaandd |
|
36 | $ hg ci -Am addaandd | |
37 | adding a |
|
37 | adding a | |
38 | adding d |
|
38 | adding d | |
39 | $ INVALIDID1=afd12345af |
|
39 | $ INVALIDID1=afd12345af | |
40 | $ INVALIDID2=28173x36ddd1e67bf7098d541130558ef5534a86 |
|
40 | $ INVALIDID2=28173x36ddd1e67bf7098d541130558ef5534a86 | |
41 |
$ CHILDID1=`hg id - |
|
41 | $ CHILDID1=`hg id -r . -T "{node}"` | |
42 | $ echo d >> d |
|
42 | $ echo d >> d | |
43 | $ hg ci -Am changed |
|
43 | $ hg ci -Am changed | |
44 |
$ CHILDID2=`hg id - |
|
44 | $ CHILDID2=`hg id -r . -T "{node}"` | |
45 | $ echo e > e |
|
45 | $ echo e > e | |
46 | $ hg ci -Am adde |
|
46 | $ hg ci -Am adde | |
47 | adding e |
|
47 | adding e | |
48 | $ cd .. |
|
48 | $ cd .. | |
49 | $ glog -R repo2 |
|
49 | $ glog -R repo2 | |
50 | @ 2:a39b65753b0a "adde" files: e |
|
50 | @ 2:a39b65753b0a "adde" files: e | |
51 | | |
|
51 | | | |
52 | o 1:e4ea00df9189 "changed" files: d |
|
52 | o 1:e4ea00df9189 "changed" files: d | |
53 | | |
|
53 | | | |
54 | o 0:527cdedf31fb "addaandd" files: a d |
|
54 | o 0:527cdedf31fb "addaandd" files: a d | |
55 |
|
55 | |||
56 |
|
56 | |||
57 | test invalid splicemap1 |
|
57 | test invalid splicemap1 | |
58 |
|
58 | |||
59 | $ cat > splicemap <<EOF |
|
59 | $ cat > splicemap <<EOF | |
60 | > $CHILDID2 |
|
60 | > $CHILDID2 | |
61 | > EOF |
|
61 | > EOF | |
62 | $ hg convert --splicemap splicemap repo2 repo1 |
|
62 | $ hg convert --splicemap splicemap repo2 repo1 | |
63 | abort: syntax error in splicemap(1): child parent1[,parent2] expected |
|
63 | abort: syntax error in splicemap(1): child parent1[,parent2] expected | |
64 | [255] |
|
64 | [255] | |
65 |
|
65 | |||
66 | test invalid splicemap2 |
|
66 | test invalid splicemap2 | |
67 |
|
67 | |||
68 | $ cat > splicemap <<EOF |
|
68 | $ cat > splicemap <<EOF | |
69 | > $CHILDID2 $PARENTID1, $PARENTID2, $PARENTID2 |
|
69 | > $CHILDID2 $PARENTID1, $PARENTID2, $PARENTID2 | |
70 | > EOF |
|
70 | > EOF | |
71 | $ hg convert --splicemap splicemap repo2 repo1 |
|
71 | $ hg convert --splicemap splicemap repo2 repo1 | |
72 | abort: syntax error in splicemap(1): child parent1[,parent2] expected |
|
72 | abort: syntax error in splicemap(1): child parent1[,parent2] expected | |
73 | [255] |
|
73 | [255] | |
74 |
|
74 | |||
75 | test invalid splicemap3 |
|
75 | test invalid splicemap3 | |
76 |
|
76 | |||
77 | $ cat > splicemap <<EOF |
|
77 | $ cat > splicemap <<EOF | |
78 | > $INVALIDID1 $INVALIDID2 |
|
78 | > $INVALIDID1 $INVALIDID2 | |
79 | > EOF |
|
79 | > EOF | |
80 | $ hg convert --splicemap splicemap repo2 repo1 |
|
80 | $ hg convert --splicemap splicemap repo2 repo1 | |
81 | abort: splicemap entry afd12345af is not a valid revision identifier |
|
81 | abort: splicemap entry afd12345af is not a valid revision identifier | |
82 | [255] |
|
82 | [255] | |
83 |
|
83 | |||
84 | splice repo2 on repo1 |
|
84 | splice repo2 on repo1 | |
85 |
|
85 | |||
86 | $ cat > splicemap <<EOF |
|
86 | $ cat > splicemap <<EOF | |
87 | > $CHILDID1 $PARENTID1 |
|
87 | > $CHILDID1 $PARENTID1 | |
88 | > $CHILDID2 $PARENTID2,$CHILDID1 |
|
88 | > $CHILDID2 $PARENTID2,$CHILDID1 | |
89 | > |
|
89 | > | |
90 | > EOF |
|
90 | > EOF | |
91 | $ cat splicemap |
|
91 | $ cat splicemap | |
92 | 527cdedf31fbd5ea708aa14eeecf53d4676f38db 6d4c2037ddc2cb2627ac3a244ecce35283268f8e |
|
92 | 527cdedf31fbd5ea708aa14eeecf53d4676f38db 6d4c2037ddc2cb2627ac3a244ecce35283268f8e | |
93 | e4ea00df91897da3079a10fab658c1eddba6617b e55c719b85b60e5102fac26110ba626e7cb6b7dc,527cdedf31fbd5ea708aa14eeecf53d4676f38db |
|
93 | e4ea00df91897da3079a10fab658c1eddba6617b e55c719b85b60e5102fac26110ba626e7cb6b7dc,527cdedf31fbd5ea708aa14eeecf53d4676f38db | |
94 |
|
94 | |||
95 | $ hg clone repo1 target1 |
|
95 | $ hg clone repo1 target1 | |
96 | updating to branch default |
|
96 | updating to branch default | |
97 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
97 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
98 | $ hg convert --splicemap splicemap repo2 target1 |
|
98 | $ hg convert --splicemap splicemap repo2 target1 | |
99 | scanning source... |
|
99 | scanning source... | |
100 | sorting... |
|
100 | sorting... | |
101 | converting... |
|
101 | converting... | |
102 | 2 addaandd |
|
102 | 2 addaandd | |
103 | spliced in 6d4c2037ddc2cb2627ac3a244ecce35283268f8e as parents of 527cdedf31fbd5ea708aa14eeecf53d4676f38db |
|
103 | spliced in 6d4c2037ddc2cb2627ac3a244ecce35283268f8e as parents of 527cdedf31fbd5ea708aa14eeecf53d4676f38db | |
104 | 1 changed |
|
104 | 1 changed | |
105 | spliced in e55c719b85b60e5102fac26110ba626e7cb6b7dc and 527cdedf31fbd5ea708aa14eeecf53d4676f38db as parents of e4ea00df91897da3079a10fab658c1eddba6617b |
|
105 | spliced in e55c719b85b60e5102fac26110ba626e7cb6b7dc and 527cdedf31fbd5ea708aa14eeecf53d4676f38db as parents of e4ea00df91897da3079a10fab658c1eddba6617b | |
106 | 0 adde |
|
106 | 0 adde | |
107 | $ glog -R target1 |
|
107 | $ glog -R target1 | |
108 | o 5:16bc847b02aa "adde" files: e |
|
108 | o 5:16bc847b02aa "adde" files: e | |
109 | | |
|
109 | | | |
110 | o 4:e30e4fee3418 "changed" files: d |
|
110 | o 4:e30e4fee3418 "changed" files: d | |
111 | |\ |
|
111 | |\ | |
112 | | o 3:e673348c3a3c "addaandd" files: a d |
|
112 | | o 3:e673348c3a3c "addaandd" files: a d | |
113 | | | |
|
113 | | | | |
114 | @ | 2:e55c719b85b6 "addc" files: c |
|
114 | @ | 2:e55c719b85b6 "addc" files: c | |
115 | |/ |
|
115 | |/ | |
116 | o 1:6d4c2037ddc2 "addb" files: a b |
|
116 | o 1:6d4c2037ddc2 "addb" files: a b | |
117 | | |
|
117 | | | |
118 | o 0:07f494440405 "adda" files: a |
|
118 | o 0:07f494440405 "adda" files: a | |
119 |
|
119 | |||
120 |
|
120 | |||
121 |
|
121 | |||
122 |
|
122 | |||
123 | Test splicemap and conversion order |
|
123 | Test splicemap and conversion order | |
124 |
|
124 | |||
125 | $ hg init ordered |
|
125 | $ hg init ordered | |
126 | $ cd ordered |
|
126 | $ cd ordered | |
127 | $ echo a > a |
|
127 | $ echo a > a | |
128 | $ hg ci -Am adda |
|
128 | $ hg ci -Am adda | |
129 | adding a |
|
129 | adding a | |
130 | $ hg branch branch |
|
130 | $ hg branch branch | |
131 | marked working directory as branch branch |
|
131 | marked working directory as branch branch | |
132 | (branches are permanent and global, did you want a bookmark?) |
|
132 | (branches are permanent and global, did you want a bookmark?) | |
133 | $ echo a >> a |
|
133 | $ echo a >> a | |
134 | $ hg ci -Am changea |
|
134 | $ hg ci -Am changea | |
135 | $ echo a >> a |
|
135 | $ echo a >> a | |
136 | $ hg ci -Am changeaagain |
|
136 | $ hg ci -Am changeaagain | |
137 | $ hg up 0 |
|
137 | $ hg up 0 | |
138 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
138 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
139 | $ echo b > b |
|
139 | $ echo b > b | |
140 | $ hg ci -Am addb |
|
140 | $ hg ci -Am addb | |
141 | adding b |
|
141 | adding b | |
142 |
|
142 | |||
143 | We want 2 to depend on 1 and 3. Since 3 is always converted after 2, |
|
143 | We want 2 to depend on 1 and 3. Since 3 is always converted after 2, | |
144 | the bug should be exhibited with all conversion orders. |
|
144 | the bug should be exhibited with all conversion orders. | |
145 |
|
145 | |||
146 | $ cat > ../splicemap <<EOF |
|
146 | $ cat > ../splicemap <<EOF | |
147 | > `(hg id -r 2 -i --debug)` `(hg id -r 1 -i --debug)`, `(hg id -r 3 -i --debug)` |
|
147 | > `(hg id -r 2 -i --debug)` `(hg id -r 1 -i --debug)`, `(hg id -r 3 -i --debug)` | |
148 | > EOF |
|
148 | > EOF | |
149 | $ cd .. |
|
149 | $ cd .. | |
150 | $ cat splicemap |
|
150 | $ cat splicemap | |
151 | 7c364e7fa7d70ae525610c016317ed717b519d97 717d54d67e6c31fd75ffef2ff3042bdd98418437, 102a90ea7b4a3361e4082ed620918c261189a36a |
|
151 | 7c364e7fa7d70ae525610c016317ed717b519d97 717d54d67e6c31fd75ffef2ff3042bdd98418437, 102a90ea7b4a3361e4082ed620918c261189a36a | |
152 |
|
152 | |||
153 | Test regular conversion |
|
153 | Test regular conversion | |
154 |
|
154 | |||
155 | $ hg convert --splicemap splicemap ordered ordered-hg1 |
|
155 | $ hg convert --splicemap splicemap ordered ordered-hg1 | |
156 | initializing destination ordered-hg1 repository |
|
156 | initializing destination ordered-hg1 repository | |
157 | scanning source... |
|
157 | scanning source... | |
158 | sorting... |
|
158 | sorting... | |
159 | converting... |
|
159 | converting... | |
160 | 3 adda |
|
160 | 3 adda | |
161 | 2 changea |
|
161 | 2 changea | |
162 | 1 addb |
|
162 | 1 addb | |
163 | 0 changeaagain |
|
163 | 0 changeaagain | |
164 | spliced in 717d54d67e6c31fd75ffef2ff3042bdd98418437 and 102a90ea7b4a3361e4082ed620918c261189a36a as parents of 7c364e7fa7d70ae525610c016317ed717b519d97 |
|
164 | spliced in 717d54d67e6c31fd75ffef2ff3042bdd98418437 and 102a90ea7b4a3361e4082ed620918c261189a36a as parents of 7c364e7fa7d70ae525610c016317ed717b519d97 | |
165 | $ glog -R ordered-hg1 |
|
165 | $ glog -R ordered-hg1 | |
166 | o 3:4cb04b9afbf2 "changeaagain" files: a |
|
166 | o 3:4cb04b9afbf2 "changeaagain" files: a | |
167 | |\ |
|
167 | |\ | |
168 | | o 2:102a90ea7b4a "addb" files: b |
|
168 | | o 2:102a90ea7b4a "addb" files: b | |
169 | | | |
|
169 | | | | |
170 | o | 1:717d54d67e6c "changea" files: a |
|
170 | o | 1:717d54d67e6c "changea" files: a | |
171 | |/ |
|
171 | |/ | |
172 | o 0:07f494440405 "adda" files: a |
|
172 | o 0:07f494440405 "adda" files: a | |
173 |
|
173 | |||
174 |
|
174 | |||
175 | Test conversion with parent revisions already in dest, using source |
|
175 | Test conversion with parent revisions already in dest, using source | |
176 | and destination identifiers. Test unknown splicemap target. |
|
176 | and destination identifiers. Test unknown splicemap target. | |
177 |
|
177 | |||
178 | $ hg convert -r1 ordered ordered-hg2 |
|
178 | $ hg convert -r1 ordered ordered-hg2 | |
179 | initializing destination ordered-hg2 repository |
|
179 | initializing destination ordered-hg2 repository | |
180 | scanning source... |
|
180 | scanning source... | |
181 | sorting... |
|
181 | sorting... | |
182 | converting... |
|
182 | converting... | |
183 | 1 adda |
|
183 | 1 adda | |
184 | 0 changea |
|
184 | 0 changea | |
185 | $ hg convert -r3 ordered ordered-hg2 |
|
185 | $ hg convert -r3 ordered ordered-hg2 | |
186 | scanning source... |
|
186 | scanning source... | |
187 | sorting... |
|
187 | sorting... | |
188 | converting... |
|
188 | converting... | |
189 | 0 addb |
|
189 | 0 addb | |
190 | $ cat > splicemap <<EOF |
|
190 | $ cat > splicemap <<EOF | |
191 | > `(hg -R ordered id -r 2 -i --debug)` \ |
|
191 | > `(hg -R ordered id -r 2 -i --debug)` \ | |
192 | > `(hg -R ordered-hg2 id -r 1 -i --debug)`,\ |
|
192 | > `(hg -R ordered-hg2 id -r 1 -i --debug)`,\ | |
193 | > `(hg -R ordered-hg2 id -r 2 -i --debug)` |
|
193 | > `(hg -R ordered-hg2 id -r 2 -i --debug)` | |
194 | > deadbeef102a90ea7b4a3361e4082ed620918c26 deadbeef102a90ea7b4a3361e4082ed620918c27 |
|
194 | > deadbeef102a90ea7b4a3361e4082ed620918c26 deadbeef102a90ea7b4a3361e4082ed620918c27 | |
195 | > EOF |
|
195 | > EOF | |
196 | $ hg convert --splicemap splicemap ordered ordered-hg2 |
|
196 | $ hg convert --splicemap splicemap ordered ordered-hg2 | |
197 | scanning source... |
|
197 | scanning source... | |
198 | splice map revision deadbeef102a90ea7b4a3361e4082ed620918c26 is not being converted, ignoring |
|
198 | splice map revision deadbeef102a90ea7b4a3361e4082ed620918c26 is not being converted, ignoring | |
199 | sorting... |
|
199 | sorting... | |
200 | converting... |
|
200 | converting... | |
201 | 0 changeaagain |
|
201 | 0 changeaagain | |
202 | spliced in 717d54d67e6c31fd75ffef2ff3042bdd98418437 and 102a90ea7b4a3361e4082ed620918c261189a36a as parents of 7c364e7fa7d70ae525610c016317ed717b519d97 |
|
202 | spliced in 717d54d67e6c31fd75ffef2ff3042bdd98418437 and 102a90ea7b4a3361e4082ed620918c261189a36a as parents of 7c364e7fa7d70ae525610c016317ed717b519d97 | |
203 | $ glog -R ordered-hg2 |
|
203 | $ glog -R ordered-hg2 | |
204 | o 3:4cb04b9afbf2 "changeaagain" files: a |
|
204 | o 3:4cb04b9afbf2 "changeaagain" files: a | |
205 | |\ |
|
205 | |\ | |
206 | | o 2:102a90ea7b4a "addb" files: b |
|
206 | | o 2:102a90ea7b4a "addb" files: b | |
207 | | | |
|
207 | | | | |
208 | o | 1:717d54d67e6c "changea" files: a |
|
208 | o | 1:717d54d67e6c "changea" files: a | |
209 | |/ |
|
209 | |/ | |
210 | o 0:07f494440405 "adda" files: a |
|
210 | o 0:07f494440405 "adda" files: a | |
211 |
|
211 | |||
212 |
|
212 | |||
213 | Test empty conversion |
|
213 | Test empty conversion | |
214 |
|
214 | |||
215 | $ hg convert --splicemap splicemap ordered ordered-hg2 |
|
215 | $ hg convert --splicemap splicemap ordered ordered-hg2 | |
216 | scanning source... |
|
216 | scanning source... | |
217 | splice map revision deadbeef102a90ea7b4a3361e4082ed620918c26 is not being converted, ignoring |
|
217 | splice map revision deadbeef102a90ea7b4a3361e4082ed620918c26 is not being converted, ignoring | |
218 | sorting... |
|
218 | sorting... | |
219 | converting... |
|
219 | converting... | |
220 |
|
220 | |||
221 | Test clonebranches |
|
221 | Test clonebranches | |
222 |
|
222 | |||
223 | $ hg --config convert.hg.clonebranches=true convert \ |
|
223 | $ hg --config convert.hg.clonebranches=true convert \ | |
224 | > --splicemap splicemap ordered ordered-hg3 |
|
224 | > --splicemap splicemap ordered ordered-hg3 | |
225 | initializing destination ordered-hg3 repository |
|
225 | initializing destination ordered-hg3 repository | |
226 | scanning source... |
|
226 | scanning source... | |
227 | abort: revision 717d54d67e6c31fd75ffef2ff3042bdd98418437 not found in destination repository (lookups with clonebranches=true are not implemented) |
|
227 | abort: revision 717d54d67e6c31fd75ffef2ff3042bdd98418437 not found in destination repository (lookups with clonebranches=true are not implemented) | |
228 | [255] |
|
228 | [255] | |
229 |
|
229 | |||
230 | Test invalid dependency |
|
230 | Test invalid dependency | |
231 |
|
231 | |||
232 | $ cat > splicemap <<EOF |
|
232 | $ cat > splicemap <<EOF | |
233 | > `(hg -R ordered id -r 2 -i --debug)` \ |
|
233 | > `(hg -R ordered id -r 2 -i --debug)` \ | |
234 | > deadbeef102a90ea7b4a3361e4082ed620918c26,\ |
|
234 | > deadbeef102a90ea7b4a3361e4082ed620918c26,\ | |
235 | > `(hg -R ordered-hg2 id -r 2 -i --debug)` |
|
235 | > `(hg -R ordered-hg2 id -r 2 -i --debug)` | |
236 | > EOF |
|
236 | > EOF | |
237 | $ hg convert --splicemap splicemap ordered ordered-hg4 |
|
237 | $ hg convert --splicemap splicemap ordered ordered-hg4 | |
238 | initializing destination ordered-hg4 repository |
|
238 | initializing destination ordered-hg4 repository | |
239 | scanning source... |
|
239 | scanning source... | |
240 | abort: unknown splice map parent: deadbeef102a90ea7b4a3361e4082ed620918c26 |
|
240 | abort: unknown splice map parent: deadbeef102a90ea7b4a3361e4082ed620918c26 | |
241 | [255] |
|
241 | [255] |
@@ -1,1163 +1,1163 | |||||
1 | $ cat > $TESTTMP/hook.sh << 'EOF' |
|
1 | $ cat > $TESTTMP/hook.sh << 'EOF' | |
2 | > echo "test-hook-close-phase: $HG_NODE: $HG_OLDPHASE -> $HG_PHASE" |
|
2 | > echo "test-hook-close-phase: $HG_NODE: $HG_OLDPHASE -> $HG_PHASE" | |
3 | > EOF |
|
3 | > EOF | |
4 |
|
4 | |||
5 | $ cat >> $HGRCPATH << EOF |
|
5 | $ cat >> $HGRCPATH << EOF | |
6 | > [extensions] |
|
6 | > [extensions] | |
7 | > phasereport=$TESTDIR/testlib/ext-phase-report.py |
|
7 | > phasereport=$TESTDIR/testlib/ext-phase-report.py | |
8 | > [hooks] |
|
8 | > [hooks] | |
9 | > txnclose-phase.test = sh $TESTTMP/hook.sh |
|
9 | > txnclose-phase.test = sh $TESTTMP/hook.sh | |
10 | > EOF |
|
10 | > EOF | |
11 |
|
11 | |||
12 | $ hglog() { hg log -G --template "{rev} {phaseidx} {desc}\n" $*; } |
|
12 | $ hglog() { hg log -G --template "{rev} {phaseidx} {desc}\n" $*; } | |
13 | $ mkcommit() { |
|
13 | $ mkcommit() { | |
14 | > echo "$1" > "$1" |
|
14 | > echo "$1" > "$1" | |
15 | > hg add "$1" |
|
15 | > hg add "$1" | |
16 | > message="$1" |
|
16 | > message="$1" | |
17 | > shift |
|
17 | > shift | |
18 | > hg ci -m "$message" $* |
|
18 | > hg ci -m "$message" $* | |
19 | > } |
|
19 | > } | |
20 |
|
20 | |||
21 | $ hg init initialrepo |
|
21 | $ hg init initialrepo | |
22 | $ cd initialrepo |
|
22 | $ cd initialrepo | |
23 |
|
23 | |||
24 | Cannot change null revision phase |
|
24 | Cannot change null revision phase | |
25 |
|
25 | |||
26 | $ hg phase --force --secret null |
|
26 | $ hg phase --force --secret null | |
27 | abort: cannot change null revision phase |
|
27 | abort: cannot change null revision phase | |
28 | [255] |
|
28 | [255] | |
29 | $ hg phase null |
|
29 | $ hg phase null | |
30 | -1: public |
|
30 | -1: public | |
31 |
|
31 | |||
32 | $ mkcommit A |
|
32 | $ mkcommit A | |
33 | test-debug-phase: new rev 0: x -> 1 |
|
33 | test-debug-phase: new rev 0: x -> 1 | |
34 | test-hook-close-phase: 4a2df7238c3b48766b5e22fafbb8a2f506ec8256: -> draft |
|
34 | test-hook-close-phase: 4a2df7238c3b48766b5e22fafbb8a2f506ec8256: -> draft | |
35 |
|
35 | |||
36 | New commit are draft by default |
|
36 | New commit are draft by default | |
37 |
|
37 | |||
38 | $ hglog |
|
38 | $ hglog | |
39 | @ 0 1 A |
|
39 | @ 0 1 A | |
40 |
|
40 | |||
41 |
|
41 | |||
42 | Following commit are draft too |
|
42 | Following commit are draft too | |
43 |
|
43 | |||
44 | $ mkcommit B |
|
44 | $ mkcommit B | |
45 | test-debug-phase: new rev 1: x -> 1 |
|
45 | test-debug-phase: new rev 1: x -> 1 | |
46 | test-hook-close-phase: 27547f69f25460a52fff66ad004e58da7ad3fb56: -> draft |
|
46 | test-hook-close-phase: 27547f69f25460a52fff66ad004e58da7ad3fb56: -> draft | |
47 |
|
47 | |||
48 | $ hglog |
|
48 | $ hglog | |
49 | @ 1 1 B |
|
49 | @ 1 1 B | |
50 | | |
|
50 | | | |
51 | o 0 1 A |
|
51 | o 0 1 A | |
52 |
|
52 | |||
53 |
|
53 | |||
54 | Working directory phase is secret when its parent is secret. |
|
54 | Working directory phase is secret when its parent is secret. | |
55 |
|
55 | |||
56 | $ hg phase --force --secret . |
|
56 | $ hg phase --force --secret . | |
57 | test-debug-phase: move rev 1: 1 -> 2 |
|
57 | test-debug-phase: move rev 1: 1 -> 2 | |
58 | test-hook-close-phase: 27547f69f25460a52fff66ad004e58da7ad3fb56: draft -> secret |
|
58 | test-hook-close-phase: 27547f69f25460a52fff66ad004e58da7ad3fb56: draft -> secret | |
59 | $ hg log -r 'wdir()' -T '{phase}\n' |
|
59 | $ hg log -r 'wdir()' -T '{phase}\n' | |
60 | secret |
|
60 | secret | |
61 | $ hg log -r 'wdir() and public()' -T '{phase}\n' |
|
61 | $ hg log -r 'wdir() and public()' -T '{phase}\n' | |
62 | $ hg log -r 'wdir() and draft()' -T '{phase}\n' |
|
62 | $ hg log -r 'wdir() and draft()' -T '{phase}\n' | |
63 | $ hg log -r 'wdir() and secret()' -T '{phase}\n' |
|
63 | $ hg log -r 'wdir() and secret()' -T '{phase}\n' | |
64 | secret |
|
64 | secret | |
65 |
|
65 | |||
66 | Working directory phase is draft when its parent is draft. |
|
66 | Working directory phase is draft when its parent is draft. | |
67 |
|
67 | |||
68 | $ hg phase --draft . |
|
68 | $ hg phase --draft . | |
69 | test-debug-phase: move rev 1: 2 -> 1 |
|
69 | test-debug-phase: move rev 1: 2 -> 1 | |
70 | test-hook-close-phase: 27547f69f25460a52fff66ad004e58da7ad3fb56: secret -> draft |
|
70 | test-hook-close-phase: 27547f69f25460a52fff66ad004e58da7ad3fb56: secret -> draft | |
71 | $ hg log -r 'wdir()' -T '{phase}\n' |
|
71 | $ hg log -r 'wdir()' -T '{phase}\n' | |
72 | draft |
|
72 | draft | |
73 | $ hg log -r 'wdir() and public()' -T '{phase}\n' |
|
73 | $ hg log -r 'wdir() and public()' -T '{phase}\n' | |
74 | $ hg log -r 'wdir() and draft()' -T '{phase}\n' |
|
74 | $ hg log -r 'wdir() and draft()' -T '{phase}\n' | |
75 | draft |
|
75 | draft | |
76 | $ hg log -r 'wdir() and secret()' -T '{phase}\n' |
|
76 | $ hg log -r 'wdir() and secret()' -T '{phase}\n' | |
77 |
|
77 | |||
78 | Working directory phase is secret when a new commit will be created as secret, |
|
78 | Working directory phase is secret when a new commit will be created as secret, | |
79 | even if the parent is draft. |
|
79 | even if the parent is draft. | |
80 |
|
80 | |||
81 | $ hg log -r 'wdir() and secret()' -T '{phase}\n' \ |
|
81 | $ hg log -r 'wdir() and secret()' -T '{phase}\n' \ | |
82 | > --config phases.new-commit='secret' |
|
82 | > --config phases.new-commit='secret' | |
83 | secret |
|
83 | secret | |
84 |
|
84 | |||
85 | Working directory phase is draft when its parent is public. |
|
85 | Working directory phase is draft when its parent is public. | |
86 |
|
86 | |||
87 | $ hg phase --public . |
|
87 | $ hg phase --public . | |
88 | test-debug-phase: move rev 0: 1 -> 0 |
|
88 | test-debug-phase: move rev 0: 1 -> 0 | |
89 | test-debug-phase: move rev 1: 1 -> 0 |
|
89 | test-debug-phase: move rev 1: 1 -> 0 | |
90 | test-hook-close-phase: 4a2df7238c3b48766b5e22fafbb8a2f506ec8256: draft -> public |
|
90 | test-hook-close-phase: 4a2df7238c3b48766b5e22fafbb8a2f506ec8256: draft -> public | |
91 | test-hook-close-phase: 27547f69f25460a52fff66ad004e58da7ad3fb56: draft -> public |
|
91 | test-hook-close-phase: 27547f69f25460a52fff66ad004e58da7ad3fb56: draft -> public | |
92 | $ hg log -r 'wdir()' -T '{phase}\n' |
|
92 | $ hg log -r 'wdir()' -T '{phase}\n' | |
93 | draft |
|
93 | draft | |
94 | $ hg log -r 'wdir() and public()' -T '{phase}\n' |
|
94 | $ hg log -r 'wdir() and public()' -T '{phase}\n' | |
95 | $ hg log -r 'wdir() and draft()' -T '{phase}\n' |
|
95 | $ hg log -r 'wdir() and draft()' -T '{phase}\n' | |
96 | draft |
|
96 | draft | |
97 | $ hg log -r 'wdir() and secret()' -T '{phase}\n' |
|
97 | $ hg log -r 'wdir() and secret()' -T '{phase}\n' | |
98 | $ hg log -r 'wdir() and secret()' -T '{phase}\n' \ |
|
98 | $ hg log -r 'wdir() and secret()' -T '{phase}\n' \ | |
99 | > --config phases.new-commit='secret' |
|
99 | > --config phases.new-commit='secret' | |
100 | secret |
|
100 | secret | |
101 |
|
101 | |||
102 | Draft commit are properly created over public one: |
|
102 | Draft commit are properly created over public one: | |
103 |
|
103 | |||
104 | $ hg phase |
|
104 | $ hg phase | |
105 | 1: public |
|
105 | 1: public | |
106 | $ hglog |
|
106 | $ hglog | |
107 | @ 1 0 B |
|
107 | @ 1 0 B | |
108 | | |
|
108 | | | |
109 | o 0 0 A |
|
109 | o 0 0 A | |
110 |
|
110 | |||
111 |
|
111 | |||
112 | $ mkcommit C |
|
112 | $ mkcommit C | |
113 | test-debug-phase: new rev 2: x -> 1 |
|
113 | test-debug-phase: new rev 2: x -> 1 | |
114 | test-hook-close-phase: f838bfaca5c7226600ebcfd84f3c3c13a28d3757: -> draft |
|
114 | test-hook-close-phase: f838bfaca5c7226600ebcfd84f3c3c13a28d3757: -> draft | |
115 | $ mkcommit D |
|
115 | $ mkcommit D | |
116 | test-debug-phase: new rev 3: x -> 1 |
|
116 | test-debug-phase: new rev 3: x -> 1 | |
117 | test-hook-close-phase: b3325c91a4d916bcc4cdc83ea3fe4ece46a42f6e: -> draft |
|
117 | test-hook-close-phase: b3325c91a4d916bcc4cdc83ea3fe4ece46a42f6e: -> draft | |
118 |
|
118 | |||
119 | $ hglog |
|
119 | $ hglog | |
120 | @ 3 1 D |
|
120 | @ 3 1 D | |
121 | | |
|
121 | | | |
122 | o 2 1 C |
|
122 | o 2 1 C | |
123 | | |
|
123 | | | |
124 | o 1 0 B |
|
124 | o 1 0 B | |
125 | | |
|
125 | | | |
126 | o 0 0 A |
|
126 | o 0 0 A | |
127 |
|
127 | |||
128 |
|
128 | |||
129 | Test creating changeset as secret |
|
129 | Test creating changeset as secret | |
130 |
|
130 | |||
131 | $ mkcommit E --config phases.new-commit='secret' |
|
131 | $ mkcommit E --config phases.new-commit='secret' | |
132 | test-debug-phase: new rev 4: x -> 2 |
|
132 | test-debug-phase: new rev 4: x -> 2 | |
133 | test-hook-close-phase: a603bfb5a83e312131cebcd05353c217d4d21dde: -> secret |
|
133 | test-hook-close-phase: a603bfb5a83e312131cebcd05353c217d4d21dde: -> secret | |
134 | $ hglog |
|
134 | $ hglog | |
135 | @ 4 2 E |
|
135 | @ 4 2 E | |
136 | | |
|
136 | | | |
137 | o 3 1 D |
|
137 | o 3 1 D | |
138 | | |
|
138 | | | |
139 | o 2 1 C |
|
139 | o 2 1 C | |
140 | | |
|
140 | | | |
141 | o 1 0 B |
|
141 | o 1 0 B | |
142 | | |
|
142 | | | |
143 | o 0 0 A |
|
143 | o 0 0 A | |
144 |
|
144 | |||
145 |
|
145 | |||
146 | Test the secret property is inherited |
|
146 | Test the secret property is inherited | |
147 |
|
147 | |||
148 | $ mkcommit H |
|
148 | $ mkcommit H | |
149 | test-debug-phase: new rev 5: x -> 2 |
|
149 | test-debug-phase: new rev 5: x -> 2 | |
150 | test-hook-close-phase: a030c6be5127abc010fcbff1851536552e6951a8: -> secret |
|
150 | test-hook-close-phase: a030c6be5127abc010fcbff1851536552e6951a8: -> secret | |
151 | $ hglog |
|
151 | $ hglog | |
152 | @ 5 2 H |
|
152 | @ 5 2 H | |
153 | | |
|
153 | | | |
154 | o 4 2 E |
|
154 | o 4 2 E | |
155 | | |
|
155 | | | |
156 | o 3 1 D |
|
156 | o 3 1 D | |
157 | | |
|
157 | | | |
158 | o 2 1 C |
|
158 | o 2 1 C | |
159 | | |
|
159 | | | |
160 | o 1 0 B |
|
160 | o 1 0 B | |
161 | | |
|
161 | | | |
162 | o 0 0 A |
|
162 | o 0 0 A | |
163 |
|
163 | |||
164 |
|
164 | |||
165 | Even on merge |
|
165 | Even on merge | |
166 |
|
166 | |||
167 | $ hg up -q 1 |
|
167 | $ hg up -q 1 | |
168 | $ mkcommit "B'" |
|
168 | $ mkcommit "B'" | |
169 | test-debug-phase: new rev 6: x -> 1 |
|
169 | test-debug-phase: new rev 6: x -> 1 | |
170 | created new head |
|
170 | created new head | |
171 | test-hook-close-phase: cf9fe039dfd67e829edf6522a45de057b5c86519: -> draft |
|
171 | test-hook-close-phase: cf9fe039dfd67e829edf6522a45de057b5c86519: -> draft | |
172 | $ hglog |
|
172 | $ hglog | |
173 | @ 6 1 B' |
|
173 | @ 6 1 B' | |
174 | | |
|
174 | | | |
175 | | o 5 2 H |
|
175 | | o 5 2 H | |
176 | | | |
|
176 | | | | |
177 | | o 4 2 E |
|
177 | | o 4 2 E | |
178 | | | |
|
178 | | | | |
179 | | o 3 1 D |
|
179 | | o 3 1 D | |
180 | | | |
|
180 | | | | |
181 | | o 2 1 C |
|
181 | | o 2 1 C | |
182 | |/ |
|
182 | |/ | |
183 | o 1 0 B |
|
183 | o 1 0 B | |
184 | | |
|
184 | | | |
185 | o 0 0 A |
|
185 | o 0 0 A | |
186 |
|
186 | |||
187 | $ hg merge 4 # E |
|
187 | $ hg merge 4 # E | |
188 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
188 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
189 | (branch merge, don't forget to commit) |
|
189 | (branch merge, don't forget to commit) | |
190 | $ hg phase |
|
190 | $ hg phase | |
191 | 6: draft |
|
191 | 6: draft | |
192 | 4: secret |
|
192 | 4: secret | |
193 | $ hg ci -m "merge B' and E" |
|
193 | $ hg ci -m "merge B' and E" | |
194 | test-debug-phase: new rev 7: x -> 2 |
|
194 | test-debug-phase: new rev 7: x -> 2 | |
195 | test-hook-close-phase: 17a481b3bccb796c0521ae97903d81c52bfee4af: -> secret |
|
195 | test-hook-close-phase: 17a481b3bccb796c0521ae97903d81c52bfee4af: -> secret | |
196 |
|
196 | |||
197 | $ hglog |
|
197 | $ hglog | |
198 | @ 7 2 merge B' and E |
|
198 | @ 7 2 merge B' and E | |
199 | |\ |
|
199 | |\ | |
200 | | o 6 1 B' |
|
200 | | o 6 1 B' | |
201 | | | |
|
201 | | | | |
202 | +---o 5 2 H |
|
202 | +---o 5 2 H | |
203 | | | |
|
203 | | | | |
204 | o | 4 2 E |
|
204 | o | 4 2 E | |
205 | | | |
|
205 | | | | |
206 | o | 3 1 D |
|
206 | o | 3 1 D | |
207 | | | |
|
207 | | | | |
208 | o | 2 1 C |
|
208 | o | 2 1 C | |
209 | |/ |
|
209 | |/ | |
210 | o 1 0 B |
|
210 | o 1 0 B | |
211 | | |
|
211 | | | |
212 | o 0 0 A |
|
212 | o 0 0 A | |
213 |
|
213 | |||
214 |
|
214 | |||
215 | Test secret changeset are not pushed |
|
215 | Test secret changeset are not pushed | |
216 |
|
216 | |||
217 | $ hg init ../push-dest |
|
217 | $ hg init ../push-dest | |
218 | $ cat > ../push-dest/.hg/hgrc << EOF |
|
218 | $ cat > ../push-dest/.hg/hgrc << EOF | |
219 | > [phases] |
|
219 | > [phases] | |
220 | > publish=False |
|
220 | > publish=False | |
221 | > EOF |
|
221 | > EOF | |
222 | $ hg outgoing ../push-dest --template='{rev} {phase} {desc|firstline}\n' |
|
222 | $ hg outgoing ../push-dest --template='{rev} {phase} {desc|firstline}\n' | |
223 | comparing with ../push-dest |
|
223 | comparing with ../push-dest | |
224 | searching for changes |
|
224 | searching for changes | |
225 | 0 public A |
|
225 | 0 public A | |
226 | 1 public B |
|
226 | 1 public B | |
227 | 2 draft C |
|
227 | 2 draft C | |
228 | 3 draft D |
|
228 | 3 draft D | |
229 | 6 draft B' |
|
229 | 6 draft B' | |
230 | $ hg outgoing -r 'branch(default)' ../push-dest --template='{rev} {phase} {desc|firstline}\n' |
|
230 | $ hg outgoing -r 'branch(default)' ../push-dest --template='{rev} {phase} {desc|firstline}\n' | |
231 | comparing with ../push-dest |
|
231 | comparing with ../push-dest | |
232 | searching for changes |
|
232 | searching for changes | |
233 | 0 public A |
|
233 | 0 public A | |
234 | 1 public B |
|
234 | 1 public B | |
235 | 2 draft C |
|
235 | 2 draft C | |
236 | 3 draft D |
|
236 | 3 draft D | |
237 | 6 draft B' |
|
237 | 6 draft B' | |
238 |
|
238 | |||
239 | $ hg push ../push-dest -f # force because we push multiple heads |
|
239 | $ hg push ../push-dest -f # force because we push multiple heads | |
240 | pushing to ../push-dest |
|
240 | pushing to ../push-dest | |
241 | searching for changes |
|
241 | searching for changes | |
242 | adding changesets |
|
242 | adding changesets | |
243 | adding manifests |
|
243 | adding manifests | |
244 | adding file changes |
|
244 | adding file changes | |
245 | added 5 changesets with 5 changes to 5 files (+1 heads) |
|
245 | added 5 changesets with 5 changes to 5 files (+1 heads) | |
246 | test-debug-phase: new rev 0: x -> 0 |
|
246 | test-debug-phase: new rev 0: x -> 0 | |
247 | test-debug-phase: new rev 1: x -> 0 |
|
247 | test-debug-phase: new rev 1: x -> 0 | |
248 | test-debug-phase: new rev 2: x -> 1 |
|
248 | test-debug-phase: new rev 2: x -> 1 | |
249 | test-debug-phase: new rev 3: x -> 1 |
|
249 | test-debug-phase: new rev 3: x -> 1 | |
250 | test-debug-phase: new rev 4: x -> 1 |
|
250 | test-debug-phase: new rev 4: x -> 1 | |
251 | test-hook-close-phase: 4a2df7238c3b48766b5e22fafbb8a2f506ec8256: -> public |
|
251 | test-hook-close-phase: 4a2df7238c3b48766b5e22fafbb8a2f506ec8256: -> public | |
252 | test-hook-close-phase: 27547f69f25460a52fff66ad004e58da7ad3fb56: -> public |
|
252 | test-hook-close-phase: 27547f69f25460a52fff66ad004e58da7ad3fb56: -> public | |
253 | test-hook-close-phase: f838bfaca5c7226600ebcfd84f3c3c13a28d3757: -> draft |
|
253 | test-hook-close-phase: f838bfaca5c7226600ebcfd84f3c3c13a28d3757: -> draft | |
254 | test-hook-close-phase: b3325c91a4d916bcc4cdc83ea3fe4ece46a42f6e: -> draft |
|
254 | test-hook-close-phase: b3325c91a4d916bcc4cdc83ea3fe4ece46a42f6e: -> draft | |
255 | test-hook-close-phase: cf9fe039dfd67e829edf6522a45de057b5c86519: -> draft |
|
255 | test-hook-close-phase: cf9fe039dfd67e829edf6522a45de057b5c86519: -> draft | |
256 | $ hglog |
|
256 | $ hglog | |
257 | @ 7 2 merge B' and E |
|
257 | @ 7 2 merge B' and E | |
258 | |\ |
|
258 | |\ | |
259 | | o 6 1 B' |
|
259 | | o 6 1 B' | |
260 | | | |
|
260 | | | | |
261 | +---o 5 2 H |
|
261 | +---o 5 2 H | |
262 | | | |
|
262 | | | | |
263 | o | 4 2 E |
|
263 | o | 4 2 E | |
264 | | | |
|
264 | | | | |
265 | o | 3 1 D |
|
265 | o | 3 1 D | |
266 | | | |
|
266 | | | | |
267 | o | 2 1 C |
|
267 | o | 2 1 C | |
268 | |/ |
|
268 | |/ | |
269 | o 1 0 B |
|
269 | o 1 0 B | |
270 | | |
|
270 | | | |
271 | o 0 0 A |
|
271 | o 0 0 A | |
272 |
|
272 | |||
273 | $ cd ../push-dest |
|
273 | $ cd ../push-dest | |
274 | $ hglog |
|
274 | $ hglog | |
275 | o 4 1 B' |
|
275 | o 4 1 B' | |
276 | | |
|
276 | | | |
277 | | o 3 1 D |
|
277 | | o 3 1 D | |
278 | | | |
|
278 | | | | |
279 | | o 2 1 C |
|
279 | | o 2 1 C | |
280 | |/ |
|
280 | |/ | |
281 | o 1 0 B |
|
281 | o 1 0 B | |
282 | | |
|
282 | | | |
283 | o 0 0 A |
|
283 | o 0 0 A | |
284 |
|
284 | |||
285 |
|
285 | |||
286 | (Issue3303) |
|
286 | (Issue3303) | |
287 | Check that remote secret changeset are ignore when checking creation of remote heads |
|
287 | Check that remote secret changeset are ignore when checking creation of remote heads | |
288 |
|
288 | |||
289 | We add a secret head into the push destination. This secret head shadows a |
|
289 | We add a secret head into the push destination. This secret head shadows a | |
290 | visible shared between the initial repo and the push destination. |
|
290 | visible shared between the initial repo and the push destination. | |
291 |
|
291 | |||
292 | $ hg up -q 4 # B' |
|
292 | $ hg up -q 4 # B' | |
293 | $ mkcommit Z --config phases.new-commit=secret |
|
293 | $ mkcommit Z --config phases.new-commit=secret | |
294 | test-debug-phase: new rev 5: x -> 2 |
|
294 | test-debug-phase: new rev 5: x -> 2 | |
295 | test-hook-close-phase: 2713879da13d6eea1ff22b442a5a87cb31a7ce6a: -> secret |
|
295 | test-hook-close-phase: 2713879da13d6eea1ff22b442a5a87cb31a7ce6a: -> secret | |
296 | $ hg phase . |
|
296 | $ hg phase . | |
297 | 5: secret |
|
297 | 5: secret | |
298 |
|
298 | |||
299 | We now try to push a new public changeset that descend from the common public |
|
299 | We now try to push a new public changeset that descend from the common public | |
300 | head shadowed by the remote secret head. |
|
300 | head shadowed by the remote secret head. | |
301 |
|
301 | |||
302 | $ cd ../initialrepo |
|
302 | $ cd ../initialrepo | |
303 | $ hg up -q 6 #B' |
|
303 | $ hg up -q 6 #B' | |
304 | $ mkcommit I |
|
304 | $ mkcommit I | |
305 | test-debug-phase: new rev 8: x -> 1 |
|
305 | test-debug-phase: new rev 8: x -> 1 | |
306 | created new head |
|
306 | created new head | |
307 | test-hook-close-phase: 6d6770faffce199f1fddd1cf87f6f026138cf061: -> draft |
|
307 | test-hook-close-phase: 6d6770faffce199f1fddd1cf87f6f026138cf061: -> draft | |
308 | $ hg push ../push-dest |
|
308 | $ hg push ../push-dest | |
309 | pushing to ../push-dest |
|
309 | pushing to ../push-dest | |
310 | searching for changes |
|
310 | searching for changes | |
311 | adding changesets |
|
311 | adding changesets | |
312 | adding manifests |
|
312 | adding manifests | |
313 | adding file changes |
|
313 | adding file changes | |
314 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
314 | added 1 changesets with 1 changes to 1 files (+1 heads) | |
315 | test-debug-phase: new rev 6: x -> 1 |
|
315 | test-debug-phase: new rev 6: x -> 1 | |
316 | test-hook-close-phase: 6d6770faffce199f1fddd1cf87f6f026138cf061: -> draft |
|
316 | test-hook-close-phase: 6d6770faffce199f1fddd1cf87f6f026138cf061: -> draft | |
317 |
|
317 | |||
318 | :note: The "(+1 heads)" is wrong as we do not had any visible head |
|
318 | :note: The "(+1 heads)" is wrong as we do not had any visible head | |
319 |
|
319 | |||
320 | check that branch cache with "served" filter are properly computed and stored |
|
320 | check that branch cache with "served" filter are properly computed and stored | |
321 |
|
321 | |||
322 | $ ls ../push-dest/.hg/cache/branch2* |
|
322 | $ ls ../push-dest/.hg/cache/branch2* | |
323 | ../push-dest/.hg/cache/branch2-base |
|
323 | ../push-dest/.hg/cache/branch2-base | |
324 | ../push-dest/.hg/cache/branch2-served |
|
324 | ../push-dest/.hg/cache/branch2-served | |
325 | $ cat ../push-dest/.hg/cache/branch2-served |
|
325 | $ cat ../push-dest/.hg/cache/branch2-served | |
326 | 6d6770faffce199f1fddd1cf87f6f026138cf061 6 465891ffab3c47a3c23792f7dc84156e19a90722 |
|
326 | 6d6770faffce199f1fddd1cf87f6f026138cf061 6 465891ffab3c47a3c23792f7dc84156e19a90722 | |
327 | b3325c91a4d916bcc4cdc83ea3fe4ece46a42f6e o default |
|
327 | b3325c91a4d916bcc4cdc83ea3fe4ece46a42f6e o default | |
328 | 6d6770faffce199f1fddd1cf87f6f026138cf061 o default |
|
328 | 6d6770faffce199f1fddd1cf87f6f026138cf061 o default | |
329 | $ hg heads -R ../push-dest --template '{rev}:{node} {phase}\n' #update visible cache too |
|
329 | $ hg heads -R ../push-dest --template '{rev}:{node} {phase}\n' #update visible cache too | |
330 | 6:6d6770faffce199f1fddd1cf87f6f026138cf061 draft |
|
330 | 6:6d6770faffce199f1fddd1cf87f6f026138cf061 draft | |
331 | 5:2713879da13d6eea1ff22b442a5a87cb31a7ce6a secret |
|
331 | 5:2713879da13d6eea1ff22b442a5a87cb31a7ce6a secret | |
332 | 3:b3325c91a4d916bcc4cdc83ea3fe4ece46a42f6e draft |
|
332 | 3:b3325c91a4d916bcc4cdc83ea3fe4ece46a42f6e draft | |
333 | $ ls ../push-dest/.hg/cache/branch2* |
|
333 | $ ls ../push-dest/.hg/cache/branch2* | |
334 | ../push-dest/.hg/cache/branch2-base |
|
334 | ../push-dest/.hg/cache/branch2-base | |
335 | ../push-dest/.hg/cache/branch2-served |
|
335 | ../push-dest/.hg/cache/branch2-served | |
336 | ../push-dest/.hg/cache/branch2-visible |
|
336 | ../push-dest/.hg/cache/branch2-visible | |
337 | $ cat ../push-dest/.hg/cache/branch2-served |
|
337 | $ cat ../push-dest/.hg/cache/branch2-served | |
338 | 6d6770faffce199f1fddd1cf87f6f026138cf061 6 465891ffab3c47a3c23792f7dc84156e19a90722 |
|
338 | 6d6770faffce199f1fddd1cf87f6f026138cf061 6 465891ffab3c47a3c23792f7dc84156e19a90722 | |
339 | b3325c91a4d916bcc4cdc83ea3fe4ece46a42f6e o default |
|
339 | b3325c91a4d916bcc4cdc83ea3fe4ece46a42f6e o default | |
340 | 6d6770faffce199f1fddd1cf87f6f026138cf061 o default |
|
340 | 6d6770faffce199f1fddd1cf87f6f026138cf061 o default | |
341 | $ cat ../push-dest/.hg/cache/branch2-visible |
|
341 | $ cat ../push-dest/.hg/cache/branch2-visible | |
342 | 6d6770faffce199f1fddd1cf87f6f026138cf061 6 |
|
342 | 6d6770faffce199f1fddd1cf87f6f026138cf061 6 | |
343 | b3325c91a4d916bcc4cdc83ea3fe4ece46a42f6e o default |
|
343 | b3325c91a4d916bcc4cdc83ea3fe4ece46a42f6e o default | |
344 | 2713879da13d6eea1ff22b442a5a87cb31a7ce6a o default |
|
344 | 2713879da13d6eea1ff22b442a5a87cb31a7ce6a o default | |
345 | 6d6770faffce199f1fddd1cf87f6f026138cf061 o default |
|
345 | 6d6770faffce199f1fddd1cf87f6f026138cf061 o default | |
346 |
|
346 | |||
347 |
|
347 | |||
348 | Restore condition prior extra insertion. |
|
348 | Restore condition prior extra insertion. | |
349 | $ hg -q --config extensions.mq= strip . |
|
349 | $ hg -q --config extensions.mq= strip . | |
350 | $ hg up -q 7 |
|
350 | $ hg up -q 7 | |
351 | $ cd .. |
|
351 | $ cd .. | |
352 |
|
352 | |||
353 | Test secret changeset are not pull |
|
353 | Test secret changeset are not pull | |
354 |
|
354 | |||
355 | $ hg init pull-dest |
|
355 | $ hg init pull-dest | |
356 | $ cd pull-dest |
|
356 | $ cd pull-dest | |
357 | $ hg pull ../initialrepo |
|
357 | $ hg pull ../initialrepo | |
358 | pulling from ../initialrepo |
|
358 | pulling from ../initialrepo | |
359 | requesting all changes |
|
359 | requesting all changes | |
360 | adding changesets |
|
360 | adding changesets | |
361 | adding manifests |
|
361 | adding manifests | |
362 | adding file changes |
|
362 | adding file changes | |
363 | added 5 changesets with 5 changes to 5 files (+1 heads) |
|
363 | added 5 changesets with 5 changes to 5 files (+1 heads) | |
364 | new changesets 4a2df7238c3b:cf9fe039dfd6 |
|
364 | new changesets 4a2df7238c3b:cf9fe039dfd6 | |
365 | test-debug-phase: new rev 0: x -> 0 |
|
365 | test-debug-phase: new rev 0: x -> 0 | |
366 | test-debug-phase: new rev 1: x -> 0 |
|
366 | test-debug-phase: new rev 1: x -> 0 | |
367 | test-debug-phase: new rev 2: x -> 0 |
|
367 | test-debug-phase: new rev 2: x -> 0 | |
368 | test-debug-phase: new rev 3: x -> 0 |
|
368 | test-debug-phase: new rev 3: x -> 0 | |
369 | test-debug-phase: new rev 4: x -> 0 |
|
369 | test-debug-phase: new rev 4: x -> 0 | |
370 | test-hook-close-phase: 4a2df7238c3b48766b5e22fafbb8a2f506ec8256: -> public |
|
370 | test-hook-close-phase: 4a2df7238c3b48766b5e22fafbb8a2f506ec8256: -> public | |
371 | test-hook-close-phase: 27547f69f25460a52fff66ad004e58da7ad3fb56: -> public |
|
371 | test-hook-close-phase: 27547f69f25460a52fff66ad004e58da7ad3fb56: -> public | |
372 | test-hook-close-phase: f838bfaca5c7226600ebcfd84f3c3c13a28d3757: -> public |
|
372 | test-hook-close-phase: f838bfaca5c7226600ebcfd84f3c3c13a28d3757: -> public | |
373 | test-hook-close-phase: b3325c91a4d916bcc4cdc83ea3fe4ece46a42f6e: -> public |
|
373 | test-hook-close-phase: b3325c91a4d916bcc4cdc83ea3fe4ece46a42f6e: -> public | |
374 | test-hook-close-phase: cf9fe039dfd67e829edf6522a45de057b5c86519: -> public |
|
374 | test-hook-close-phase: cf9fe039dfd67e829edf6522a45de057b5c86519: -> public | |
375 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
375 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
376 | $ hglog |
|
376 | $ hglog | |
377 | o 4 0 B' |
|
377 | o 4 0 B' | |
378 | | |
|
378 | | | |
379 | | o 3 0 D |
|
379 | | o 3 0 D | |
380 | | | |
|
380 | | | | |
381 | | o 2 0 C |
|
381 | | o 2 0 C | |
382 | |/ |
|
382 | |/ | |
383 | o 1 0 B |
|
383 | o 1 0 B | |
384 | | |
|
384 | | | |
385 | o 0 0 A |
|
385 | o 0 0 A | |
386 |
|
386 | |||
387 | $ cd .. |
|
387 | $ cd .. | |
388 |
|
388 | |||
389 | But secret can still be bundled explicitly |
|
389 | But secret can still be bundled explicitly | |
390 |
|
390 | |||
391 | $ cd initialrepo |
|
391 | $ cd initialrepo | |
392 | $ hg bundle --base '4^' -r 'children(4)' ../secret-bundle.hg |
|
392 | $ hg bundle --base '4^' -r 'children(4)' ../secret-bundle.hg | |
393 | 4 changesets found |
|
393 | 4 changesets found | |
394 | $ cd .. |
|
394 | $ cd .. | |
395 |
|
395 | |||
396 | Test secret changeset are not cloned |
|
396 | Test secret changeset are not cloned | |
397 | (during local clone) |
|
397 | (during local clone) | |
398 |
|
398 | |||
399 | $ hg clone -qU initialrepo clone-dest |
|
399 | $ hg clone -qU initialrepo clone-dest | |
400 | test-debug-phase: new rev 0: x -> 0 |
|
400 | test-debug-phase: new rev 0: x -> 0 | |
401 | test-debug-phase: new rev 1: x -> 0 |
|
401 | test-debug-phase: new rev 1: x -> 0 | |
402 | test-debug-phase: new rev 2: x -> 0 |
|
402 | test-debug-phase: new rev 2: x -> 0 | |
403 | test-debug-phase: new rev 3: x -> 0 |
|
403 | test-debug-phase: new rev 3: x -> 0 | |
404 | test-debug-phase: new rev 4: x -> 0 |
|
404 | test-debug-phase: new rev 4: x -> 0 | |
405 | test-hook-close-phase: 4a2df7238c3b48766b5e22fafbb8a2f506ec8256: -> public |
|
405 | test-hook-close-phase: 4a2df7238c3b48766b5e22fafbb8a2f506ec8256: -> public | |
406 | test-hook-close-phase: 27547f69f25460a52fff66ad004e58da7ad3fb56: -> public |
|
406 | test-hook-close-phase: 27547f69f25460a52fff66ad004e58da7ad3fb56: -> public | |
407 | test-hook-close-phase: f838bfaca5c7226600ebcfd84f3c3c13a28d3757: -> public |
|
407 | test-hook-close-phase: f838bfaca5c7226600ebcfd84f3c3c13a28d3757: -> public | |
408 | test-hook-close-phase: b3325c91a4d916bcc4cdc83ea3fe4ece46a42f6e: -> public |
|
408 | test-hook-close-phase: b3325c91a4d916bcc4cdc83ea3fe4ece46a42f6e: -> public | |
409 | test-hook-close-phase: cf9fe039dfd67e829edf6522a45de057b5c86519: -> public |
|
409 | test-hook-close-phase: cf9fe039dfd67e829edf6522a45de057b5c86519: -> public | |
410 | $ hglog -R clone-dest |
|
410 | $ hglog -R clone-dest | |
411 | o 4 0 B' |
|
411 | o 4 0 B' | |
412 | | |
|
412 | | | |
413 | | o 3 0 D |
|
413 | | o 3 0 D | |
414 | | | |
|
414 | | | | |
415 | | o 2 0 C |
|
415 | | o 2 0 C | |
416 | |/ |
|
416 | |/ | |
417 | o 1 0 B |
|
417 | o 1 0 B | |
418 | | |
|
418 | | | |
419 | o 0 0 A |
|
419 | o 0 0 A | |
420 |
|
420 | |||
421 |
|
421 | |||
422 | Test summary |
|
422 | Test summary | |
423 |
|
423 | |||
424 | $ hg summary -R clone-dest --verbose |
|
424 | $ hg summary -R clone-dest --verbose | |
425 | parent: -1:000000000000 (no revision checked out) |
|
425 | parent: -1:000000000000 (no revision checked out) | |
426 | branch: default |
|
426 | branch: default | |
427 | commit: (clean) |
|
427 | commit: (clean) | |
428 | update: 5 new changesets (update) |
|
428 | update: 5 new changesets (update) | |
429 | $ hg summary -R initialrepo |
|
429 | $ hg summary -R initialrepo | |
430 | parent: 7:17a481b3bccb tip |
|
430 | parent: 7:17a481b3bccb tip | |
431 | merge B' and E |
|
431 | merge B' and E | |
432 | branch: default |
|
432 | branch: default | |
433 | commit: (clean) (secret) |
|
433 | commit: (clean) (secret) | |
434 | update: 1 new changesets, 2 branch heads (merge) |
|
434 | update: 1 new changesets, 2 branch heads (merge) | |
435 | phases: 3 draft, 3 secret |
|
435 | phases: 3 draft, 3 secret | |
436 | $ hg summary -R initialrepo --quiet |
|
436 | $ hg summary -R initialrepo --quiet | |
437 | parent: 7:17a481b3bccb tip |
|
437 | parent: 7:17a481b3bccb tip | |
438 | update: 1 new changesets, 2 branch heads (merge) |
|
438 | update: 1 new changesets, 2 branch heads (merge) | |
439 |
|
439 | |||
440 | Test revset |
|
440 | Test revset | |
441 |
|
441 | |||
442 | $ cd initialrepo |
|
442 | $ cd initialrepo | |
443 | $ hglog -r 'public()' |
|
443 | $ hglog -r 'public()' | |
444 | o 1 0 B |
|
444 | o 1 0 B | |
445 | | |
|
445 | | | |
446 | o 0 0 A |
|
446 | o 0 0 A | |
447 |
|
447 | |||
448 | $ hglog -r 'draft()' |
|
448 | $ hglog -r 'draft()' | |
449 | o 6 1 B' |
|
449 | o 6 1 B' | |
450 | | |
|
450 | | | |
451 | ~ |
|
451 | ~ | |
452 | o 3 1 D |
|
452 | o 3 1 D | |
453 | | |
|
453 | | | |
454 | o 2 1 C |
|
454 | o 2 1 C | |
455 | | |
|
455 | | | |
456 | ~ |
|
456 | ~ | |
457 | $ hglog -r 'secret()' |
|
457 | $ hglog -r 'secret()' | |
458 | @ 7 2 merge B' and E |
|
458 | @ 7 2 merge B' and E | |
459 | |\ |
|
459 | |\ | |
460 | | ~ |
|
460 | | ~ | |
461 | | o 5 2 H |
|
461 | | o 5 2 H | |
462 | |/ |
|
462 | |/ | |
463 | o 4 2 E |
|
463 | o 4 2 E | |
464 | | |
|
464 | | | |
465 | ~ |
|
465 | ~ | |
466 |
|
466 | |||
467 | test that phase are displayed in log at debug level |
|
467 | test that phase are displayed in log at debug level | |
468 |
|
468 | |||
469 | $ hg log --debug |
|
469 | $ hg log --debug | |
470 | changeset: 7:17a481b3bccb796c0521ae97903d81c52bfee4af |
|
470 | changeset: 7:17a481b3bccb796c0521ae97903d81c52bfee4af | |
471 | tag: tip |
|
471 | tag: tip | |
472 | phase: secret |
|
472 | phase: secret | |
473 | parent: 6:cf9fe039dfd67e829edf6522a45de057b5c86519 |
|
473 | parent: 6:cf9fe039dfd67e829edf6522a45de057b5c86519 | |
474 | parent: 4:a603bfb5a83e312131cebcd05353c217d4d21dde |
|
474 | parent: 4:a603bfb5a83e312131cebcd05353c217d4d21dde | |
475 | manifest: 7:5e724ffacba267b2ab726c91fc8b650710deaaa8 |
|
475 | manifest: 7:5e724ffacba267b2ab726c91fc8b650710deaaa8 | |
476 | user: test |
|
476 | user: test | |
477 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
477 | date: Thu Jan 01 00:00:00 1970 +0000 | |
478 | extra: branch=default |
|
478 | extra: branch=default | |
479 | description: |
|
479 | description: | |
480 | merge B' and E |
|
480 | merge B' and E | |
481 |
|
481 | |||
482 |
|
482 | |||
483 | changeset: 6:cf9fe039dfd67e829edf6522a45de057b5c86519 |
|
483 | changeset: 6:cf9fe039dfd67e829edf6522a45de057b5c86519 | |
484 | phase: draft |
|
484 | phase: draft | |
485 | parent: 1:27547f69f25460a52fff66ad004e58da7ad3fb56 |
|
485 | parent: 1:27547f69f25460a52fff66ad004e58da7ad3fb56 | |
486 | parent: -1:0000000000000000000000000000000000000000 |
|
486 | parent: -1:0000000000000000000000000000000000000000 | |
487 | manifest: 6:ab8bfef2392903058bf4ebb9e7746e8d7026b27a |
|
487 | manifest: 6:ab8bfef2392903058bf4ebb9e7746e8d7026b27a | |
488 | user: test |
|
488 | user: test | |
489 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
489 | date: Thu Jan 01 00:00:00 1970 +0000 | |
490 | files+: B' |
|
490 | files+: B' | |
491 | extra: branch=default |
|
491 | extra: branch=default | |
492 | description: |
|
492 | description: | |
493 | B' |
|
493 | B' | |
494 |
|
494 | |||
495 |
|
495 | |||
496 | changeset: 5:a030c6be5127abc010fcbff1851536552e6951a8 |
|
496 | changeset: 5:a030c6be5127abc010fcbff1851536552e6951a8 | |
497 | phase: secret |
|
497 | phase: secret | |
498 | parent: 4:a603bfb5a83e312131cebcd05353c217d4d21dde |
|
498 | parent: 4:a603bfb5a83e312131cebcd05353c217d4d21dde | |
499 | parent: -1:0000000000000000000000000000000000000000 |
|
499 | parent: -1:0000000000000000000000000000000000000000 | |
500 | manifest: 5:5c710aa854874fe3d5fa7192e77bdb314cc08b5a |
|
500 | manifest: 5:5c710aa854874fe3d5fa7192e77bdb314cc08b5a | |
501 | user: test |
|
501 | user: test | |
502 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
502 | date: Thu Jan 01 00:00:00 1970 +0000 | |
503 | files+: H |
|
503 | files+: H | |
504 | extra: branch=default |
|
504 | extra: branch=default | |
505 | description: |
|
505 | description: | |
506 | H |
|
506 | H | |
507 |
|
507 | |||
508 |
|
508 | |||
509 | changeset: 4:a603bfb5a83e312131cebcd05353c217d4d21dde |
|
509 | changeset: 4:a603bfb5a83e312131cebcd05353c217d4d21dde | |
510 | phase: secret |
|
510 | phase: secret | |
511 | parent: 3:b3325c91a4d916bcc4cdc83ea3fe4ece46a42f6e |
|
511 | parent: 3:b3325c91a4d916bcc4cdc83ea3fe4ece46a42f6e | |
512 | parent: -1:0000000000000000000000000000000000000000 |
|
512 | parent: -1:0000000000000000000000000000000000000000 | |
513 | manifest: 4:7173fd1c27119750b959e3a0f47ed78abe75d6dc |
|
513 | manifest: 4:7173fd1c27119750b959e3a0f47ed78abe75d6dc | |
514 | user: test |
|
514 | user: test | |
515 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
515 | date: Thu Jan 01 00:00:00 1970 +0000 | |
516 | files+: E |
|
516 | files+: E | |
517 | extra: branch=default |
|
517 | extra: branch=default | |
518 | description: |
|
518 | description: | |
519 | E |
|
519 | E | |
520 |
|
520 | |||
521 |
|
521 | |||
522 | changeset: 3:b3325c91a4d916bcc4cdc83ea3fe4ece46a42f6e |
|
522 | changeset: 3:b3325c91a4d916bcc4cdc83ea3fe4ece46a42f6e | |
523 | phase: draft |
|
523 | phase: draft | |
524 | parent: 2:f838bfaca5c7226600ebcfd84f3c3c13a28d3757 |
|
524 | parent: 2:f838bfaca5c7226600ebcfd84f3c3c13a28d3757 | |
525 | parent: -1:0000000000000000000000000000000000000000 |
|
525 | parent: -1:0000000000000000000000000000000000000000 | |
526 | manifest: 3:6e1f4c47ecb533ffd0c8e52cdc88afb6cd39e20c |
|
526 | manifest: 3:6e1f4c47ecb533ffd0c8e52cdc88afb6cd39e20c | |
527 | user: test |
|
527 | user: test | |
528 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
528 | date: Thu Jan 01 00:00:00 1970 +0000 | |
529 | files+: D |
|
529 | files+: D | |
530 | extra: branch=default |
|
530 | extra: branch=default | |
531 | description: |
|
531 | description: | |
532 | D |
|
532 | D | |
533 |
|
533 | |||
534 |
|
534 | |||
535 | changeset: 2:f838bfaca5c7226600ebcfd84f3c3c13a28d3757 |
|
535 | changeset: 2:f838bfaca5c7226600ebcfd84f3c3c13a28d3757 | |
536 | phase: draft |
|
536 | phase: draft | |
537 | parent: 1:27547f69f25460a52fff66ad004e58da7ad3fb56 |
|
537 | parent: 1:27547f69f25460a52fff66ad004e58da7ad3fb56 | |
538 | parent: -1:0000000000000000000000000000000000000000 |
|
538 | parent: -1:0000000000000000000000000000000000000000 | |
539 | manifest: 2:66a5a01817fdf5239c273802b5b7618d051c89e4 |
|
539 | manifest: 2:66a5a01817fdf5239c273802b5b7618d051c89e4 | |
540 | user: test |
|
540 | user: test | |
541 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
541 | date: Thu Jan 01 00:00:00 1970 +0000 | |
542 | files+: C |
|
542 | files+: C | |
543 | extra: branch=default |
|
543 | extra: branch=default | |
544 | description: |
|
544 | description: | |
545 | C |
|
545 | C | |
546 |
|
546 | |||
547 |
|
547 | |||
548 | changeset: 1:27547f69f25460a52fff66ad004e58da7ad3fb56 |
|
548 | changeset: 1:27547f69f25460a52fff66ad004e58da7ad3fb56 | |
549 | phase: public |
|
549 | phase: public | |
550 | parent: 0:4a2df7238c3b48766b5e22fafbb8a2f506ec8256 |
|
550 | parent: 0:4a2df7238c3b48766b5e22fafbb8a2f506ec8256 | |
551 | parent: -1:0000000000000000000000000000000000000000 |
|
551 | parent: -1:0000000000000000000000000000000000000000 | |
552 | manifest: 1:cb5cbbc1bfbf24cc34b9e8c16914e9caa2d2a7fd |
|
552 | manifest: 1:cb5cbbc1bfbf24cc34b9e8c16914e9caa2d2a7fd | |
553 | user: test |
|
553 | user: test | |
554 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
554 | date: Thu Jan 01 00:00:00 1970 +0000 | |
555 | files+: B |
|
555 | files+: B | |
556 | extra: branch=default |
|
556 | extra: branch=default | |
557 | description: |
|
557 | description: | |
558 | B |
|
558 | B | |
559 |
|
559 | |||
560 |
|
560 | |||
561 | changeset: 0:4a2df7238c3b48766b5e22fafbb8a2f506ec8256 |
|
561 | changeset: 0:4a2df7238c3b48766b5e22fafbb8a2f506ec8256 | |
562 | phase: public |
|
562 | phase: public | |
563 | parent: -1:0000000000000000000000000000000000000000 |
|
563 | parent: -1:0000000000000000000000000000000000000000 | |
564 | parent: -1:0000000000000000000000000000000000000000 |
|
564 | parent: -1:0000000000000000000000000000000000000000 | |
565 | manifest: 0:007d8c9d88841325f5c6b06371b35b4e8a2b1a83 |
|
565 | manifest: 0:007d8c9d88841325f5c6b06371b35b4e8a2b1a83 | |
566 | user: test |
|
566 | user: test | |
567 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
567 | date: Thu Jan 01 00:00:00 1970 +0000 | |
568 | files+: A |
|
568 | files+: A | |
569 | extra: branch=default |
|
569 | extra: branch=default | |
570 | description: |
|
570 | description: | |
571 | A |
|
571 | A | |
572 |
|
572 | |||
573 |
|
573 | |||
574 |
|
574 | |||
575 |
|
575 | |||
576 | (Issue3707) |
|
576 | (Issue3707) | |
577 | test invalid phase name |
|
577 | test invalid phase name | |
578 |
|
578 | |||
579 | $ mkcommit I --config phases.new-commit='babar' |
|
579 | $ mkcommit I --config phases.new-commit='babar' | |
580 | transaction abort! |
|
580 | transaction abort! | |
581 | rollback completed |
|
581 | rollback completed | |
582 | config error: phases.new-commit: not a valid phase name ('babar') |
|
582 | config error: phases.new-commit: not a valid phase name ('babar') | |
583 | [30] |
|
583 | [30] | |
584 | Test phase command |
|
584 | Test phase command | |
585 | =================== |
|
585 | =================== | |
586 |
|
586 | |||
587 | initial picture |
|
587 | initial picture | |
588 |
|
588 | |||
589 | $ hg log -G --template "{rev} {phase} {desc}\n" |
|
589 | $ hg log -G --template "{rev} {phase} {desc}\n" | |
590 | @ 7 secret merge B' and E |
|
590 | @ 7 secret merge B' and E | |
591 | |\ |
|
591 | |\ | |
592 | | o 6 draft B' |
|
592 | | o 6 draft B' | |
593 | | | |
|
593 | | | | |
594 | +---o 5 secret H |
|
594 | +---o 5 secret H | |
595 | | | |
|
595 | | | | |
596 | o | 4 secret E |
|
596 | o | 4 secret E | |
597 | | | |
|
597 | | | | |
598 | o | 3 draft D |
|
598 | o | 3 draft D | |
599 | | | |
|
599 | | | | |
600 | o | 2 draft C |
|
600 | o | 2 draft C | |
601 | |/ |
|
601 | |/ | |
602 | o 1 public B |
|
602 | o 1 public B | |
603 | | |
|
603 | | | |
604 | o 0 public A |
|
604 | o 0 public A | |
605 |
|
605 | |||
606 |
|
606 | |||
607 | display changesets phase |
|
607 | display changesets phase | |
608 |
|
608 | |||
609 | (mixing -r and plain rev specification) |
|
609 | (mixing -r and plain rev specification) | |
610 |
|
610 | |||
611 | $ hg phase 1::4 -r 7 |
|
611 | $ hg phase 1::4 -r 7 | |
612 | 1: public |
|
612 | 1: public | |
613 | 2: draft |
|
613 | 2: draft | |
614 | 3: draft |
|
614 | 3: draft | |
615 | 4: secret |
|
615 | 4: secret | |
616 | 7: secret |
|
616 | 7: secret | |
617 |
|
617 | |||
618 |
|
618 | |||
619 | move changeset forward |
|
619 | move changeset forward | |
620 |
|
620 | |||
621 | (with -r option) |
|
621 | (with -r option) | |
622 |
|
622 | |||
623 | $ hg phase --public -r 2 |
|
623 | $ hg phase --public -r 2 | |
624 | test-debug-phase: move rev 2: 1 -> 0 |
|
624 | test-debug-phase: move rev 2: 1 -> 0 | |
625 | test-hook-close-phase: f838bfaca5c7226600ebcfd84f3c3c13a28d3757: draft -> public |
|
625 | test-hook-close-phase: f838bfaca5c7226600ebcfd84f3c3c13a28d3757: draft -> public | |
626 | $ hg log -G --template "{rev} {phase} {desc}\n" |
|
626 | $ hg log -G --template "{rev} {phase} {desc}\n" | |
627 | @ 7 secret merge B' and E |
|
627 | @ 7 secret merge B' and E | |
628 | |\ |
|
628 | |\ | |
629 | | o 6 draft B' |
|
629 | | o 6 draft B' | |
630 | | | |
|
630 | | | | |
631 | +---o 5 secret H |
|
631 | +---o 5 secret H | |
632 | | | |
|
632 | | | | |
633 | o | 4 secret E |
|
633 | o | 4 secret E | |
634 | | | |
|
634 | | | | |
635 | o | 3 draft D |
|
635 | o | 3 draft D | |
636 | | | |
|
636 | | | | |
637 | o | 2 public C |
|
637 | o | 2 public C | |
638 | |/ |
|
638 | |/ | |
639 | o 1 public B |
|
639 | o 1 public B | |
640 | | |
|
640 | | | |
641 | o 0 public A |
|
641 | o 0 public A | |
642 |
|
642 | |||
643 |
|
643 | |||
644 | move changeset backward |
|
644 | move changeset backward | |
645 |
|
645 | |||
646 | (without -r option) |
|
646 | (without -r option) | |
647 |
|
647 | |||
648 | $ hg phase --draft --force 2 |
|
648 | $ hg phase --draft --force 2 | |
649 | test-debug-phase: move rev 2: 0 -> 1 |
|
649 | test-debug-phase: move rev 2: 0 -> 1 | |
650 | test-hook-close-phase: f838bfaca5c7226600ebcfd84f3c3c13a28d3757: public -> draft |
|
650 | test-hook-close-phase: f838bfaca5c7226600ebcfd84f3c3c13a28d3757: public -> draft | |
651 | $ hg log -G --template "{rev} {phase} {desc}\n" |
|
651 | $ hg log -G --template "{rev} {phase} {desc}\n" | |
652 | @ 7 secret merge B' and E |
|
652 | @ 7 secret merge B' and E | |
653 | |\ |
|
653 | |\ | |
654 | | o 6 draft B' |
|
654 | | o 6 draft B' | |
655 | | | |
|
655 | | | | |
656 | +---o 5 secret H |
|
656 | +---o 5 secret H | |
657 | | | |
|
657 | | | | |
658 | o | 4 secret E |
|
658 | o | 4 secret E | |
659 | | | |
|
659 | | | | |
660 | o | 3 draft D |
|
660 | o | 3 draft D | |
661 | | | |
|
661 | | | | |
662 | o | 2 draft C |
|
662 | o | 2 draft C | |
663 | |/ |
|
663 | |/ | |
664 | o 1 public B |
|
664 | o 1 public B | |
665 | | |
|
665 | | | |
666 | o 0 public A |
|
666 | o 0 public A | |
667 |
|
667 | |||
668 |
|
668 | |||
669 | move changeset forward and backward |
|
669 | move changeset forward and backward | |
670 |
|
670 | |||
671 | $ hg phase --draft --force 1::4 |
|
671 | $ hg phase --draft --force 1::4 | |
672 | test-debug-phase: move rev 1: 0 -> 1 |
|
672 | test-debug-phase: move rev 1: 0 -> 1 | |
673 | test-debug-phase: move rev 4: 2 -> 1 |
|
673 | test-debug-phase: move rev 4: 2 -> 1 | |
674 | test-hook-close-phase: 27547f69f25460a52fff66ad004e58da7ad3fb56: public -> draft |
|
674 | test-hook-close-phase: 27547f69f25460a52fff66ad004e58da7ad3fb56: public -> draft | |
675 | test-hook-close-phase: a603bfb5a83e312131cebcd05353c217d4d21dde: secret -> draft |
|
675 | test-hook-close-phase: a603bfb5a83e312131cebcd05353c217d4d21dde: secret -> draft | |
676 | $ hg log -G --template "{rev} {phase} {desc}\n" |
|
676 | $ hg log -G --template "{rev} {phase} {desc}\n" | |
677 | @ 7 secret merge B' and E |
|
677 | @ 7 secret merge B' and E | |
678 | |\ |
|
678 | |\ | |
679 | | o 6 draft B' |
|
679 | | o 6 draft B' | |
680 | | | |
|
680 | | | | |
681 | +---o 5 secret H |
|
681 | +---o 5 secret H | |
682 | | | |
|
682 | | | | |
683 | o | 4 draft E |
|
683 | o | 4 draft E | |
684 | | | |
|
684 | | | | |
685 | o | 3 draft D |
|
685 | o | 3 draft D | |
686 | | | |
|
686 | | | | |
687 | o | 2 draft C |
|
687 | o | 2 draft C | |
688 | |/ |
|
688 | |/ | |
689 | o 1 draft B |
|
689 | o 1 draft B | |
690 | | |
|
690 | | | |
691 | o 0 public A |
|
691 | o 0 public A | |
692 |
|
692 | |||
693 | test partial failure |
|
693 | test partial failure | |
694 |
|
694 | |||
695 | $ hg phase --public 7 |
|
695 | $ hg phase --public 7 | |
696 | test-debug-phase: move rev 1: 1 -> 0 |
|
696 | test-debug-phase: move rev 1: 1 -> 0 | |
697 | test-debug-phase: move rev 2: 1 -> 0 |
|
697 | test-debug-phase: move rev 2: 1 -> 0 | |
698 | test-debug-phase: move rev 3: 1 -> 0 |
|
698 | test-debug-phase: move rev 3: 1 -> 0 | |
699 | test-debug-phase: move rev 4: 1 -> 0 |
|
699 | test-debug-phase: move rev 4: 1 -> 0 | |
700 | test-debug-phase: move rev 6: 1 -> 0 |
|
700 | test-debug-phase: move rev 6: 1 -> 0 | |
701 | test-debug-phase: move rev 7: 2 -> 0 |
|
701 | test-debug-phase: move rev 7: 2 -> 0 | |
702 | test-hook-close-phase: 27547f69f25460a52fff66ad004e58da7ad3fb56: draft -> public |
|
702 | test-hook-close-phase: 27547f69f25460a52fff66ad004e58da7ad3fb56: draft -> public | |
703 | test-hook-close-phase: f838bfaca5c7226600ebcfd84f3c3c13a28d3757: draft -> public |
|
703 | test-hook-close-phase: f838bfaca5c7226600ebcfd84f3c3c13a28d3757: draft -> public | |
704 | test-hook-close-phase: b3325c91a4d916bcc4cdc83ea3fe4ece46a42f6e: draft -> public |
|
704 | test-hook-close-phase: b3325c91a4d916bcc4cdc83ea3fe4ece46a42f6e: draft -> public | |
705 | test-hook-close-phase: a603bfb5a83e312131cebcd05353c217d4d21dde: draft -> public |
|
705 | test-hook-close-phase: a603bfb5a83e312131cebcd05353c217d4d21dde: draft -> public | |
706 | test-hook-close-phase: cf9fe039dfd67e829edf6522a45de057b5c86519: draft -> public |
|
706 | test-hook-close-phase: cf9fe039dfd67e829edf6522a45de057b5c86519: draft -> public | |
707 | test-hook-close-phase: 17a481b3bccb796c0521ae97903d81c52bfee4af: secret -> public |
|
707 | test-hook-close-phase: 17a481b3bccb796c0521ae97903d81c52bfee4af: secret -> public | |
708 | $ hg log -G --template "{rev} {phase} {desc}\n" |
|
708 | $ hg log -G --template "{rev} {phase} {desc}\n" | |
709 | @ 7 public merge B' and E |
|
709 | @ 7 public merge B' and E | |
710 | |\ |
|
710 | |\ | |
711 | | o 6 public B' |
|
711 | | o 6 public B' | |
712 | | | |
|
712 | | | | |
713 | +---o 5 secret H |
|
713 | +---o 5 secret H | |
714 | | | |
|
714 | | | | |
715 | o | 4 public E |
|
715 | o | 4 public E | |
716 | | | |
|
716 | | | | |
717 | o | 3 public D |
|
717 | o | 3 public D | |
718 | | | |
|
718 | | | | |
719 | o | 2 public C |
|
719 | o | 2 public C | |
720 | |/ |
|
720 | |/ | |
721 | o 1 public B |
|
721 | o 1 public B | |
722 | | |
|
722 | | | |
723 | o 0 public A |
|
723 | o 0 public A | |
724 |
|
724 | |||
725 | $ hg phase --draft '5 or 7' |
|
725 | $ hg phase --draft '5 or 7' | |
726 | test-debug-phase: move rev 5: 2 -> 1 |
|
726 | test-debug-phase: move rev 5: 2 -> 1 | |
727 | test-hook-close-phase: a030c6be5127abc010fcbff1851536552e6951a8: secret -> draft |
|
727 | test-hook-close-phase: a030c6be5127abc010fcbff1851536552e6951a8: secret -> draft | |
728 | cannot move 1 changesets to a higher phase, use --force |
|
728 | cannot move 1 changesets to a higher phase, use --force | |
729 | phase changed for 1 changesets |
|
729 | phase changed for 1 changesets | |
730 | [1] |
|
730 | [1] | |
731 | $ hg log -G --template "{rev} {phase} {desc}\n" |
|
731 | $ hg log -G --template "{rev} {phase} {desc}\n" | |
732 | @ 7 public merge B' and E |
|
732 | @ 7 public merge B' and E | |
733 | |\ |
|
733 | |\ | |
734 | | o 6 public B' |
|
734 | | o 6 public B' | |
735 | | | |
|
735 | | | | |
736 | +---o 5 draft H |
|
736 | +---o 5 draft H | |
737 | | | |
|
737 | | | | |
738 | o | 4 public E |
|
738 | o | 4 public E | |
739 | | | |
|
739 | | | | |
740 | o | 3 public D |
|
740 | o | 3 public D | |
741 | | | |
|
741 | | | | |
742 | o | 2 public C |
|
742 | o | 2 public C | |
743 | |/ |
|
743 | |/ | |
744 | o 1 public B |
|
744 | o 1 public B | |
745 | | |
|
745 | | | |
746 | o 0 public A |
|
746 | o 0 public A | |
747 |
|
747 | |||
748 |
|
748 | |||
749 | test complete failure |
|
749 | test complete failure | |
750 |
|
750 | |||
751 | $ hg phase --draft 7 |
|
751 | $ hg phase --draft 7 | |
752 | cannot move 1 changesets to a higher phase, use --force |
|
752 | cannot move 1 changesets to a higher phase, use --force | |
753 | no phases changed |
|
753 | no phases changed | |
754 | [1] |
|
754 | [1] | |
755 |
|
755 | |||
756 | $ cd .. |
|
756 | $ cd .. | |
757 |
|
757 | |||
758 | test hidden changeset are not cloned as public (issue3935) |
|
758 | test hidden changeset are not cloned as public (issue3935) | |
759 |
|
759 | |||
760 | $ cd initialrepo |
|
760 | $ cd initialrepo | |
761 |
|
761 | |||
762 | (enabling evolution) |
|
762 | (enabling evolution) | |
763 | $ cat >> $HGRCPATH << EOF |
|
763 | $ cat >> $HGRCPATH << EOF | |
764 | > [experimental] |
|
764 | > [experimental] | |
765 | > evolution.createmarkers=True |
|
765 | > evolution.createmarkers=True | |
766 | > EOF |
|
766 | > EOF | |
767 |
|
767 | |||
768 | (making a changeset hidden; H in that case) |
|
768 | (making a changeset hidden; H in that case) | |
769 |
$ hg debugobsolete `hg id - |
|
769 | $ hg debugobsolete `hg id -T "{node}" -r 5` | |
770 | 1 new obsolescence markers |
|
770 | 1 new obsolescence markers | |
771 | obsoleted 1 changesets |
|
771 | obsoleted 1 changesets | |
772 |
|
772 | |||
773 | $ cd .. |
|
773 | $ cd .. | |
774 | $ hg clone initialrepo clonewithobs |
|
774 | $ hg clone initialrepo clonewithobs | |
775 | requesting all changes |
|
775 | requesting all changes | |
776 | adding changesets |
|
776 | adding changesets | |
777 | adding manifests |
|
777 | adding manifests | |
778 | adding file changes |
|
778 | adding file changes | |
779 | added 7 changesets with 6 changes to 6 files |
|
779 | added 7 changesets with 6 changes to 6 files | |
780 | new changesets 4a2df7238c3b:17a481b3bccb |
|
780 | new changesets 4a2df7238c3b:17a481b3bccb | |
781 | test-debug-phase: new rev 0: x -> 0 |
|
781 | test-debug-phase: new rev 0: x -> 0 | |
782 | test-debug-phase: new rev 1: x -> 0 |
|
782 | test-debug-phase: new rev 1: x -> 0 | |
783 | test-debug-phase: new rev 2: x -> 0 |
|
783 | test-debug-phase: new rev 2: x -> 0 | |
784 | test-debug-phase: new rev 3: x -> 0 |
|
784 | test-debug-phase: new rev 3: x -> 0 | |
785 | test-debug-phase: new rev 4: x -> 0 |
|
785 | test-debug-phase: new rev 4: x -> 0 | |
786 | test-debug-phase: new rev 5: x -> 0 |
|
786 | test-debug-phase: new rev 5: x -> 0 | |
787 | test-debug-phase: new rev 6: x -> 0 |
|
787 | test-debug-phase: new rev 6: x -> 0 | |
788 | test-hook-close-phase: 4a2df7238c3b48766b5e22fafbb8a2f506ec8256: -> public |
|
788 | test-hook-close-phase: 4a2df7238c3b48766b5e22fafbb8a2f506ec8256: -> public | |
789 | test-hook-close-phase: 27547f69f25460a52fff66ad004e58da7ad3fb56: -> public |
|
789 | test-hook-close-phase: 27547f69f25460a52fff66ad004e58da7ad3fb56: -> public | |
790 | test-hook-close-phase: f838bfaca5c7226600ebcfd84f3c3c13a28d3757: -> public |
|
790 | test-hook-close-phase: f838bfaca5c7226600ebcfd84f3c3c13a28d3757: -> public | |
791 | test-hook-close-phase: b3325c91a4d916bcc4cdc83ea3fe4ece46a42f6e: -> public |
|
791 | test-hook-close-phase: b3325c91a4d916bcc4cdc83ea3fe4ece46a42f6e: -> public | |
792 | test-hook-close-phase: a603bfb5a83e312131cebcd05353c217d4d21dde: -> public |
|
792 | test-hook-close-phase: a603bfb5a83e312131cebcd05353c217d4d21dde: -> public | |
793 | test-hook-close-phase: cf9fe039dfd67e829edf6522a45de057b5c86519: -> public |
|
793 | test-hook-close-phase: cf9fe039dfd67e829edf6522a45de057b5c86519: -> public | |
794 | test-hook-close-phase: 17a481b3bccb796c0521ae97903d81c52bfee4af: -> public |
|
794 | test-hook-close-phase: 17a481b3bccb796c0521ae97903d81c52bfee4af: -> public | |
795 | updating to branch default |
|
795 | updating to branch default | |
796 | 6 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
796 | 6 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
797 | $ cd clonewithobs |
|
797 | $ cd clonewithobs | |
798 | $ hg log -G --template "{rev} {phase} {desc}\n" |
|
798 | $ hg log -G --template "{rev} {phase} {desc}\n" | |
799 | @ 6 public merge B' and E |
|
799 | @ 6 public merge B' and E | |
800 | |\ |
|
800 | |\ | |
801 | | o 5 public B' |
|
801 | | o 5 public B' | |
802 | | | |
|
802 | | | | |
803 | o | 4 public E |
|
803 | o | 4 public E | |
804 | | | |
|
804 | | | | |
805 | o | 3 public D |
|
805 | o | 3 public D | |
806 | | | |
|
806 | | | | |
807 | o | 2 public C |
|
807 | o | 2 public C | |
808 | |/ |
|
808 | |/ | |
809 | o 1 public B |
|
809 | o 1 public B | |
810 | | |
|
810 | | | |
811 | o 0 public A |
|
811 | o 0 public A | |
812 |
|
812 | |||
813 |
|
813 | |||
814 | test verify repo containing hidden changesets, which should not abort just |
|
814 | test verify repo containing hidden changesets, which should not abort just | |
815 | because repo.cancopy() is False |
|
815 | because repo.cancopy() is False | |
816 |
|
816 | |||
817 | $ cd ../initialrepo |
|
817 | $ cd ../initialrepo | |
818 | $ hg verify -q |
|
818 | $ hg verify -q | |
819 |
|
819 | |||
820 | $ cd .. |
|
820 | $ cd .. | |
821 |
|
821 | |||
822 | check whether HG_PENDING makes pending changes only in related |
|
822 | check whether HG_PENDING makes pending changes only in related | |
823 | repositories visible to an external hook. |
|
823 | repositories visible to an external hook. | |
824 |
|
824 | |||
825 | (emulate a transaction running concurrently by copied |
|
825 | (emulate a transaction running concurrently by copied | |
826 | .hg/phaseroots.pending in subsequent test) |
|
826 | .hg/phaseroots.pending in subsequent test) | |
827 |
|
827 | |||
828 | $ cat > $TESTTMP/savepending.sh <<EOF |
|
828 | $ cat > $TESTTMP/savepending.sh <<EOF | |
829 | > cp .hg/store/phaseroots.pending .hg/store/phaseroots.pending.saved |
|
829 | > cp .hg/store/phaseroots.pending .hg/store/phaseroots.pending.saved | |
830 | > exit 1 # to avoid changing phase for subsequent tests |
|
830 | > exit 1 # to avoid changing phase for subsequent tests | |
831 | > EOF |
|
831 | > EOF | |
832 | $ cd push-dest |
|
832 | $ cd push-dest | |
833 | $ hg phase 6 |
|
833 | $ hg phase 6 | |
834 | 6: draft |
|
834 | 6: draft | |
835 | $ hg --config hooks.pretxnclose="sh $TESTTMP/savepending.sh" phase -f -s 6 |
|
835 | $ hg --config hooks.pretxnclose="sh $TESTTMP/savepending.sh" phase -f -s 6 | |
836 | abort: pretxnclose hook exited with status 1 |
|
836 | abort: pretxnclose hook exited with status 1 | |
837 | [40] |
|
837 | [40] | |
838 | $ cp .hg/store/phaseroots.pending.saved .hg/store/phaseroots.pending |
|
838 | $ cp .hg/store/phaseroots.pending.saved .hg/store/phaseroots.pending | |
839 |
|
839 | |||
840 | (check (in)visibility of phaseroot while transaction running in repo) |
|
840 | (check (in)visibility of phaseroot while transaction running in repo) | |
841 |
|
841 | |||
842 | $ cat > $TESTTMP/checkpending.sh <<EOF |
|
842 | $ cat > $TESTTMP/checkpending.sh <<EOF | |
843 | > echo '@initialrepo' |
|
843 | > echo '@initialrepo' | |
844 | > hg -R "$TESTTMP/initialrepo" phase 7 |
|
844 | > hg -R "$TESTTMP/initialrepo" phase 7 | |
845 | > echo '@push-dest' |
|
845 | > echo '@push-dest' | |
846 | > hg -R "$TESTTMP/push-dest" phase 6 |
|
846 | > hg -R "$TESTTMP/push-dest" phase 6 | |
847 | > exit 1 # to avoid changing phase for subsequent tests |
|
847 | > exit 1 # to avoid changing phase for subsequent tests | |
848 | > EOF |
|
848 | > EOF | |
849 | $ cd ../initialrepo |
|
849 | $ cd ../initialrepo | |
850 | $ hg phase 7 |
|
850 | $ hg phase 7 | |
851 | 7: public |
|
851 | 7: public | |
852 | $ hg --config hooks.pretxnclose="sh $TESTTMP/checkpending.sh" phase -f -s 7 |
|
852 | $ hg --config hooks.pretxnclose="sh $TESTTMP/checkpending.sh" phase -f -s 7 | |
853 | @initialrepo |
|
853 | @initialrepo | |
854 | 7: secret |
|
854 | 7: secret | |
855 | @push-dest |
|
855 | @push-dest | |
856 | 6: draft |
|
856 | 6: draft | |
857 | abort: pretxnclose hook exited with status 1 |
|
857 | abort: pretxnclose hook exited with status 1 | |
858 | [40] |
|
858 | [40] | |
859 |
|
859 | |||
860 | Check that pretxnclose-phase hook can control phase movement |
|
860 | Check that pretxnclose-phase hook can control phase movement | |
861 |
|
861 | |||
862 | $ hg phase --force b3325c91a4d9 --secret |
|
862 | $ hg phase --force b3325c91a4d9 --secret | |
863 | test-debug-phase: move rev 3: 0 -> 2 |
|
863 | test-debug-phase: move rev 3: 0 -> 2 | |
864 | test-debug-phase: move rev 4: 0 -> 2 |
|
864 | test-debug-phase: move rev 4: 0 -> 2 | |
865 | test-debug-phase: move rev 5: 1 -> 2 |
|
865 | test-debug-phase: move rev 5: 1 -> 2 | |
866 | test-debug-phase: move rev 7: 0 -> 2 |
|
866 | test-debug-phase: move rev 7: 0 -> 2 | |
867 | test-hook-close-phase: b3325c91a4d916bcc4cdc83ea3fe4ece46a42f6e: public -> secret |
|
867 | test-hook-close-phase: b3325c91a4d916bcc4cdc83ea3fe4ece46a42f6e: public -> secret | |
868 | test-hook-close-phase: a603bfb5a83e312131cebcd05353c217d4d21dde: public -> secret |
|
868 | test-hook-close-phase: a603bfb5a83e312131cebcd05353c217d4d21dde: public -> secret | |
869 | test-hook-close-phase: a030c6be5127abc010fcbff1851536552e6951a8: draft -> secret |
|
869 | test-hook-close-phase: a030c6be5127abc010fcbff1851536552e6951a8: draft -> secret | |
870 | test-hook-close-phase: 17a481b3bccb796c0521ae97903d81c52bfee4af: public -> secret |
|
870 | test-hook-close-phase: 17a481b3bccb796c0521ae97903d81c52bfee4af: public -> secret | |
871 | $ hg log -G -T phases |
|
871 | $ hg log -G -T phases | |
872 | @ changeset: 7:17a481b3bccb |
|
872 | @ changeset: 7:17a481b3bccb | |
873 | |\ tag: tip |
|
873 | |\ tag: tip | |
874 | | | phase: secret |
|
874 | | | phase: secret | |
875 | | | parent: 6:cf9fe039dfd6 |
|
875 | | | parent: 6:cf9fe039dfd6 | |
876 | | | parent: 4:a603bfb5a83e |
|
876 | | | parent: 4:a603bfb5a83e | |
877 | | | user: test |
|
877 | | | user: test | |
878 | | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
878 | | | date: Thu Jan 01 00:00:00 1970 +0000 | |
879 | | | summary: merge B' and E |
|
879 | | | summary: merge B' and E | |
880 | | | |
|
880 | | | | |
881 | | o changeset: 6:cf9fe039dfd6 |
|
881 | | o changeset: 6:cf9fe039dfd6 | |
882 | | | phase: public |
|
882 | | | phase: public | |
883 | | | parent: 1:27547f69f254 |
|
883 | | | parent: 1:27547f69f254 | |
884 | | | user: test |
|
884 | | | user: test | |
885 | | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
885 | | | date: Thu Jan 01 00:00:00 1970 +0000 | |
886 | | | summary: B' |
|
886 | | | summary: B' | |
887 | | | |
|
887 | | | | |
888 | o | changeset: 4:a603bfb5a83e |
|
888 | o | changeset: 4:a603bfb5a83e | |
889 | | | phase: secret |
|
889 | | | phase: secret | |
890 | | | user: test |
|
890 | | | user: test | |
891 | | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
891 | | | date: Thu Jan 01 00:00:00 1970 +0000 | |
892 | | | summary: E |
|
892 | | | summary: E | |
893 | | | |
|
893 | | | | |
894 | o | changeset: 3:b3325c91a4d9 |
|
894 | o | changeset: 3:b3325c91a4d9 | |
895 | | | phase: secret |
|
895 | | | phase: secret | |
896 | | | user: test |
|
896 | | | user: test | |
897 | | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
897 | | | date: Thu Jan 01 00:00:00 1970 +0000 | |
898 | | | summary: D |
|
898 | | | summary: D | |
899 | | | |
|
899 | | | | |
900 | o | changeset: 2:f838bfaca5c7 |
|
900 | o | changeset: 2:f838bfaca5c7 | |
901 | |/ phase: public |
|
901 | |/ phase: public | |
902 | | user: test |
|
902 | | user: test | |
903 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
903 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
904 | | summary: C |
|
904 | | summary: C | |
905 | | |
|
905 | | | |
906 | o changeset: 1:27547f69f254 |
|
906 | o changeset: 1:27547f69f254 | |
907 | | phase: public |
|
907 | | phase: public | |
908 | | user: test |
|
908 | | user: test | |
909 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
909 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
910 | | summary: B |
|
910 | | summary: B | |
911 | | |
|
911 | | | |
912 | o changeset: 0:4a2df7238c3b |
|
912 | o changeset: 0:4a2df7238c3b | |
913 | phase: public |
|
913 | phase: public | |
914 | user: test |
|
914 | user: test | |
915 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
915 | date: Thu Jan 01 00:00:00 1970 +0000 | |
916 | summary: A |
|
916 | summary: A | |
917 |
|
917 | |||
918 |
|
918 | |||
919 | Install a hook that prevent b3325c91a4d9 to become public |
|
919 | Install a hook that prevent b3325c91a4d9 to become public | |
920 |
|
920 | |||
921 | $ cat >> .hg/hgrc << EOF |
|
921 | $ cat >> .hg/hgrc << EOF | |
922 | > [hooks] |
|
922 | > [hooks] | |
923 | > pretxnclose-phase.nopublish_D = sh -c "(echo \$HG_NODE| grep -v b3325c91a4d9>/dev/null) || [ 'public' != \$HG_PHASE ]" |
|
923 | > pretxnclose-phase.nopublish_D = sh -c "(echo \$HG_NODE| grep -v b3325c91a4d9>/dev/null) || [ 'public' != \$HG_PHASE ]" | |
924 | > EOF |
|
924 | > EOF | |
925 |
|
925 | |||
926 | Try various actions. only the draft move should succeed |
|
926 | Try various actions. only the draft move should succeed | |
927 |
|
927 | |||
928 | $ hg phase --public b3325c91a4d9 |
|
928 | $ hg phase --public b3325c91a4d9 | |
929 | abort: pretxnclose-phase.nopublish_D hook exited with status 1 |
|
929 | abort: pretxnclose-phase.nopublish_D hook exited with status 1 | |
930 | [40] |
|
930 | [40] | |
931 | $ hg phase --public a603bfb5a83e |
|
931 | $ hg phase --public a603bfb5a83e | |
932 | abort: pretxnclose-phase.nopublish_D hook exited with status 1 |
|
932 | abort: pretxnclose-phase.nopublish_D hook exited with status 1 | |
933 | [40] |
|
933 | [40] | |
934 | $ hg phase --draft 17a481b3bccb |
|
934 | $ hg phase --draft 17a481b3bccb | |
935 | test-debug-phase: move rev 3: 2 -> 1 |
|
935 | test-debug-phase: move rev 3: 2 -> 1 | |
936 | test-debug-phase: move rev 4: 2 -> 1 |
|
936 | test-debug-phase: move rev 4: 2 -> 1 | |
937 | test-debug-phase: move rev 7: 2 -> 1 |
|
937 | test-debug-phase: move rev 7: 2 -> 1 | |
938 | test-hook-close-phase: b3325c91a4d916bcc4cdc83ea3fe4ece46a42f6e: secret -> draft |
|
938 | test-hook-close-phase: b3325c91a4d916bcc4cdc83ea3fe4ece46a42f6e: secret -> draft | |
939 | test-hook-close-phase: a603bfb5a83e312131cebcd05353c217d4d21dde: secret -> draft |
|
939 | test-hook-close-phase: a603bfb5a83e312131cebcd05353c217d4d21dde: secret -> draft | |
940 | test-hook-close-phase: 17a481b3bccb796c0521ae97903d81c52bfee4af: secret -> draft |
|
940 | test-hook-close-phase: 17a481b3bccb796c0521ae97903d81c52bfee4af: secret -> draft | |
941 | $ hg phase --public 17a481b3bccb |
|
941 | $ hg phase --public 17a481b3bccb | |
942 | abort: pretxnclose-phase.nopublish_D hook exited with status 1 |
|
942 | abort: pretxnclose-phase.nopublish_D hook exited with status 1 | |
943 | [40] |
|
943 | [40] | |
944 |
|
944 | |||
945 | $ cd .. |
|
945 | $ cd .. | |
946 |
|
946 | |||
947 | Test for the "internal" phase |
|
947 | Test for the "internal" phase | |
948 | ============================= |
|
948 | ============================= | |
949 |
|
949 | |||
950 | Check we deny its usage on older repository |
|
950 | Check we deny its usage on older repository | |
951 |
|
951 | |||
952 | $ hg init no-internal-phase --config format.use-internal-phase=no |
|
952 | $ hg init no-internal-phase --config format.use-internal-phase=no | |
953 | $ cd no-internal-phase |
|
953 | $ cd no-internal-phase | |
954 | $ hg debugrequires | grep internal-phase |
|
954 | $ hg debugrequires | grep internal-phase | |
955 | [1] |
|
955 | [1] | |
956 | $ echo X > X |
|
956 | $ echo X > X | |
957 | $ hg add X |
|
957 | $ hg add X | |
958 | $ hg status |
|
958 | $ hg status | |
959 | A X |
|
959 | A X | |
960 | $ hg --config "phases.new-commit=internal" commit -m "my test internal commit" 2>&1 | grep ProgrammingError |
|
960 | $ hg --config "phases.new-commit=internal" commit -m "my test internal commit" 2>&1 | grep ProgrammingError | |
961 | ** ProgrammingError: this repository does not support the internal phase |
|
961 | ** ProgrammingError: this repository does not support the internal phase | |
962 | raise error.ProgrammingError(msg) (no-pyoxidizer !) |
|
962 | raise error.ProgrammingError(msg) (no-pyoxidizer !) | |
963 | *ProgrammingError: this repository does not support the internal phase (glob) |
|
963 | *ProgrammingError: this repository does not support the internal phase (glob) | |
964 | $ hg --config "phases.new-commit=archived" commit -m "my test archived commit" 2>&1 | grep ProgrammingError |
|
964 | $ hg --config "phases.new-commit=archived" commit -m "my test archived commit" 2>&1 | grep ProgrammingError | |
965 | ** ProgrammingError: this repository does not support the archived phase |
|
965 | ** ProgrammingError: this repository does not support the archived phase | |
966 | raise error.ProgrammingError(msg) (no-pyoxidizer !) |
|
966 | raise error.ProgrammingError(msg) (no-pyoxidizer !) | |
967 | *ProgrammingError: this repository does not support the archived phase (glob) |
|
967 | *ProgrammingError: this repository does not support the archived phase (glob) | |
968 |
|
968 | |||
969 | $ cd .. |
|
969 | $ cd .. | |
970 |
|
970 | |||
971 | Check it works fine with repository that supports it. |
|
971 | Check it works fine with repository that supports it. | |
972 |
|
972 | |||
973 | $ hg init internal-phase --config format.use-internal-phase=yes |
|
973 | $ hg init internal-phase --config format.use-internal-phase=yes | |
974 | $ cd internal-phase |
|
974 | $ cd internal-phase | |
975 | $ hg debugrequires | grep internal-phase |
|
975 | $ hg debugrequires | grep internal-phase | |
976 | internal-phase-2 |
|
976 | internal-phase-2 | |
977 | $ mkcommit A |
|
977 | $ mkcommit A | |
978 | test-debug-phase: new rev 0: x -> 1 |
|
978 | test-debug-phase: new rev 0: x -> 1 | |
979 | test-hook-close-phase: 4a2df7238c3b48766b5e22fafbb8a2f506ec8256: -> draft |
|
979 | test-hook-close-phase: 4a2df7238c3b48766b5e22fafbb8a2f506ec8256: -> draft | |
980 |
|
980 | |||
981 | Commit an internal changesets |
|
981 | Commit an internal changesets | |
982 |
|
982 | |||
983 | $ echo B > B |
|
983 | $ echo B > B | |
984 | $ hg add B |
|
984 | $ hg add B | |
985 | $ hg status |
|
985 | $ hg status | |
986 | A B |
|
986 | A B | |
987 | $ hg --config "phases.new-commit=internal" commit -m "my test internal commit" |
|
987 | $ hg --config "phases.new-commit=internal" commit -m "my test internal commit" | |
988 | test-debug-phase: new rev 1: x -> 96 |
|
988 | test-debug-phase: new rev 1: x -> 96 | |
989 | test-hook-close-phase: c01c42dffc7f81223397e99652a0703f83e1c5ea: -> internal |
|
989 | test-hook-close-phase: c01c42dffc7f81223397e99652a0703f83e1c5ea: -> internal | |
990 |
|
990 | |||
991 | The changeset is a working parent descendant. |
|
991 | The changeset is a working parent descendant. | |
992 | Per the usual visibility rules, it is made visible. |
|
992 | Per the usual visibility rules, it is made visible. | |
993 |
|
993 | |||
994 | $ hg log -G -l 3 |
|
994 | $ hg log -G -l 3 | |
995 | @ changeset: 1:c01c42dffc7f |
|
995 | @ changeset: 1:c01c42dffc7f | |
996 | | tag: tip |
|
996 | | tag: tip | |
997 | | user: test |
|
997 | | user: test | |
998 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
998 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
999 | | summary: my test internal commit |
|
999 | | summary: my test internal commit | |
1000 | | |
|
1000 | | | |
1001 | o changeset: 0:4a2df7238c3b |
|
1001 | o changeset: 0:4a2df7238c3b | |
1002 | user: test |
|
1002 | user: test | |
1003 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1003 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1004 | summary: A |
|
1004 | summary: A | |
1005 |
|
1005 | |||
1006 |
|
1006 | |||
1007 | Commit is hidden as expected |
|
1007 | Commit is hidden as expected | |
1008 |
|
1008 | |||
1009 | $ hg up 0 |
|
1009 | $ hg up 0 | |
1010 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1010 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
1011 | $ hg log -G |
|
1011 | $ hg log -G | |
1012 | @ changeset: 0:4a2df7238c3b |
|
1012 | @ changeset: 0:4a2df7238c3b | |
1013 | tag: tip |
|
1013 | tag: tip | |
1014 | user: test |
|
1014 | user: test | |
1015 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1015 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1016 | summary: A |
|
1016 | summary: A | |
1017 |
|
1017 | |||
1018 | The hidden commit is an orphan but doesn't show up without --hidden |
|
1018 | The hidden commit is an orphan but doesn't show up without --hidden | |
1019 | And internal changesets are not considered for unstability. |
|
1019 | And internal changesets are not considered for unstability. | |
1020 |
|
1020 | |||
1021 |
$ hg debugobsolete `hg id - |
|
1021 | $ hg debugobsolete `hg id -T "{node}" -r 0` | |
1022 | 1 new obsolescence markers |
|
1022 | 1 new obsolescence markers | |
1023 | obsoleted 1 changesets |
|
1023 | obsoleted 1 changesets | |
1024 | $ hg --hidden log -G -r '(0::) - 0' |
|
1024 | $ hg --hidden log -G -r '(0::) - 0' | |
1025 | o changeset: 1:c01c42dffc7f |
|
1025 | o changeset: 1:c01c42dffc7f | |
1026 | | tag: tip |
|
1026 | | tag: tip | |
1027 | ~ user: test |
|
1027 | ~ user: test | |
1028 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1028 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1029 | summary: my test internal commit |
|
1029 | summary: my test internal commit | |
1030 |
|
1030 | |||
1031 | $ hg --hidden log -G -r 'unstable()' |
|
1031 | $ hg --hidden log -G -r 'unstable()' | |
1032 |
|
1032 | |||
1033 | $ hg log -G -r 'unstable()' |
|
1033 | $ hg log -G -r 'unstable()' | |
1034 |
|
1034 | |||
1035 |
|
1035 | |||
1036 | Test for archived phase |
|
1036 | Test for archived phase | |
1037 | ----------------------- |
|
1037 | ----------------------- | |
1038 |
|
1038 | |||
1039 | Commit an archived changesets |
|
1039 | Commit an archived changesets | |
1040 |
|
1040 | |||
1041 | $ cd .. |
|
1041 | $ cd .. | |
1042 | $ hg clone --quiet --pull internal-phase archived-phase \ |
|
1042 | $ hg clone --quiet --pull internal-phase archived-phase \ | |
1043 | > --config format.exp-archived-phase=yes \ |
|
1043 | > --config format.exp-archived-phase=yes \ | |
1044 | > --config extensions.phasereport='!' \ |
|
1044 | > --config extensions.phasereport='!' \ | |
1045 | > --config hooks.txnclose-phase.test= |
|
1045 | > --config hooks.txnclose-phase.test= | |
1046 |
|
1046 | |||
1047 | $ cd archived-phase |
|
1047 | $ cd archived-phase | |
1048 |
|
1048 | |||
1049 | $ echo B > B |
|
1049 | $ echo B > B | |
1050 | $ hg add B |
|
1050 | $ hg add B | |
1051 | $ hg status |
|
1051 | $ hg status | |
1052 | A B |
|
1052 | A B | |
1053 | $ hg --config "phases.new-commit=archived" commit -m "my test archived commit" |
|
1053 | $ hg --config "phases.new-commit=archived" commit -m "my test archived commit" | |
1054 | test-debug-phase: new rev 1: x -> 32 |
|
1054 | test-debug-phase: new rev 1: x -> 32 | |
1055 | test-hook-close-phase: 8df5997c3361518f733d1ae67cd3adb9b0eaf125: -> archived |
|
1055 | test-hook-close-phase: 8df5997c3361518f733d1ae67cd3adb9b0eaf125: -> archived | |
1056 |
|
1056 | |||
1057 | The changeset is a working parent descendant. |
|
1057 | The changeset is a working parent descendant. | |
1058 | Per the usual visibility rules, it is made visible. |
|
1058 | Per the usual visibility rules, it is made visible. | |
1059 |
|
1059 | |||
1060 | $ hg log -G -l 3 |
|
1060 | $ hg log -G -l 3 | |
1061 | @ changeset: 1:8df5997c3361 |
|
1061 | @ changeset: 1:8df5997c3361 | |
1062 | | tag: tip |
|
1062 | | tag: tip | |
1063 | | user: test |
|
1063 | | user: test | |
1064 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1064 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
1065 | | summary: my test archived commit |
|
1065 | | summary: my test archived commit | |
1066 | | |
|
1066 | | | |
1067 | o changeset: 0:4a2df7238c3b |
|
1067 | o changeset: 0:4a2df7238c3b | |
1068 | user: test |
|
1068 | user: test | |
1069 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1069 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1070 | summary: A |
|
1070 | summary: A | |
1071 |
|
1071 | |||
1072 |
|
1072 | |||
1073 | Commit is hidden as expected |
|
1073 | Commit is hidden as expected | |
1074 |
|
1074 | |||
1075 | $ hg up 0 |
|
1075 | $ hg up 0 | |
1076 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1076 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
1077 | $ hg log -G |
|
1077 | $ hg log -G | |
1078 | @ changeset: 0:4a2df7238c3b |
|
1078 | @ changeset: 0:4a2df7238c3b | |
1079 | tag: tip |
|
1079 | tag: tip | |
1080 | user: test |
|
1080 | user: test | |
1081 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1081 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1082 | summary: A |
|
1082 | summary: A | |
1083 |
|
1083 | |||
1084 | $ cd .. |
|
1084 | $ cd .. | |
1085 |
|
1085 | |||
1086 | Recommitting an exact match of a public commit shouldn't change it to |
|
1086 | Recommitting an exact match of a public commit shouldn't change it to | |
1087 | draft: |
|
1087 | draft: | |
1088 |
|
1088 | |||
1089 | $ cd initialrepo |
|
1089 | $ cd initialrepo | |
1090 | $ hg phase -r 2 |
|
1090 | $ hg phase -r 2 | |
1091 | 2: public |
|
1091 | 2: public | |
1092 | $ hg up -C 1 |
|
1092 | $ hg up -C 1 | |
1093 | 0 files updated, 0 files merged, 4 files removed, 0 files unresolved |
|
1093 | 0 files updated, 0 files merged, 4 files removed, 0 files unresolved | |
1094 | $ mkcommit C |
|
1094 | $ mkcommit C | |
1095 | warning: commit already existed in the repository! |
|
1095 | warning: commit already existed in the repository! | |
1096 | $ hg phase -r 2 |
|
1096 | $ hg phase -r 2 | |
1097 | 2: public |
|
1097 | 2: public | |
1098 |
|
1098 | |||
1099 | Same, but for secret: |
|
1099 | Same, but for secret: | |
1100 |
|
1100 | |||
1101 | $ hg up 7 |
|
1101 | $ hg up 7 | |
1102 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1102 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1103 | $ mkcommit F -s |
|
1103 | $ mkcommit F -s | |
1104 | test-debug-phase: new rev 8: x -> 2 |
|
1104 | test-debug-phase: new rev 8: x -> 2 | |
1105 | test-hook-close-phase: de414268ec5ce2330c590b942fbb5ff0b0ca1a0a: -> secret |
|
1105 | test-hook-close-phase: de414268ec5ce2330c590b942fbb5ff0b0ca1a0a: -> secret | |
1106 | $ hg up 7 |
|
1106 | $ hg up 7 | |
1107 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1107 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
1108 | $ hg phase |
|
1108 | $ hg phase | |
1109 | 7: draft |
|
1109 | 7: draft | |
1110 | $ mkcommit F |
|
1110 | $ mkcommit F | |
1111 | test-debug-phase: new rev 8: x -> 2 |
|
1111 | test-debug-phase: new rev 8: x -> 2 | |
1112 | warning: commit already existed in the repository! |
|
1112 | warning: commit already existed in the repository! | |
1113 | test-hook-close-phase: de414268ec5ce2330c590b942fbb5ff0b0ca1a0a: -> secret |
|
1113 | test-hook-close-phase: de414268ec5ce2330c590b942fbb5ff0b0ca1a0a: -> secret | |
1114 | $ hg phase -r tip |
|
1114 | $ hg phase -r tip | |
1115 | 8: secret |
|
1115 | 8: secret | |
1116 |
|
1116 | |||
1117 | But what about obsoleted changesets? |
|
1117 | But what about obsoleted changesets? | |
1118 |
|
1118 | |||
1119 | $ hg up 4 |
|
1119 | $ hg up 4 | |
1120 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
1120 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
1121 | $ mkcommit H |
|
1121 | $ mkcommit H | |
1122 | test-debug-phase: new rev 5: x -> 2 |
|
1122 | test-debug-phase: new rev 5: x -> 2 | |
1123 | warning: commit already existed in the repository! |
|
1123 | warning: commit already existed in the repository! | |
1124 | test-hook-close-phase: a030c6be5127abc010fcbff1851536552e6951a8: -> secret |
|
1124 | test-hook-close-phase: a030c6be5127abc010fcbff1851536552e6951a8: -> secret | |
1125 | $ hg phase -r 5 |
|
1125 | $ hg phase -r 5 | |
1126 | 5: secret |
|
1126 | 5: secret | |
1127 | $ hg par |
|
1127 | $ hg par | |
1128 | changeset: 5:a030c6be5127 |
|
1128 | changeset: 5:a030c6be5127 | |
1129 | user: test |
|
1129 | user: test | |
1130 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1130 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1131 | obsolete: pruned |
|
1131 | obsolete: pruned | |
1132 | summary: H |
|
1132 | summary: H | |
1133 |
|
1133 | |||
1134 | $ hg up tip |
|
1134 | $ hg up tip | |
1135 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1135 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
1136 | $ cd .. |
|
1136 | $ cd .. | |
1137 |
|
1137 | |||
1138 | Testing that command line flags override configuration |
|
1138 | Testing that command line flags override configuration | |
1139 |
|
1139 | |||
1140 | $ hg init commit-overrides |
|
1140 | $ hg init commit-overrides | |
1141 | $ cd commit-overrides |
|
1141 | $ cd commit-overrides | |
1142 |
|
1142 | |||
1143 | `hg commit --draft` overrides new-commit=secret |
|
1143 | `hg commit --draft` overrides new-commit=secret | |
1144 |
|
1144 | |||
1145 | $ mkcommit A --config phases.new-commit='secret' --draft |
|
1145 | $ mkcommit A --config phases.new-commit='secret' --draft | |
1146 | test-debug-phase: new rev 0: x -> 1 |
|
1146 | test-debug-phase: new rev 0: x -> 1 | |
1147 | test-hook-close-phase: 4a2df7238c3b48766b5e22fafbb8a2f506ec8256: -> draft |
|
1147 | test-hook-close-phase: 4a2df7238c3b48766b5e22fafbb8a2f506ec8256: -> draft | |
1148 | $ hglog |
|
1148 | $ hglog | |
1149 | @ 0 1 A |
|
1149 | @ 0 1 A | |
1150 |
|
1150 | |||
1151 |
|
1151 | |||
1152 | `hg commit --secret` overrides new-commit=draft |
|
1152 | `hg commit --secret` overrides new-commit=draft | |
1153 |
|
1153 | |||
1154 | $ mkcommit B --config phases.new-commit='draft' --secret |
|
1154 | $ mkcommit B --config phases.new-commit='draft' --secret | |
1155 | test-debug-phase: new rev 1: x -> 2 |
|
1155 | test-debug-phase: new rev 1: x -> 2 | |
1156 | test-hook-close-phase: 27547f69f25460a52fff66ad004e58da7ad3fb56: -> secret |
|
1156 | test-hook-close-phase: 27547f69f25460a52fff66ad004e58da7ad3fb56: -> secret | |
1157 | $ hglog |
|
1157 | $ hglog | |
1158 | @ 1 2 B |
|
1158 | @ 1 2 B | |
1159 | | |
|
1159 | | | |
1160 | o 0 1 A |
|
1160 | o 0 1 A | |
1161 |
|
1161 | |||
1162 |
|
1162 | |||
1163 | $ cd .. |
|
1163 | $ cd .. |
General Comments 0
You need to be logged in to leave comments.
Login now