comparison tests/test-inhibit.t @ 1333:dffdd0dbe780

inhbit: make tests work with evolution.createmarkers config Before this patch, the test for inhibit was assuming evolve fully running. For most of the features that inhbit enables, createmarkers is sufficient. This patch makes the test of inhibit run with the createmarkers config and only lifts it for operations in the middle of the stack.
author Laurent Charignon <lcharignon@fb.com>
date Tue, 12 May 2015 12:26:46 -0700
parents 1ed337c7f061
children b8f880d4171d
comparison
equal deleted inserted replaced
1332:1ed337c7f061 1333:dffdd0dbe780
1 $ cat >> $HGRCPATH <<EOF 1 $ cat >> $HGRCPATH <<EOF
2 > [ui] 2 > [ui]
3 > logtemplate = {rev}:{node|short} {desc}\n 3 > logtemplate = {rev}:{node|short} {desc}\n
4 > [experimental]
5 > prunestrip=True
6 > evolution=createmarkers
4 > [extensions] 7 > [extensions]
5 > rebase= 8 > rebase=
9 > strip=
6 > EOF 10 > EOF
7 $ echo "evolve=$(echo $(dirname $TESTDIR))/hgext/evolve.py" >> $HGRCPATH 11 $ echo "evolve=$(echo $(dirname $TESTDIR))/hgext/evolve.py" >> $HGRCPATH
8 $ echo "inhibit=$(echo $(dirname $TESTDIR))/hgext/inhibit.py" >> $HGRCPATH 12 $ echo "inhibit=$(echo $(dirname $TESTDIR))/hgext/inhibit.py" >> $HGRCPATH
9 $ mkcommit() { 13 $ mkcommit() {
10 > echo "$1" > "$1" 14 > echo "$1" > "$1"
43 o 0:54ccbc537fc2 add cA 47 o 0:54ccbc537fc2 add cA
44 48
45 49
46 plain prune 50 plain prune
47 51
48 $ hg prune 1:: 52 $ hg strip 1::
49 3 changesets pruned 53 3 changesets pruned
50 $ hg log -G 54 $ hg log -G
51 @ 7:18214586bf78 add cJ 55 @ 7:18214586bf78 add cJ
52 | 56 |
53 o 6:cf5c4f4554ce add cH 57 o 6:cf5c4f4554ce add cH
74 | | 78 | |
75 | o 1:02bcbc3f6e56 add cB 79 | o 1:02bcbc3f6e56 add cB
76 |/ 80 |/
77 o 0:54ccbc537fc2 add cA 81 o 0:54ccbc537fc2 add cA
78 82
79 $ hg prune --hidden 1:: 83 $ hg strip --hidden 1::
80 3 changesets pruned 84 3 changesets pruned
81 $ hg log -G 85 $ hg log -G
82 @ 7:18214586bf78 add cJ 86 @ 7:18214586bf78 add cJ
83 | 87 |
84 o 6:cf5c4f4554ce add cH 88 o 6:cf5c4f4554ce add cH
91 95
92 96
93 after amend 97 after amend
94 98
95 $ echo babar > cJ 99 $ echo babar > cJ
96 $ hg amend 100 $ hg commit --amend
97 $ hg log -G 101 $ hg log -G
98 @ 9:55c73a90e4b4 add cJ 102 @ 9:55c73a90e4b4 add cJ
99 | 103 |
100 o 6:cf5c4f4554ce add cH 104 o 6:cf5c4f4554ce add cH
101 | 105 |
132 check public revision got cleared 136 check public revision got cleared
133 (when adding the second inhibitor, the first one is removed because it is public) 137 (when adding the second inhibitor, the first one is removed because it is public)
134 138
135 $ wc -m .hg/store/obsinhibit | sed -e 's/^[ \t]*//' 139 $ wc -m .hg/store/obsinhibit | sed -e 's/^[ \t]*//'
136 20 .hg/store/obsinhibit 140 20 .hg/store/obsinhibit
137 $ hg prune 7 141 $ hg strip 7
138 1 changesets pruned 142 1 changesets pruned
139 $ hg debugobsinhibit --hidden 18214586bf78 143 $ hg debugobsinhibit --hidden 18214586bf78
140 $ wc -m .hg/store/obsinhibit | sed -e 's/^[ \t]*//' 144 $ wc -m .hg/store/obsinhibit | sed -e 's/^[ \t]*//'
141 20 .hg/store/obsinhibit 145 20 .hg/store/obsinhibit
142 $ hg log -G 146 $ hg log -G
151 o 4:98065434e5c6 add cE 155 o 4:98065434e5c6 add cE
152 | 156 |
153 o 0:54ccbc537fc2 add cA 157 o 0:54ccbc537fc2 add cA
154 158
155 $ hg phase --public 7 159 $ hg phase --public 7
156 $ hg prune 9 160 $ hg strip 9
157 0 files updated, 0 files merged, 1 files removed, 0 files unresolved 161 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
158 working directory now at cf5c4f4554ce 162 working directory now at cf5c4f4554ce
159 1 changesets pruned 163 1 changesets pruned
160 $ hg log -G 164 $ hg log -G
161 o 7:18214586bf78 add cJ 165 o 7:18214586bf78 add cJ
223 | | 227 | |
224 | o 1:02bcbc3f6e56 add cB 228 | o 1:02bcbc3f6e56 add cB
225 |/ 229 |/
226 o 0:54ccbc537fc2 add cA 230 o 0:54ccbc537fc2 add cA
227 231
228 $ hg prune --hidden 1:: 232 $ hg strip --hidden 1::
229 3 changesets pruned 233 3 changesets pruned
230 $ hg log -G 234 $ hg log -G
231 @ 9:55c73a90e4b4 add cJ 235 @ 9:55c73a90e4b4 add cJ
232 | 236 |
233 | o 7:18214586bf78 add cJ 237 | o 7:18214586bf78 add cJ
375 | | 379 | |
376 | o 4:98065434e5c6 add cE 380 | o 4:98065434e5c6 add cE
377 |/ 381 |/
378 o 0:54ccbc537fc2 add cA 382 o 0:54ccbc537fc2 add cA
379 383
380 $ hg prune 10: 384 $ hg strip --hidden 10:
381 2 changesets pruned 385 2 changesets pruned
382 $ hg log -G 386 $ hg log -G
383 @ 9:55c73a90e4b4 add cJ 387 @ 9:55c73a90e4b4 add cJ
384 | 388 |
385 | o 7:18214586bf78 add cJ 389 | o 7:18214586bf78 add cJ
421 o | 1:02bcbc3f6e56 add cB 425 o | 1:02bcbc3f6e56 add cB
422 |/ 426 |/
423 o 0:54ccbc537fc2 add cA 427 o 0:54ccbc537fc2 add cA
424 428
425 Check that amending in the middle of a stack does not show obsolete revs 429 Check that amending in the middle of a stack does not show obsolete revs
426 430 Since we are doing operation in the middle of the stack we cannot just
427 $ hg prune 1:: 431 have createmarkers as we are creating instability
432
433 $ cat >> $HGRCPATH <<EOF
434 > [experimental]
435 > evolution=all
436 > EOF
437
438 $ hg strip --hidden 1::
428 5 changesets pruned 439 5 changesets pruned
429 $ hg log -G 440 $ hg log -G
430 @ 9:55c73a90e4b4 add cJ 441 @ 9:55c73a90e4b4 add cJ
431 | 442 |
432 | o 7:18214586bf78 add cJ 443 | o 7:18214586bf78 add cJ
501 | | 512 | |
502 | o 15:2d66e189f5b5 add cM 513 | o 15:2d66e189f5b5 add cM
503 |/ 514 |/
504 o 14:d66ccb8c5871 add cL 515 o 14:d66ccb8c5871 add cL
505 | 516 |
506 $ hg prune -r 104eed5354c7 517 $ hg strip -r 104eed5354c7
507 1 changesets pruned 518 1 changesets pruned
508 $ hg rebase -d 18 -r 16 --keep 519 $ hg rebase -d 18 -r 16 --keep
509 rebasing 16:a438c045eb37 "add cN" 520 rebasing 16:a438c045eb37 "add cN"
510 $ hg log -r 14:: -G 521 $ hg log -r 14:: -G
511 o 19:104eed5354c7 add cN 522 o 19:104eed5354c7 add cN
520 | 531 |
521 532
522 Test prunestrip 533 Test prunestrip
523 534
524 $ hg book foo -r 104eed5354c7 535 $ hg book foo -r 104eed5354c7
525 $ hg strip -r 210589181b14 --config experimental.prunestrip=True --config extensions.strip= 536 $ hg strip -r 210589181b14
526 0 files updated, 0 files merged, 1 files removed, 0 files unresolved 537 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
527 working directory now at d66ccb8c5871 538 working directory now at d66ccb8c5871
528 2 changesets pruned 539 2 changesets pruned
529 $ hg log -r 14:: -G -T '{rev}:{node|short} {desc|firstline} {bookmarks}\n' 540 $ hg log -r 14:: -G -T '{rev}:{node|short} {desc|firstline} {bookmarks}\n'
530 o 16:a438c045eb37 add cN 541 o 16:a438c045eb37 add cN