|
1 ==================================== |
|
2 Testing head checking code: Case B-5 |
|
3 ==================================== |
|
4 |
|
5 Mercurial checks for the introduction of new heads on push. Evolution comes |
|
6 into play to detect if existing branches on the server are being replaced by |
|
7 some of the new one we push. |
|
8 |
|
9 This case is part of a series of tests checking this behavior. |
|
10 |
|
11 Category B: simple case involving pruned changesets |
|
12 TestCase 5: multi-changeset branch, mix of pruned and superceeded |
|
13 |
|
14 .. old-state: |
|
15 .. |
|
16 .. * 3 changeset branch |
|
17 .. |
|
18 .. new-state: |
|
19 .. |
|
20 .. * old head is pruned |
|
21 .. * old mid is superceeded |
|
22 .. * old root is pruned |
|
23 .. |
|
24 .. expected-result: |
|
25 .. |
|
26 .. * push allowed |
|
27 .. |
|
28 .. graph-summary: |
|
29 .. |
|
30 .. B ⊗ |
|
31 .. | |
|
32 .. A ø⇠◔ A' |
|
33 .. | | |
|
34 .. B ⊗ | |
|
35 .. |/ |
|
36 .. ● |
|
37 |
|
38 $ . $TESTDIR/testlib/push-checkheads-util.sh |
|
39 |
|
40 Test setup |
|
41 ---------- |
|
42 |
|
43 $ mkdir B5 |
|
44 $ cd B5 |
|
45 $ setuprepos |
|
46 creating basic server and client repo |
|
47 updating to branch default |
|
48 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
49 $ cd server |
|
50 $ mkcommit B0 |
|
51 $ mkcommit C0 |
|
52 $ cd ../client |
|
53 $ hg pull |
|
54 pulling from $TESTTMP/B5/server (glob) |
|
55 searching for changes |
|
56 adding changesets |
|
57 adding manifests |
|
58 adding file changes |
|
59 added 2 changesets with 2 changes to 2 files |
|
60 (run 'hg update' to get a working copy) |
|
61 $ hg up 0 |
|
62 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
63 $ mkcommit B1 |
|
64 created new head |
|
65 $ hg debugobsolete --record-parents `getid "desc(A0)"` |
|
66 $ hg debugobsolete `getid "desc(B0)"` `getid "desc(B1)"` |
|
67 $ hg debugobsolete --record-parents `getid "desc(C0)"` |
|
68 $ hg log -G --hidden |
|
69 @ 25c56d33e4c4 (draft): B1 |
|
70 | |
|
71 | x 821fb21d0dd2 (draft): C0 |
|
72 | | |
|
73 | x d73caddc5533 (draft): B0 |
|
74 | | |
|
75 | x 8aaa48160adc (draft): A0 |
|
76 |/ |
|
77 o 1e4be0697311 (public): root |
|
78 |
|
79 |
|
80 Actual testing |
|
81 -------------- |
|
82 |
|
83 $ hg push |
|
84 pushing to $TESTTMP/B5/server (glob) |
|
85 searching for changes |
|
86 adding changesets |
|
87 adding manifests |
|
88 adding file changes |
|
89 added 1 changesets with 1 changes to 1 files (+1 heads) |
|
90 3 new obsolescence markers |
|
91 |
|
92 $ cd ../.. |