1 ==================================== |
|
2 Testing head checking code: Case B-5 |
|
3 ==================================== |
|
4 |
|
5 Mercurial checks for the introduction of multiple heads on push. Evolution |
|
6 comes into play to detect if existing heads on the server are being replaced by |
|
7 some of the new heads we push. |
|
8 |
|
9 This test file is part of a series of tests checking this behavior. |
|
10 |
|
11 Category B: checking 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/checkheads-util.sh |
|
39 |
|
40 Test setup |
|
41 ---------- |
|
42 |
|
43 $ setuprepos |
|
44 creating basic server and client repo |
|
45 updating to branch default |
|
46 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
47 $ cd server |
|
48 $ mkcommit B0 |
|
49 $ mkcommit C0 |
|
50 $ cd ../client |
|
51 $ hg pull |
|
52 pulling from $TESTTMP/server |
|
53 searching for changes |
|
54 adding changesets |
|
55 adding manifests |
|
56 adding file changes |
|
57 added 2 changesets with 2 changes to 2 files |
|
58 (run 'hg update' to get a working copy) |
|
59 $ hg up 0 |
|
60 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
61 $ mkcommit B1 |
|
62 created new head |
|
63 $ hg debugobsolete --record-parents `getid "desc(A0)"` |
|
64 $ hg debugobsolete `getid "desc(B0)"` `getid "desc(B1)"` |
|
65 $ hg debugobsolete --record-parents `getid "desc(C0)"` |
|
66 $ hg log -G --hidden |
|
67 @ 25c56d33e4c4 (draft): B1 |
|
68 | |
|
69 | x 821fb21d0dd2 (draft): C0 |
|
70 | | |
|
71 | x d73caddc5533 (draft): B0 |
|
72 | | |
|
73 | x 8aaa48160adc (draft): A0 |
|
74 |/ |
|
75 o 1e4be0697311 (public): root |
|
76 |
|
77 |
|
78 Actual testing |
|
79 -------------- |
|
80 |
|
81 $ hg push |
|
82 pushing to $TESTTMP/server |
|
83 searching for changes |
|
84 adding changesets |
|
85 adding manifests |
|
86 adding file changes |
|
87 added 1 changesets with 1 changes to 1 files (+1 heads) |
|
88 3 new obsolescence markers |
|
89 |
|