260 |/ |
261 |/ |
261 o 0: 'A' |
262 o 0: 'A' |
262 |
263 |
263 $ hg verify -q |
264 $ hg verify -q |
264 |
265 |
|
266 Stripping multiple branches in one go bypasses the fast-case code to |
|
267 update the branch cache. |
|
268 |
|
269 $ hg strip 2 |
|
270 0 files updated, 0 files merged, 4 files removed, 0 files unresolved |
|
271 saved backup bundle to $TESTTMP/a3/.hg/strip-backup/*-backup.hg (glob) |
|
272 |
|
273 $ hg tglog |
|
274 o 3: 'C' branch2 |
|
275 | |
|
276 o 2: 'branch2' branch2 |
|
277 | |
|
278 | @ 1: 'branch1' branch1 |
|
279 |/ |
|
280 o 0: 'A' |
|
281 |
|
282 |
|
283 $ hg branches |
|
284 branch2 3:e4fdb121d036 |
|
285 branch1 1:63379ac49655 |
|
286 default 0:1994f17a630e (inactive) |
|
287 |
|
288 $ hg theads |
|
289 3: 'C' branch2 |
|
290 1: 'branch1' branch1 |
|
291 0: 'A' |
|
292 |
|
293 Fast path branchcache code should not be invoked if branches stripped is not |
|
294 the same as branches remaining. |
|
295 |
|
296 $ hg init b |
|
297 $ cd b |
|
298 |
|
299 $ hg branch branch1 |
|
300 marked working directory as branch branch1 |
|
301 (branches are permanent and global, did you want a bookmark?) |
|
302 $ hg ci -m 'branch1' |
|
303 |
|
304 $ hg branch branch2 |
|
305 marked working directory as branch branch2 |
|
306 (branches are permanent and global, did you want a bookmark?) |
|
307 $ hg ci -m 'branch2' |
|
308 |
|
309 $ hg branch -f branch1 |
|
310 marked working directory as branch branch1 |
|
311 (branches are permanent and global, did you want a bookmark?) |
|
312 |
|
313 $ echo a > A |
|
314 $ hg ci -Am A |
|
315 adding A |
|
316 created new head |
|
317 |
|
318 $ hg tglog |
|
319 @ 2: 'A' branch1 |
|
320 | |
|
321 o 1: 'branch2' branch2 |
|
322 | |
|
323 o 0: 'branch1' branch1 |
|
324 |
|
325 |
|
326 $ hg theads |
|
327 2: 'A' branch1 |
|
328 1: 'branch2' branch2 |
|
329 |
|
330 $ hg strip 2 |
|
331 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
332 saved backup bundle to $TESTTMP/a3/b/.hg/strip-backup/*-backup.hg (glob) |
|
333 |
|
334 $ hg theads |
|
335 1: 'branch2' branch2 |
|
336 0: 'branch1' branch1 |
|
337 |
|
338 |
|
339 Make sure requesting to strip a revision already stripped does not confuse things. |
|
340 Try both orders. |
|
341 |
265 $ cd .. |
342 $ cd .. |
|
343 |
|
344 $ hg init c |
|
345 $ cd c |
|
346 |
|
347 $ echo a > a |
|
348 $ hg ci -Am A |
|
349 adding a |
|
350 $ echo b > b |
|
351 $ hg ci -Am B |
|
352 adding b |
|
353 $ echo c > c |
|
354 $ hg ci -Am C |
|
355 adding c |
|
356 $ echo d > d |
|
357 $ hg ci -Am D |
|
358 adding d |
|
359 $ echo e > e |
|
360 $ hg ci -Am E |
|
361 adding e |
|
362 |
|
363 $ hg tglog |
|
364 @ 4: 'E' |
|
365 | |
|
366 o 3: 'D' |
|
367 | |
|
368 o 2: 'C' |
|
369 | |
|
370 o 1: 'B' |
|
371 | |
|
372 o 0: 'A' |
|
373 |
|
374 |
|
375 $ hg strip 3 4 |
|
376 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
377 saved backup bundle to $TESTTMP/a3/c/.hg/strip-backup/*-backup.hg (glob) |
|
378 |
|
379 $ hg theads |
|
380 2: 'C' |
|
381 |
|
382 $ hg strip 2 1 |
|
383 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
384 saved backup bundle to $TESTTMP/a3/c/.hg/strip-backup/*-backup.hg (glob) |
|
385 |
|
386 $ hg theads |
|
387 0: 'A' |