1 ==================================== |
|
2 Testing head checking code: Case B-2 |
|
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 2: multi-changeset branch, head is pruned, rest is superceeded |
|
13 |
|
14 .. old-state: |
|
15 .. |
|
16 .. * 2 changeset branch |
|
17 .. |
|
18 .. new-state: |
|
19 .. |
|
20 .. * old head is pruned |
|
21 .. * 1 new branch succeeding to the other changeset in the old branch |
|
22 .. |
|
23 .. expected-result: |
|
24 .. |
|
25 .. * push allowed |
|
26 .. |
|
27 .. graph-summary: |
|
28 .. |
|
29 .. B ⊗ |
|
30 .. | |
|
31 .. A ø⇠◔ A' |
|
32 .. |/ |
|
33 .. ○ |
|
34 |
|
35 $ . $TESTDIR/testlib/checkheads-util.sh |
|
36 |
|
37 Test setup |
|
38 ---------- |
|
39 |
|
40 $ setuprepos |
|
41 creating basic server and client repo |
|
42 updating to branch default |
|
43 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
44 $ cd server |
|
45 $ mkcommit B0 |
|
46 $ cd ../client |
|
47 $ hg pull |
|
48 pulling from $TESTTMP/server |
|
49 searching for changes |
|
50 adding changesets |
|
51 adding manifests |
|
52 adding file changes |
|
53 added 1 changesets with 1 changes to 1 files |
|
54 (run 'hg update' to get a working copy) |
|
55 $ hg up 0 |
|
56 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
57 $ mkcommit A1 |
|
58 created new head |
|
59 $ hg debugobsolete `getid "desc(A0)" ` `getid "desc(A1)"` |
|
60 $ hg debugobsolete --record-parents `getid "desc(B0)"` |
|
61 $ hg log -G --hidden |
|
62 @ f6082bc4ffef (draft): A1 |
|
63 | |
|
64 | x d73caddc5533 (draft): B0 |
|
65 | | |
|
66 | x 8aaa48160adc (draft): A0 |
|
67 |/ |
|
68 o 1e4be0697311 (public): root |
|
69 |
|
70 |
|
71 Actual testing |
|
72 -------------- |
|
73 |
|
74 $ hg push |
|
75 pushing to $TESTTMP/server |
|
76 searching for changes |
|
77 adding changesets |
|
78 adding manifests |
|
79 adding file changes |
|
80 added 1 changesets with 1 changes to 1 files (+1 heads) |
|
81 2 new obsolescence markers |
|
82 |
|