|
1 ==================================== |
|
2 Testing head checking code: Case D-7 |
|
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 D: remote head is "obs-affected" locally, but result is not part of the push. |
|
12 TestCase 7: single changesets, superseeded multiple time then pruned (on a new changeset unpushed) changeset |
|
13 |
|
14 This is a partial push variation of B6 |
|
15 |
|
16 .. old-state: |
|
17 .. |
|
18 .. * 1 changeset branch |
|
19 .. |
|
20 .. new-state: |
|
21 .. |
|
22 .. * old branch is rewritten onto another one, |
|
23 .. * The rewriting it again rewritten on the root |
|
24 .. * the new version is then pruned. |
|
25 .. |
|
26 .. expected-result: |
|
27 .. |
|
28 .. * push allowed |
|
29 .. |
|
30 .. graph-summary: |
|
31 .. |
|
32 .. A' |
|
33 .. A ø⇠ø⇠⊗ A'' |
|
34 .. | | | |
|
35 .. C ◔ | ◔ | B |
|
36 .. \|/ / |
|
37 .. | / |
|
38 .. |/ |
|
39 .. | |
|
40 .. ● |
|
41 |
|
42 $ . $TESTDIR/testlib/checkheads-util.sh |
|
43 |
|
44 Test setup |
|
45 ---------- |
|
46 |
|
47 $ setuprepos |
|
48 creating basic server and client repo |
|
49 updating to branch default |
|
50 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
51 $ cd client |
|
52 $ hg up 0 |
|
53 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
54 $ mkcommit B0 |
|
55 created new head |
|
56 $ mkcommit A1 |
|
57 $ hg up '0' |
|
58 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
59 $ mkcommit A2 |
|
60 created new head |
|
61 $ hg up '0' |
|
62 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
63 $ mkcommit C0 |
|
64 created new head |
|
65 $ hg debugobsolete `getid "desc(A0)"` `getid "desc(A1)"` |
|
66 $ hg debugobsolete `getid "desc(A1)"` `getid "desc(A2)"` |
|
67 $ hg debugobsolete --record-parents `getid "desc(A2)"` |
|
68 $ hg log -G --hidden |
|
69 @ 0f88766e02d6 (draft): C0 |
|
70 | |
|
71 | x c1f8d089020f (draft): A2 |
|
72 |/ |
|
73 | x ba93660aff8d (draft): A1 |
|
74 | | |
|
75 | o 74ff5441d343 (draft): B0 |
|
76 |/ |
|
77 | x 8aaa48160adc (draft): A0 |
|
78 |/ |
|
79 o 1e4be0697311 (public): root |
|
80 |
|
81 |
|
82 Actual testing |
|
83 -------------- |
|
84 |
|
85 $ hg push --rev 'desc(C0)' |
|
86 pushing to $TESTTMP/server |
|
87 searching for changes |
|
88 adding changesets |
|
89 adding manifests |
|
90 adding file changes |
|
91 added 1 changesets with 1 changes to 1 files (+1 heads) |
|
92 3 new obsolescence markers |