##// END OF EJS Templates
test-strip: add glob for Windows
Matt Harbison -
r26429:703d331c default
parent child Browse files
Show More
@@ -1,814 +1,814 b''
1 $ echo "[extensions]" >> $HGRCPATH
1 $ echo "[extensions]" >> $HGRCPATH
2 $ echo "strip=" >> $HGRCPATH
2 $ echo "strip=" >> $HGRCPATH
3
3
4 $ restore() {
4 $ restore() {
5 > hg unbundle -q .hg/strip-backup/*
5 > hg unbundle -q .hg/strip-backup/*
6 > rm .hg/strip-backup/*
6 > rm .hg/strip-backup/*
7 > }
7 > }
8 $ teststrip() {
8 $ teststrip() {
9 > hg up -C $1
9 > hg up -C $1
10 > echo % before update $1, strip $2
10 > echo % before update $1, strip $2
11 > hg parents
11 > hg parents
12 > hg --traceback strip $2
12 > hg --traceback strip $2
13 > echo % after update $1, strip $2
13 > echo % after update $1, strip $2
14 > hg parents
14 > hg parents
15 > restore
15 > restore
16 > }
16 > }
17
17
18 $ hg init test
18 $ hg init test
19 $ cd test
19 $ cd test
20
20
21 $ echo foo > bar
21 $ echo foo > bar
22 $ hg ci -Ama
22 $ hg ci -Ama
23 adding bar
23 adding bar
24
24
25 $ echo more >> bar
25 $ echo more >> bar
26 $ hg ci -Amb
26 $ hg ci -Amb
27
27
28 $ echo blah >> bar
28 $ echo blah >> bar
29 $ hg ci -Amc
29 $ hg ci -Amc
30
30
31 $ hg up 1
31 $ hg up 1
32 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
32 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
33 $ echo blah >> bar
33 $ echo blah >> bar
34 $ hg ci -Amd
34 $ hg ci -Amd
35 created new head
35 created new head
36
36
37 $ echo final >> bar
37 $ echo final >> bar
38 $ hg ci -Ame
38 $ hg ci -Ame
39
39
40 $ hg log
40 $ hg log
41 changeset: 4:443431ffac4f
41 changeset: 4:443431ffac4f
42 tag: tip
42 tag: tip
43 user: test
43 user: test
44 date: Thu Jan 01 00:00:00 1970 +0000
44 date: Thu Jan 01 00:00:00 1970 +0000
45 summary: e
45 summary: e
46
46
47 changeset: 3:65bd5f99a4a3
47 changeset: 3:65bd5f99a4a3
48 parent: 1:ef3a871183d7
48 parent: 1:ef3a871183d7
49 user: test
49 user: test
50 date: Thu Jan 01 00:00:00 1970 +0000
50 date: Thu Jan 01 00:00:00 1970 +0000
51 summary: d
51 summary: d
52
52
53 changeset: 2:264128213d29
53 changeset: 2:264128213d29
54 user: test
54 user: test
55 date: Thu Jan 01 00:00:00 1970 +0000
55 date: Thu Jan 01 00:00:00 1970 +0000
56 summary: c
56 summary: c
57
57
58 changeset: 1:ef3a871183d7
58 changeset: 1:ef3a871183d7
59 user: test
59 user: test
60 date: Thu Jan 01 00:00:00 1970 +0000
60 date: Thu Jan 01 00:00:00 1970 +0000
61 summary: b
61 summary: b
62
62
63 changeset: 0:9ab35a2d17cb
63 changeset: 0:9ab35a2d17cb
64 user: test
64 user: test
65 date: Thu Jan 01 00:00:00 1970 +0000
65 date: Thu Jan 01 00:00:00 1970 +0000
66 summary: a
66 summary: a
67
67
68
68
69 $ teststrip 4 4
69 $ teststrip 4 4
70 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
70 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
71 % before update 4, strip 4
71 % before update 4, strip 4
72 changeset: 4:443431ffac4f
72 changeset: 4:443431ffac4f
73 tag: tip
73 tag: tip
74 user: test
74 user: test
75 date: Thu Jan 01 00:00:00 1970 +0000
75 date: Thu Jan 01 00:00:00 1970 +0000
76 summary: e
76 summary: e
77
77
78 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
78 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
79 saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob)
79 saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob)
80 % after update 4, strip 4
80 % after update 4, strip 4
81 changeset: 3:65bd5f99a4a3
81 changeset: 3:65bd5f99a4a3
82 tag: tip
82 tag: tip
83 parent: 1:ef3a871183d7
83 parent: 1:ef3a871183d7
84 user: test
84 user: test
85 date: Thu Jan 01 00:00:00 1970 +0000
85 date: Thu Jan 01 00:00:00 1970 +0000
86 summary: d
86 summary: d
87
87
88 $ teststrip 4 3
88 $ teststrip 4 3
89 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
89 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
90 % before update 4, strip 3
90 % before update 4, strip 3
91 changeset: 4:443431ffac4f
91 changeset: 4:443431ffac4f
92 tag: tip
92 tag: tip
93 user: test
93 user: test
94 date: Thu Jan 01 00:00:00 1970 +0000
94 date: Thu Jan 01 00:00:00 1970 +0000
95 summary: e
95 summary: e
96
96
97 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
97 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
98 saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob)
98 saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob)
99 % after update 4, strip 3
99 % after update 4, strip 3
100 changeset: 1:ef3a871183d7
100 changeset: 1:ef3a871183d7
101 user: test
101 user: test
102 date: Thu Jan 01 00:00:00 1970 +0000
102 date: Thu Jan 01 00:00:00 1970 +0000
103 summary: b
103 summary: b
104
104
105 $ teststrip 1 4
105 $ teststrip 1 4
106 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
106 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
107 % before update 1, strip 4
107 % before update 1, strip 4
108 changeset: 1:ef3a871183d7
108 changeset: 1:ef3a871183d7
109 user: test
109 user: test
110 date: Thu Jan 01 00:00:00 1970 +0000
110 date: Thu Jan 01 00:00:00 1970 +0000
111 summary: b
111 summary: b
112
112
113 saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob)
113 saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob)
114 % after update 1, strip 4
114 % after update 1, strip 4
115 changeset: 1:ef3a871183d7
115 changeset: 1:ef3a871183d7
116 user: test
116 user: test
117 date: Thu Jan 01 00:00:00 1970 +0000
117 date: Thu Jan 01 00:00:00 1970 +0000
118 summary: b
118 summary: b
119
119
120 $ teststrip 4 2
120 $ teststrip 4 2
121 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
121 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
122 % before update 4, strip 2
122 % before update 4, strip 2
123 changeset: 4:443431ffac4f
123 changeset: 4:443431ffac4f
124 tag: tip
124 tag: tip
125 user: test
125 user: test
126 date: Thu Jan 01 00:00:00 1970 +0000
126 date: Thu Jan 01 00:00:00 1970 +0000
127 summary: e
127 summary: e
128
128
129 saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob)
129 saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob)
130 % after update 4, strip 2
130 % after update 4, strip 2
131 changeset: 3:443431ffac4f
131 changeset: 3:443431ffac4f
132 tag: tip
132 tag: tip
133 user: test
133 user: test
134 date: Thu Jan 01 00:00:00 1970 +0000
134 date: Thu Jan 01 00:00:00 1970 +0000
135 summary: e
135 summary: e
136
136
137 $ teststrip 4 1
137 $ teststrip 4 1
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 % before update 4, strip 1
139 % before update 4, strip 1
140 changeset: 4:264128213d29
140 changeset: 4:264128213d29
141 tag: tip
141 tag: tip
142 parent: 1:ef3a871183d7
142 parent: 1:ef3a871183d7
143 user: test
143 user: test
144 date: Thu Jan 01 00:00:00 1970 +0000
144 date: Thu Jan 01 00:00:00 1970 +0000
145 summary: c
145 summary: c
146
146
147 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
147 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
148 saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob)
148 saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob)
149 % after update 4, strip 1
149 % after update 4, strip 1
150 changeset: 0:9ab35a2d17cb
150 changeset: 0:9ab35a2d17cb
151 tag: tip
151 tag: tip
152 user: test
152 user: test
153 date: Thu Jan 01 00:00:00 1970 +0000
153 date: Thu Jan 01 00:00:00 1970 +0000
154 summary: a
154 summary: a
155
155
156 $ teststrip null 4
156 $ teststrip null 4
157 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
157 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
158 % before update null, strip 4
158 % before update null, strip 4
159 saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob)
159 saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob)
160 % after update null, strip 4
160 % after update null, strip 4
161
161
162 $ hg log
162 $ hg log
163 changeset: 4:264128213d29
163 changeset: 4:264128213d29
164 tag: tip
164 tag: tip
165 parent: 1:ef3a871183d7
165 parent: 1:ef3a871183d7
166 user: test
166 user: test
167 date: Thu Jan 01 00:00:00 1970 +0000
167 date: Thu Jan 01 00:00:00 1970 +0000
168 summary: c
168 summary: c
169
169
170 changeset: 3:443431ffac4f
170 changeset: 3:443431ffac4f
171 user: test
171 user: test
172 date: Thu Jan 01 00:00:00 1970 +0000
172 date: Thu Jan 01 00:00:00 1970 +0000
173 summary: e
173 summary: e
174
174
175 changeset: 2:65bd5f99a4a3
175 changeset: 2:65bd5f99a4a3
176 user: test
176 user: test
177 date: Thu Jan 01 00:00:00 1970 +0000
177 date: Thu Jan 01 00:00:00 1970 +0000
178 summary: d
178 summary: d
179
179
180 changeset: 1:ef3a871183d7
180 changeset: 1:ef3a871183d7
181 user: test
181 user: test
182 date: Thu Jan 01 00:00:00 1970 +0000
182 date: Thu Jan 01 00:00:00 1970 +0000
183 summary: b
183 summary: b
184
184
185 changeset: 0:9ab35a2d17cb
185 changeset: 0:9ab35a2d17cb
186 user: test
186 user: test
187 date: Thu Jan 01 00:00:00 1970 +0000
187 date: Thu Jan 01 00:00:00 1970 +0000
188 summary: a
188 summary: a
189
189
190 $ hg up -C 4
190 $ hg up -C 4
191 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
191 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
192 $ hg parents
192 $ hg parents
193 changeset: 4:264128213d29
193 changeset: 4:264128213d29
194 tag: tip
194 tag: tip
195 parent: 1:ef3a871183d7
195 parent: 1:ef3a871183d7
196 user: test
196 user: test
197 date: Thu Jan 01 00:00:00 1970 +0000
197 date: Thu Jan 01 00:00:00 1970 +0000
198 summary: c
198 summary: c
199
199
200
200
201 $ hg --traceback strip 4
201 $ hg --traceback strip 4
202 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
202 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
203 saved backup bundle to $TESTTMP/test/.hg/strip-backup/264128213d29-0b39d6bf-backup.hg (glob)
203 saved backup bundle to $TESTTMP/test/.hg/strip-backup/264128213d29-0b39d6bf-backup.hg (glob)
204 $ hg parents
204 $ hg parents
205 changeset: 1:ef3a871183d7
205 changeset: 1:ef3a871183d7
206 user: test
206 user: test
207 date: Thu Jan 01 00:00:00 1970 +0000
207 date: Thu Jan 01 00:00:00 1970 +0000
208 summary: b
208 summary: b
209
209
210 $ hg debugbundle .hg/strip-backup/*
210 $ hg debugbundle .hg/strip-backup/*
211 264128213d290d868c54642d13aeaa3675551a78
211 264128213d290d868c54642d13aeaa3675551a78
212 $ hg pull .hg/strip-backup/*
212 $ hg pull .hg/strip-backup/*
213 pulling from .hg/strip-backup/264128213d29-0b39d6bf-backup.hg
213 pulling from .hg/strip-backup/264128213d29-0b39d6bf-backup.hg
214 searching for changes
214 searching for changes
215 adding changesets
215 adding changesets
216 adding manifests
216 adding manifests
217 adding file changes
217 adding file changes
218 added 1 changesets with 0 changes to 0 files (+1 heads)
218 added 1 changesets with 0 changes to 0 files (+1 heads)
219 (run 'hg heads' to see heads, 'hg merge' to merge)
219 (run 'hg heads' to see heads, 'hg merge' to merge)
220 $ rm .hg/strip-backup/*
220 $ rm .hg/strip-backup/*
221 $ hg log --graph
221 $ hg log --graph
222 o changeset: 4:264128213d29
222 o changeset: 4:264128213d29
223 | tag: tip
223 | tag: tip
224 | parent: 1:ef3a871183d7
224 | parent: 1:ef3a871183d7
225 | user: test
225 | user: test
226 | date: Thu Jan 01 00:00:00 1970 +0000
226 | date: Thu Jan 01 00:00:00 1970 +0000
227 | summary: c
227 | summary: c
228 |
228 |
229 | o changeset: 3:443431ffac4f
229 | o changeset: 3:443431ffac4f
230 | | user: test
230 | | user: test
231 | | date: Thu Jan 01 00:00:00 1970 +0000
231 | | date: Thu Jan 01 00:00:00 1970 +0000
232 | | summary: e
232 | | summary: e
233 | |
233 | |
234 | o changeset: 2:65bd5f99a4a3
234 | o changeset: 2:65bd5f99a4a3
235 |/ user: test
235 |/ user: test
236 | date: Thu Jan 01 00:00:00 1970 +0000
236 | date: Thu Jan 01 00:00:00 1970 +0000
237 | summary: d
237 | summary: d
238 |
238 |
239 @ changeset: 1:ef3a871183d7
239 @ changeset: 1:ef3a871183d7
240 | user: test
240 | user: test
241 | date: Thu Jan 01 00:00:00 1970 +0000
241 | date: Thu Jan 01 00:00:00 1970 +0000
242 | summary: b
242 | summary: b
243 |
243 |
244 o changeset: 0:9ab35a2d17cb
244 o changeset: 0:9ab35a2d17cb
245 user: test
245 user: test
246 date: Thu Jan 01 00:00:00 1970 +0000
246 date: Thu Jan 01 00:00:00 1970 +0000
247 summary: a
247 summary: a
248
248
249 $ hg up -C 2
249 $ hg up -C 2
250 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
250 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
251 $ hg merge 4
251 $ hg merge 4
252 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
252 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
253 (branch merge, don't forget to commit)
253 (branch merge, don't forget to commit)
254
254
255 before strip of merge parent
255 before strip of merge parent
256
256
257 $ hg parents
257 $ hg parents
258 changeset: 2:65bd5f99a4a3
258 changeset: 2:65bd5f99a4a3
259 user: test
259 user: test
260 date: Thu Jan 01 00:00:00 1970 +0000
260 date: Thu Jan 01 00:00:00 1970 +0000
261 summary: d
261 summary: d
262
262
263 changeset: 4:264128213d29
263 changeset: 4:264128213d29
264 tag: tip
264 tag: tip
265 parent: 1:ef3a871183d7
265 parent: 1:ef3a871183d7
266 user: test
266 user: test
267 date: Thu Jan 01 00:00:00 1970 +0000
267 date: Thu Jan 01 00:00:00 1970 +0000
268 summary: c
268 summary: c
269
269
270 $ hg strip 4
270 $ hg strip 4
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 saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob)
272 saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob)
273
273
274 after strip of merge parent
274 after strip of merge parent
275
275
276 $ hg parents
276 $ hg parents
277 changeset: 1:ef3a871183d7
277 changeset: 1:ef3a871183d7
278 user: test
278 user: test
279 date: Thu Jan 01 00:00:00 1970 +0000
279 date: Thu Jan 01 00:00:00 1970 +0000
280 summary: b
280 summary: b
281
281
282 $ restore
282 $ restore
283
283
284 $ hg up
284 $ hg up
285 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
285 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
286 $ hg log -G
286 $ hg log -G
287 @ changeset: 4:264128213d29
287 @ changeset: 4:264128213d29
288 | tag: tip
288 | tag: tip
289 | parent: 1:ef3a871183d7
289 | parent: 1:ef3a871183d7
290 | user: test
290 | user: test
291 | date: Thu Jan 01 00:00:00 1970 +0000
291 | date: Thu Jan 01 00:00:00 1970 +0000
292 | summary: c
292 | summary: c
293 |
293 |
294 | o changeset: 3:443431ffac4f
294 | o changeset: 3:443431ffac4f
295 | | user: test
295 | | user: test
296 | | date: Thu Jan 01 00:00:00 1970 +0000
296 | | date: Thu Jan 01 00:00:00 1970 +0000
297 | | summary: e
297 | | summary: e
298 | |
298 | |
299 | o changeset: 2:65bd5f99a4a3
299 | o changeset: 2:65bd5f99a4a3
300 |/ user: test
300 |/ user: test
301 | date: Thu Jan 01 00:00:00 1970 +0000
301 | date: Thu Jan 01 00:00:00 1970 +0000
302 | summary: d
302 | summary: d
303 |
303 |
304 o changeset: 1:ef3a871183d7
304 o changeset: 1:ef3a871183d7
305 | user: test
305 | user: test
306 | date: Thu Jan 01 00:00:00 1970 +0000
306 | date: Thu Jan 01 00:00:00 1970 +0000
307 | summary: b
307 | summary: b
308 |
308 |
309 o changeset: 0:9ab35a2d17cb
309 o changeset: 0:9ab35a2d17cb
310 user: test
310 user: test
311 date: Thu Jan 01 00:00:00 1970 +0000
311 date: Thu Jan 01 00:00:00 1970 +0000
312 summary: a
312 summary: a
313
313
314
314
315 2 is parent of 3, only one strip should happen
315 2 is parent of 3, only one strip should happen
316
316
317 $ hg strip "roots(2)" 3
317 $ hg strip "roots(2)" 3
318 saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob)
318 saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob)
319 $ hg log -G
319 $ hg log -G
320 @ changeset: 2:264128213d29
320 @ changeset: 2:264128213d29
321 | tag: tip
321 | tag: tip
322 | user: test
322 | user: test
323 | date: Thu Jan 01 00:00:00 1970 +0000
323 | date: Thu Jan 01 00:00:00 1970 +0000
324 | summary: c
324 | summary: c
325 |
325 |
326 o changeset: 1:ef3a871183d7
326 o changeset: 1:ef3a871183d7
327 | user: test
327 | user: test
328 | date: Thu Jan 01 00:00:00 1970 +0000
328 | date: Thu Jan 01 00:00:00 1970 +0000
329 | summary: b
329 | summary: b
330 |
330 |
331 o changeset: 0:9ab35a2d17cb
331 o changeset: 0:9ab35a2d17cb
332 user: test
332 user: test
333 date: Thu Jan 01 00:00:00 1970 +0000
333 date: Thu Jan 01 00:00:00 1970 +0000
334 summary: a
334 summary: a
335
335
336 $ restore
336 $ restore
337 $ hg log -G
337 $ hg log -G
338 o changeset: 4:443431ffac4f
338 o changeset: 4:443431ffac4f
339 | tag: tip
339 | tag: tip
340 | user: test
340 | user: test
341 | date: Thu Jan 01 00:00:00 1970 +0000
341 | date: Thu Jan 01 00:00:00 1970 +0000
342 | summary: e
342 | summary: e
343 |
343 |
344 o changeset: 3:65bd5f99a4a3
344 o changeset: 3:65bd5f99a4a3
345 | parent: 1:ef3a871183d7
345 | parent: 1:ef3a871183d7
346 | user: test
346 | user: test
347 | date: Thu Jan 01 00:00:00 1970 +0000
347 | date: Thu Jan 01 00:00:00 1970 +0000
348 | summary: d
348 | summary: d
349 |
349 |
350 | @ changeset: 2:264128213d29
350 | @ changeset: 2:264128213d29
351 |/ user: test
351 |/ user: test
352 | date: Thu Jan 01 00:00:00 1970 +0000
352 | date: Thu Jan 01 00:00:00 1970 +0000
353 | summary: c
353 | summary: c
354 |
354 |
355 o changeset: 1:ef3a871183d7
355 o changeset: 1:ef3a871183d7
356 | user: test
356 | user: test
357 | date: Thu Jan 01 00:00:00 1970 +0000
357 | date: Thu Jan 01 00:00:00 1970 +0000
358 | summary: b
358 | summary: b
359 |
359 |
360 o changeset: 0:9ab35a2d17cb
360 o changeset: 0:9ab35a2d17cb
361 user: test
361 user: test
362 date: Thu Jan 01 00:00:00 1970 +0000
362 date: Thu Jan 01 00:00:00 1970 +0000
363 summary: a
363 summary: a
364
364
365
365
366 2 different branches: 2 strips
366 2 different branches: 2 strips
367
367
368 $ hg strip 2 4
368 $ hg strip 2 4
369 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
369 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
370 saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob)
370 saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob)
371 $ hg log -G
371 $ hg log -G
372 o changeset: 2:65bd5f99a4a3
372 o changeset: 2:65bd5f99a4a3
373 | tag: tip
373 | tag: tip
374 | user: test
374 | user: test
375 | date: Thu Jan 01 00:00:00 1970 +0000
375 | date: Thu Jan 01 00:00:00 1970 +0000
376 | summary: d
376 | summary: d
377 |
377 |
378 @ changeset: 1:ef3a871183d7
378 @ changeset: 1:ef3a871183d7
379 | user: test
379 | user: test
380 | date: Thu Jan 01 00:00:00 1970 +0000
380 | date: Thu Jan 01 00:00:00 1970 +0000
381 | summary: b
381 | summary: b
382 |
382 |
383 o changeset: 0:9ab35a2d17cb
383 o changeset: 0:9ab35a2d17cb
384 user: test
384 user: test
385 date: Thu Jan 01 00:00:00 1970 +0000
385 date: Thu Jan 01 00:00:00 1970 +0000
386 summary: a
386 summary: a
387
387
388 $ restore
388 $ restore
389
389
390 2 different branches and a common ancestor: 1 strip
390 2 different branches and a common ancestor: 1 strip
391
391
392 $ hg strip 1 "2|4"
392 $ hg strip 1 "2|4"
393 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
393 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
394 saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob)
394 saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob)
395 $ restore
395 $ restore
396
396
397 verify fncache is kept up-to-date
397 verify fncache is kept up-to-date
398
398
399 $ touch a
399 $ touch a
400 $ hg ci -qAm a
400 $ hg ci -qAm a
401 $ cat .hg/store/fncache | sort
401 $ cat .hg/store/fncache | sort
402 data/a.i
402 data/a.i
403 data/bar.i
403 data/bar.i
404 $ hg strip tip
404 $ hg strip tip
405 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
405 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
406 saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob)
406 saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob)
407 $ cat .hg/store/fncache
407 $ cat .hg/store/fncache
408 data/bar.i
408 data/bar.i
409
409
410 stripping an empty revset
410 stripping an empty revset
411
411
412 $ hg strip "1 and not 1"
412 $ hg strip "1 and not 1"
413 abort: empty revision set
413 abort: empty revision set
414 [255]
414 [255]
415
415
416 remove branchy history for qimport tests
416 remove branchy history for qimport tests
417
417
418 $ hg strip 3
418 $ hg strip 3
419 saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob)
419 saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob)
420
420
421
421
422 strip of applied mq should cleanup status file
422 strip of applied mq should cleanup status file
423
423
424 $ echo "mq=" >> $HGRCPATH
424 $ echo "mq=" >> $HGRCPATH
425 $ hg up -C 3
425 $ hg up -C 3
426 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
426 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
427 $ echo fooagain >> bar
427 $ echo fooagain >> bar
428 $ hg ci -mf
428 $ hg ci -mf
429 $ hg qimport -r tip:2
429 $ hg qimport -r tip:2
430
430
431 applied patches before strip
431 applied patches before strip
432
432
433 $ hg qapplied
433 $ hg qapplied
434 2.diff
434 2.diff
435 3.diff
435 3.diff
436 4.diff
436 4.diff
437
437
438 stripping revision in queue
438 stripping revision in queue
439
439
440 $ hg strip 3
440 $ hg strip 3
441 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
441 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
442 saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob)
442 saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob)
443
443
444 applied patches after stripping rev in queue
444 applied patches after stripping rev in queue
445
445
446 $ hg qapplied
446 $ hg qapplied
447 2.diff
447 2.diff
448
448
449 stripping ancestor of queue
449 stripping ancestor of queue
450
450
451 $ hg strip 1
451 $ hg strip 1
452 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
452 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
453 saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob)
453 saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob)
454
454
455 applied patches after stripping ancestor of queue
455 applied patches after stripping ancestor of queue
456
456
457 $ hg qapplied
457 $ hg qapplied
458
458
459 Verify strip protects against stripping wc parent when there are uncommitted mods
459 Verify strip protects against stripping wc parent when there are uncommitted mods
460
460
461 $ echo b > b
461 $ echo b > b
462 $ echo bb > bar
462 $ echo bb > bar
463 $ hg add b
463 $ hg add b
464 $ hg ci -m 'b'
464 $ hg ci -m 'b'
465 $ hg log --graph
465 $ hg log --graph
466 @ changeset: 1:76dcf9fab855
466 @ changeset: 1:76dcf9fab855
467 | tag: tip
467 | tag: tip
468 | user: test
468 | user: test
469 | date: Thu Jan 01 00:00:00 1970 +0000
469 | date: Thu Jan 01 00:00:00 1970 +0000
470 | summary: b
470 | summary: b
471 |
471 |
472 o changeset: 0:9ab35a2d17cb
472 o changeset: 0:9ab35a2d17cb
473 user: test
473 user: test
474 date: Thu Jan 01 00:00:00 1970 +0000
474 date: Thu Jan 01 00:00:00 1970 +0000
475 summary: a
475 summary: a
476
476
477 $ hg up 0
477 $ hg up 0
478 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
478 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
479 $ echo c > bar
479 $ echo c > bar
480 $ hg up -t false
480 $ hg up -t false
481 merging bar
481 merging bar
482 merging bar failed!
482 merging bar failed!
483 1 files updated, 0 files merged, 0 files removed, 1 files unresolved
483 1 files updated, 0 files merged, 0 files removed, 1 files unresolved
484 use 'hg resolve' to retry unresolved file merges
484 use 'hg resolve' to retry unresolved file merges
485 [1]
485 [1]
486 $ hg sum
486 $ hg sum
487 parent: 1:76dcf9fab855 tip
487 parent: 1:76dcf9fab855 tip
488 b
488 b
489 branch: default
489 branch: default
490 commit: 1 modified, 1 unknown, 1 unresolved
490 commit: 1 modified, 1 unknown, 1 unresolved
491 update: (current)
491 update: (current)
492 phases: 2 draft
492 phases: 2 draft
493 mq: 3 unapplied
493 mq: 3 unapplied
494
494
495 $ echo c > b
495 $ echo c > b
496 $ hg strip tip
496 $ hg strip tip
497 abort: local changes found
497 abort: local changes found
498 [255]
498 [255]
499 $ hg strip tip --keep
499 $ hg strip tip --keep
500 saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob)
500 saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob)
501 $ hg log --graph
501 $ hg log --graph
502 @ changeset: 0:9ab35a2d17cb
502 @ changeset: 0:9ab35a2d17cb
503 tag: tip
503 tag: tip
504 user: test
504 user: test
505 date: Thu Jan 01 00:00:00 1970 +0000
505 date: Thu Jan 01 00:00:00 1970 +0000
506 summary: a
506 summary: a
507
507
508 $ hg status
508 $ hg status
509 M bar
509 M bar
510 ? b
510 ? b
511 ? bar.orig
511 ? bar.orig
512
512
513 $ rm bar.orig
513 $ rm bar.orig
514 $ hg sum
514 $ hg sum
515 parent: 0:9ab35a2d17cb tip
515 parent: 0:9ab35a2d17cb tip
516 a
516 a
517 branch: default
517 branch: default
518 commit: 1 modified, 1 unknown
518 commit: 1 modified, 1 unknown
519 update: (current)
519 update: (current)
520 phases: 1 draft
520 phases: 1 draft
521 mq: 3 unapplied
521 mq: 3 unapplied
522
522
523 Strip adds, removes, modifies with --keep
523 Strip adds, removes, modifies with --keep
524
524
525 $ touch b
525 $ touch b
526 $ hg add b
526 $ hg add b
527 $ hg commit -mb
527 $ hg commit -mb
528 $ touch c
528 $ touch c
529
529
530 ... with a clean working dir
530 ... with a clean working dir
531
531
532 $ hg add c
532 $ hg add c
533 $ hg rm bar
533 $ hg rm bar
534 $ hg commit -mc
534 $ hg commit -mc
535 $ hg status
535 $ hg status
536 $ hg strip --keep tip
536 $ hg strip --keep tip
537 saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob)
537 saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob)
538 $ hg status
538 $ hg status
539 ! bar
539 ! bar
540 ? c
540 ? c
541
541
542 ... with a dirty working dir
542 ... with a dirty working dir
543
543
544 $ hg add c
544 $ hg add c
545 $ hg rm bar
545 $ hg rm bar
546 $ hg commit -mc
546 $ hg commit -mc
547 $ hg status
547 $ hg status
548 $ echo b > b
548 $ echo b > b
549 $ echo d > d
549 $ echo d > d
550 $ hg strip --keep tip
550 $ hg strip --keep tip
551 saved backup bundle to $TESTTMP/test/.hg/strip-backup/57e364c8a475-4cfed93c-backup.hg (glob)
551 saved backup bundle to $TESTTMP/test/.hg/strip-backup/57e364c8a475-4cfed93c-backup.hg (glob)
552 $ hg status
552 $ hg status
553 M b
553 M b
554 ! bar
554 ! bar
555 ? c
555 ? c
556 ? d
556 ? d
557 $ cd ..
557 $ cd ..
558
558
559 stripping many nodes on a complex graph (issue3299)
559 stripping many nodes on a complex graph (issue3299)
560
560
561 $ hg init issue3299
561 $ hg init issue3299
562 $ cd issue3299
562 $ cd issue3299
563 $ hg debugbuilddag '@a.:a@b.:b.:x<a@a.:a<b@b.:b<a@a.:a'
563 $ hg debugbuilddag '@a.:a@b.:b.:x<a@a.:a<b@b.:b<a@a.:a'
564 $ hg strip 'not ancestors(x)'
564 $ hg strip 'not ancestors(x)'
565 saved backup bundle to $TESTTMP/issue3299/.hg/strip-backup/*-backup.hg (glob)
565 saved backup bundle to $TESTTMP/issue3299/.hg/strip-backup/*-backup.hg (glob)
566
566
567 test hg strip -B bookmark
567 test hg strip -B bookmark
568
568
569 $ cd ..
569 $ cd ..
570 $ hg init bookmarks
570 $ hg init bookmarks
571 $ cd bookmarks
571 $ cd bookmarks
572 $ hg debugbuilddag '..<2.*1/2:m<2+3:c<m+3:a<2.:b'
572 $ hg debugbuilddag '..<2.*1/2:m<2+3:c<m+3:a<2.:b'
573 $ hg bookmark -r 'a' 'todelete'
573 $ hg bookmark -r 'a' 'todelete'
574 $ hg bookmark -r 'b' 'B'
574 $ hg bookmark -r 'b' 'B'
575 $ hg bookmark -r 'b' 'nostrip'
575 $ hg bookmark -r 'b' 'nostrip'
576 $ hg bookmark -r 'c' 'delete'
576 $ hg bookmark -r 'c' 'delete'
577 $ hg up -C todelete
577 $ hg up -C todelete
578 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
578 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
579 (activating bookmark todelete)
579 (activating bookmark todelete)
580 $ hg strip -B nostrip
580 $ hg strip -B nostrip
581 bookmark 'nostrip' deleted
581 bookmark 'nostrip' deleted
582 abort: empty revision set
582 abort: empty revision set
583 [255]
583 [255]
584 $ hg strip -B todelete
584 $ hg strip -B todelete
585 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
585 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
586 saved backup bundle to $TESTTMP/bookmarks/.hg/strip-backup/*-backup.hg (glob)
586 saved backup bundle to $TESTTMP/bookmarks/.hg/strip-backup/*-backup.hg (glob)
587 bookmark 'todelete' deleted
587 bookmark 'todelete' deleted
588 $ hg id -ir dcbb326fdec2
588 $ hg id -ir dcbb326fdec2
589 abort: unknown revision 'dcbb326fdec2'!
589 abort: unknown revision 'dcbb326fdec2'!
590 [255]
590 [255]
591 $ hg id -ir d62d843c9a01
591 $ hg id -ir d62d843c9a01
592 d62d843c9a01
592 d62d843c9a01
593 $ hg bookmarks
593 $ hg bookmarks
594 B 9:ff43616e5d0f
594 B 9:ff43616e5d0f
595 delete 6:2702dd0c91e7
595 delete 6:2702dd0c91e7
596 $ hg strip -B delete
596 $ hg strip -B delete
597 saved backup bundle to $TESTTMP/bookmarks/.hg/strip-backup/*-backup.hg (glob)
597 saved backup bundle to $TESTTMP/bookmarks/.hg/strip-backup/*-backup.hg (glob)
598 bookmark 'delete' deleted
598 bookmark 'delete' deleted
599 $ hg id -ir 6:2702dd0c91e7
599 $ hg id -ir 6:2702dd0c91e7
600 abort: unknown revision '2702dd0c91e7'!
600 abort: unknown revision '2702dd0c91e7'!
601 [255]
601 [255]
602 $ hg update B
602 $ hg update B
603 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
603 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
604 (activating bookmark B)
604 (activating bookmark B)
605 $ echo a > a
605 $ echo a > a
606 $ hg add a
606 $ hg add a
607 $ hg strip -B B
607 $ hg strip -B B
608 abort: local changes found
608 abort: local changes found
609 [255]
609 [255]
610 $ hg bookmarks
610 $ hg bookmarks
611 * B 6:ff43616e5d0f
611 * B 6:ff43616e5d0f
612
612
613 Make sure no one adds back a -b option:
613 Make sure no one adds back a -b option:
614
614
615 $ hg strip -b tip
615 $ hg strip -b tip
616 hg strip: option -b not recognized
616 hg strip: option -b not recognized
617 hg strip [-k] [-f] [-n] [-B bookmark] [-r] REV...
617 hg strip [-k] [-f] [-n] [-B bookmark] [-r] REV...
618
618
619 strip changesets and all their descendants from the repository
619 strip changesets and all their descendants from the repository
620
620
621 (use "hg help -e strip" to show help for the strip extension)
621 (use "hg help -e strip" to show help for the strip extension)
622
622
623 options ([+] can be repeated):
623 options ([+] can be repeated):
624
624
625 -r --rev REV [+] strip specified revision (optional, can specify revisions
625 -r --rev REV [+] strip specified revision (optional, can specify revisions
626 without this option)
626 without this option)
627 -f --force force removal of changesets, discard uncommitted changes
627 -f --force force removal of changesets, discard uncommitted changes
628 (no backup)
628 (no backup)
629 --no-backup no backups
629 --no-backup no backups
630 -k --keep do not modify working directory during strip
630 -k --keep do not modify working directory during strip
631 -B --bookmark VALUE remove revs only reachable from given bookmark
631 -B --bookmark VALUE remove revs only reachable from given bookmark
632 --mq operate on patch repository
632 --mq operate on patch repository
633
633
634 (use "hg strip -h" to show more help)
634 (use "hg strip -h" to show more help)
635 [255]
635 [255]
636
636
637 $ cd ..
637 $ cd ..
638
638
639 Verify bundles don't get overwritten:
639 Verify bundles don't get overwritten:
640
640
641 $ hg init doublebundle
641 $ hg init doublebundle
642 $ cd doublebundle
642 $ cd doublebundle
643 $ touch a
643 $ touch a
644 $ hg commit -Aqm a
644 $ hg commit -Aqm a
645 $ touch b
645 $ touch b
646 $ hg commit -Aqm b
646 $ hg commit -Aqm b
647 $ hg strip -r 0
647 $ hg strip -r 0
648 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
648 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
649 saved backup bundle to $TESTTMP/doublebundle/.hg/strip-backup/3903775176ed-e68910bd-backup.hg (glob)
649 saved backup bundle to $TESTTMP/doublebundle/.hg/strip-backup/3903775176ed-e68910bd-backup.hg (glob)
650 $ ls .hg/strip-backup
650 $ ls .hg/strip-backup
651 3903775176ed-e68910bd-backup.hg
651 3903775176ed-e68910bd-backup.hg
652 $ hg pull -q -r 3903775176ed .hg/strip-backup/3903775176ed-e68910bd-backup.hg
652 $ hg pull -q -r 3903775176ed .hg/strip-backup/3903775176ed-e68910bd-backup.hg
653 $ hg strip -r 0
653 $ hg strip -r 0
654 saved backup bundle to $TESTTMP/doublebundle/.hg/strip-backup/3903775176ed-54390173-backup.hg (glob)
654 saved backup bundle to $TESTTMP/doublebundle/.hg/strip-backup/3903775176ed-54390173-backup.hg (glob)
655 $ ls .hg/strip-backup
655 $ ls .hg/strip-backup
656 3903775176ed-54390173-backup.hg
656 3903775176ed-54390173-backup.hg
657 3903775176ed-e68910bd-backup.hg
657 3903775176ed-e68910bd-backup.hg
658 $ cd ..
658 $ cd ..
659
659
660 Test that we only bundle the stripped changesets (issue4736)
660 Test that we only bundle the stripped changesets (issue4736)
661 ------------------------------------------------------------
661 ------------------------------------------------------------
662
662
663 initialization (previous repo is empty anyway)
663 initialization (previous repo is empty anyway)
664
664
665 $ hg init issue4736
665 $ hg init issue4736
666 $ cd issue4736
666 $ cd issue4736
667 $ echo a > a
667 $ echo a > a
668 $ hg add a
668 $ hg add a
669 $ hg commit -m commitA
669 $ hg commit -m commitA
670 $ echo b > b
670 $ echo b > b
671 $ hg add b
671 $ hg add b
672 $ hg commit -m commitB
672 $ hg commit -m commitB
673 $ echo c > c
673 $ echo c > c
674 $ hg add c
674 $ hg add c
675 $ hg commit -m commitC
675 $ hg commit -m commitC
676 $ hg up 'desc(commitB)'
676 $ hg up 'desc(commitB)'
677 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
677 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
678 $ echo d > d
678 $ echo d > d
679 $ hg add d
679 $ hg add d
680 $ hg commit -m commitD
680 $ hg commit -m commitD
681 created new head
681 created new head
682 $ hg up 'desc(commitC)'
682 $ hg up 'desc(commitC)'
683 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
683 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
684 $ hg merge 'desc(commitD)'
684 $ hg merge 'desc(commitD)'
685 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
685 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
686 (branch merge, don't forget to commit)
686 (branch merge, don't forget to commit)
687 $ hg ci -m 'mergeCD'
687 $ hg ci -m 'mergeCD'
688 $ hg log -G
688 $ hg log -G
689 @ changeset: 4:d8db9d137221
689 @ changeset: 4:d8db9d137221
690 |\ tag: tip
690 |\ tag: tip
691 | | parent: 2:5c51d8d6557d
691 | | parent: 2:5c51d8d6557d
692 | | parent: 3:6625a5168474
692 | | parent: 3:6625a5168474
693 | | user: test
693 | | user: test
694 | | date: Thu Jan 01 00:00:00 1970 +0000
694 | | date: Thu Jan 01 00:00:00 1970 +0000
695 | | summary: mergeCD
695 | | summary: mergeCD
696 | |
696 | |
697 | o changeset: 3:6625a5168474
697 | o changeset: 3:6625a5168474
698 | | parent: 1:eca11cf91c71
698 | | parent: 1:eca11cf91c71
699 | | user: test
699 | | user: test
700 | | date: Thu Jan 01 00:00:00 1970 +0000
700 | | date: Thu Jan 01 00:00:00 1970 +0000
701 | | summary: commitD
701 | | summary: commitD
702 | |
702 | |
703 o | changeset: 2:5c51d8d6557d
703 o | changeset: 2:5c51d8d6557d
704 |/ user: test
704 |/ user: test
705 | date: Thu Jan 01 00:00:00 1970 +0000
705 | date: Thu Jan 01 00:00:00 1970 +0000
706 | summary: commitC
706 | summary: commitC
707 |
707 |
708 o changeset: 1:eca11cf91c71
708 o changeset: 1:eca11cf91c71
709 | user: test
709 | user: test
710 | date: Thu Jan 01 00:00:00 1970 +0000
710 | date: Thu Jan 01 00:00:00 1970 +0000
711 | summary: commitB
711 | summary: commitB
712 |
712 |
713 o changeset: 0:105141ef12d0
713 o changeset: 0:105141ef12d0
714 user: test
714 user: test
715 date: Thu Jan 01 00:00:00 1970 +0000
715 date: Thu Jan 01 00:00:00 1970 +0000
716 summary: commitA
716 summary: commitA
717
717
718
718
719 Check bundle behavior:
719 Check bundle behavior:
720
720
721 $ hg bundle -r 'desc(mergeCD)' --base 'desc(commitC)' ../issue4736.hg
721 $ hg bundle -r 'desc(mergeCD)' --base 'desc(commitC)' ../issue4736.hg
722 2 changesets found
722 2 changesets found
723 $ hg log -r 'bundle()' -R ../issue4736.hg
723 $ hg log -r 'bundle()' -R ../issue4736.hg
724 changeset: 3:6625a5168474
724 changeset: 3:6625a5168474
725 parent: 1:eca11cf91c71
725 parent: 1:eca11cf91c71
726 user: test
726 user: test
727 date: Thu Jan 01 00:00:00 1970 +0000
727 date: Thu Jan 01 00:00:00 1970 +0000
728 summary: commitD
728 summary: commitD
729
729
730 changeset: 4:d8db9d137221
730 changeset: 4:d8db9d137221
731 tag: tip
731 tag: tip
732 parent: 2:5c51d8d6557d
732 parent: 2:5c51d8d6557d
733 parent: 3:6625a5168474
733 parent: 3:6625a5168474
734 user: test
734 user: test
735 date: Thu Jan 01 00:00:00 1970 +0000
735 date: Thu Jan 01 00:00:00 1970 +0000
736 summary: mergeCD
736 summary: mergeCD
737
737
738
738
739 check strip behavior
739 check strip behavior
740
740
741 $ hg --config extensions.strip= strip 'desc(commitD)' --debug
741 $ hg --config extensions.strip= strip 'desc(commitD)' --debug
742 resolving manifests
742 resolving manifests
743 branchmerge: False, force: True, partial: False
743 branchmerge: False, force: True, partial: False
744 ancestor: d8db9d137221+, local: d8db9d137221+, remote: eca11cf91c71
744 ancestor: d8db9d137221+, local: d8db9d137221+, remote: eca11cf91c71
745 c: other deleted -> r
745 c: other deleted -> r
746 removing c
746 removing c
747 d: other deleted -> r
747 d: other deleted -> r
748 removing d
748 removing d
749 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
749 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
750 2 changesets found
750 2 changesets found
751 list of changesets:
751 list of changesets:
752 6625a516847449b6f0fa3737b9ba56e9f0f3032c
752 6625a516847449b6f0fa3737b9ba56e9f0f3032c
753 d8db9d1372214336d2b5570f20ee468d2c72fa8b
753 d8db9d1372214336d2b5570f20ee468d2c72fa8b
754 saved backup bundle to $TESTTMP/issue4736/.hg/strip-backup/6625a5168474-345bb43d-backup.hg (glob)
754 saved backup bundle to $TESTTMP/issue4736/.hg/strip-backup/6625a5168474-345bb43d-backup.hg (glob)
755 invalid branchheads cache (served): tip differs
755 invalid branchheads cache (served): tip differs
756 truncating cache/rbc-revs-v1 to 24
756 truncating cache/rbc-revs-v1 to 24
757 $ hg log -G
757 $ hg log -G
758 o changeset: 2:5c51d8d6557d
758 o changeset: 2:5c51d8d6557d
759 | tag: tip
759 | tag: tip
760 | user: test
760 | user: test
761 | date: Thu Jan 01 00:00:00 1970 +0000
761 | date: Thu Jan 01 00:00:00 1970 +0000
762 | summary: commitC
762 | summary: commitC
763 |
763 |
764 @ changeset: 1:eca11cf91c71
764 @ changeset: 1:eca11cf91c71
765 | user: test
765 | user: test
766 | date: Thu Jan 01 00:00:00 1970 +0000
766 | date: Thu Jan 01 00:00:00 1970 +0000
767 | summary: commitB
767 | summary: commitB
768 |
768 |
769 o changeset: 0:105141ef12d0
769 o changeset: 0:105141ef12d0
770 user: test
770 user: test
771 date: Thu Jan 01 00:00:00 1970 +0000
771 date: Thu Jan 01 00:00:00 1970 +0000
772 summary: commitA
772 summary: commitA
773
773
774
774
775 strip backup content
775 strip backup content
776
776
777 $ hg log -r 'bundle()' -R .hg/strip-backup/6625a5168474-*-backup.hg
777 $ hg log -r 'bundle()' -R .hg/strip-backup/6625a5168474-*-backup.hg
778 changeset: 3:6625a5168474
778 changeset: 3:6625a5168474
779 parent: 1:eca11cf91c71
779 parent: 1:eca11cf91c71
780 user: test
780 user: test
781 date: Thu Jan 01 00:00:00 1970 +0000
781 date: Thu Jan 01 00:00:00 1970 +0000
782 summary: commitD
782 summary: commitD
783
783
784 changeset: 4:d8db9d137221
784 changeset: 4:d8db9d137221
785 tag: tip
785 tag: tip
786 parent: 2:5c51d8d6557d
786 parent: 2:5c51d8d6557d
787 parent: 3:6625a5168474
787 parent: 3:6625a5168474
788 user: test
788 user: test
789 date: Thu Jan 01 00:00:00 1970 +0000
789 date: Thu Jan 01 00:00:00 1970 +0000
790 summary: mergeCD
790 summary: mergeCD
791
791
792
792
793 Error during post-close callback of the strip transaction
793 Error during post-close callback of the strip transaction
794 (They should be gracefully handled and reported)
794 (They should be gracefully handled and reported)
795
795
796 $ cat > ../crashstrip.py << EOF
796 $ cat > ../crashstrip.py << EOF
797 > from mercurial import error
797 > from mercurial import error
798 > def reposetup(ui, repo):
798 > def reposetup(ui, repo):
799 > class crashstriprepo(repo.__class__):
799 > class crashstriprepo(repo.__class__):
800 > def transaction(self, desc, *args, **kwargs):
800 > def transaction(self, desc, *args, **kwargs):
801 > tr = super(crashstriprepo, self).transaction(self, desc, *args, **kwargs)
801 > tr = super(crashstriprepo, self).transaction(self, desc, *args, **kwargs)
802 > if desc == 'strip':
802 > if desc == 'strip':
803 > def crash(tra): raise error.Abort('boom')
803 > def crash(tra): raise error.Abort('boom')
804 > tr.addpostclose('crash', crash)
804 > tr.addpostclose('crash', crash)
805 > return tr
805 > return tr
806 > repo.__class__ = crashstriprepo
806 > repo.__class__ = crashstriprepo
807 > EOF
807 > EOF
808 $ hg strip tip --config extensions.crash=$TESTTMP/crashstrip.py
808 $ hg strip tip --config extensions.crash=$TESTTMP/crashstrip.py
809 saved backup bundle to $TESTTMP/issue4736/.hg/strip-backup/5c51d8d6557d-70daef06-backup.hg (glob)
809 saved backup bundle to $TESTTMP/issue4736/.hg/strip-backup/5c51d8d6557d-70daef06-backup.hg (glob)
810 strip failed, full bundle stored in '$TESTTMP/issue4736/.hg/strip-backup/5c51d8d6557d-70daef06-backup.hg'
810 strip failed, full bundle stored in '$TESTTMP/issue4736/.hg/strip-backup/5c51d8d6557d-70daef06-backup.hg' (glob)
811 abort: boom
811 abort: boom
812 [255]
812 [255]
813
813
814
814
General Comments 0
You need to be logged in to leave comments. Login now