equal
deleted
inserted
replaced
1 $ cat >> $HGRCPATH <<EOF |
1 $ cat >> $HGRCPATH <<EOF |
2 > [extensions] |
2 > [extensions] |
3 > graphlog= |
3 > graphlog= |
4 > rebase= |
4 > rebase= |
|
5 > mq= |
5 > |
6 > |
6 > [phases] |
7 > [phases] |
7 > publish=False |
8 > publish=False |
8 > |
9 > |
9 > [alias] |
10 > [alias] |
255 E |
256 E |
256 F |
257 F |
257 H |
258 H |
258 |
259 |
259 $ cd .. |
260 $ cd .. |
|
261 |
|
262 |
|
263 |
|
264 |
|
265 Test that branchheads cache is updated correctly when doing a strip in which |
|
266 the parent of the ancestor node to be stripped does not become a head and |
|
267 also, the parent of a node that is a child of the node stripped becomes a head |
|
268 (node 3). |
|
269 |
|
270 $ hg clone -q -u . b b2 |
|
271 $ cd b2 |
|
272 |
|
273 $ hg heads --template="{rev}:{node} {branch}\n" |
|
274 7:c65502d4178782309ce0574c5ae6ee9485a9bafa default |
|
275 6:c772a8b2dc17629cec88a19d09c926c4814b12c7 default |
|
276 |
|
277 $ cat $TESTTMP/b2/.hg/cache/branchheads |
|
278 c65502d4178782309ce0574c5ae6ee9485a9bafa 7 |
|
279 c772a8b2dc17629cec88a19d09c926c4814b12c7 default |
|
280 c65502d4178782309ce0574c5ae6ee9485a9bafa default |
|
281 |
|
282 $ hg strip 4 |
|
283 saved backup bundle to $TESTTMP/b2/.hg/strip-backup/8a5212ebc852-backup.hg |
|
284 |
|
285 $ cat $TESTTMP/b2/.hg/cache/branchheads |
|
286 c65502d4178782309ce0574c5ae6ee9485a9bafa 4 |
|
287 2870ad076e541e714f3c2bc32826b5c6a6e5b040 default |
|
288 c65502d4178782309ce0574c5ae6ee9485a9bafa default |
|
289 |
|
290 $ hg heads --template="{rev}:{node} {branch}\n" |
|
291 4:c65502d4178782309ce0574c5ae6ee9485a9bafa default |
|
292 3:2870ad076e541e714f3c2bc32826b5c6a6e5b040 default |
|
293 |
|
294 $ cd .. |
|
295 |
|
296 |
|
297 |
|
298 |
260 |
299 |
261 |
300 |
262 Create repo c: |
301 Create repo c: |
263 |
302 |
264 $ hg init c |
303 $ hg init c |
626 a |
665 a |
627 $ cat g |
666 $ cat g |
628 b |
667 b |
629 b |
668 b |
630 $ cd .. |
669 $ cd .. |
|
670 |
|
671 |
|
672 Test stripping a revision with another child |
|
673 |
|
674 $ hg init f |
|
675 $ cd f |
|
676 |
|
677 $ echo A > A |
|
678 $ hg ci -Am A |
|
679 adding A |
|
680 $ echo B > B |
|
681 $ hg ci -Am B |
|
682 adding B |
|
683 |
|
684 $ hg up -q 0 |
|
685 |
|
686 $ echo C > C |
|
687 $ hg ci -Am C |
|
688 adding C |
|
689 created new head |
|
690 |
|
691 $ hg tglog |
|
692 @ 2: 'C' |
|
693 | |
|
694 | o 1: 'B' |
|
695 |/ |
|
696 o 0: 'A' |
|
697 |
|
698 |
|
699 |
|
700 $ hg heads --template="{rev}:{node} {branch}: {desc}\n" |
|
701 2:c5cefa58fd557f84b72b87f970135984337acbc5 default: C |
|
702 1:27547f69f25460a52fff66ad004e58da7ad3fb56 default: B |
|
703 |
|
704 $ hg strip 2 |
|
705 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
706 saved backup bundle to $TESTTMP/f/.hg/strip-backup/*-backup.hg (glob) |
|
707 |
|
708 $ hg tglog |
|
709 o 1: 'B' |
|
710 | |
|
711 @ 0: 'A' |
|
712 |
|
713 |
|
714 |
|
715 $ hg heads --template="{rev}:{node} {branch}: {desc}\n" |
|
716 1:27547f69f25460a52fff66ad004e58da7ad3fb56 default: B |
|
717 |
|
718 $ cd .. |
|
719 |
|
720 |
|
721 |
|
722 |