1 ==================================== |
|
2 Testing head checking code: Case D-6 |
|
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 6: single changesets, superseeded 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 new version is then pruned. |
|
24 .. |
|
25 .. expected-result: |
|
26 .. |
|
27 .. * push denied |
|
28 .. |
|
29 .. graph-summary: |
|
30 .. |
|
31 .. A ø⇠⊗ A' |
|
32 .. | | |
|
33 .. C ◔ | ◔ B |
|
34 .. \|/ |
|
35 .. ● |
|
36 |
|
37 $ . $TESTDIR/testlib/checkheads-util.sh |
|
38 |
|
39 Test setup |
|
40 ---------- |
|
41 |
|
42 $ setuprepos |
|
43 creating basic server and client repo |
|
44 updating to branch default |
|
45 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
46 $ cd client |
|
47 $ hg up 0 |
|
48 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
49 $ mkcommit B0 |
|
50 created new head |
|
51 $ mkcommit A1 |
|
52 $ hg up '0' |
|
53 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
54 $ mkcommit C0 |
|
55 created new head |
|
56 $ hg debugobsolete `getid "desc(A0)"` `getid "desc(A1)"` |
|
57 $ hg debugobsolete --record-parents `getid "desc(A1)"` |
|
58 $ hg log -G --hidden |
|
59 @ 0f88766e02d6 (draft): C0 |
|
60 | |
|
61 | x ba93660aff8d (draft): A1 |
|
62 | | |
|
63 | o 74ff5441d343 (draft): B0 |
|
64 |/ |
|
65 | x 8aaa48160adc (draft): A0 |
|
66 |/ |
|
67 o 1e4be0697311 (public): root |
|
68 |
|
69 |
|
70 Actual testing |
|
71 -------------- |
|
72 |
|
73 $ hg push --rev 'desc(C0)' |
|
74 pushing to $TESTTMP/server |
|
75 searching for changes |
|
76 abort: push creates new remote head 0f88766e02d6! |
|
77 (merge or see 'hg help push' for details about pushing new heads) |
|
78 [255] |
|