1 ==================================== |
|
2 Testing head checking code: Case A-3 |
|
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 A: checking simple case invoving a branch being superceeded by another. |
|
12 TestCase 3: multi-changeset branch with reordering |
|
13 |
|
14 Push should be allowed |
|
15 .. old-state: |
|
16 .. |
|
17 .. * 2 changeset branch |
|
18 .. |
|
19 .. new-state: |
|
20 .. |
|
21 .. * 2 changeset branch succeeding the old one with reordering |
|
22 .. |
|
23 .. expected-result: |
|
24 .. |
|
25 .. * push allowed |
|
26 .. |
|
27 .. graph-summary: |
|
28 .. |
|
29 .. B ø⇠⇠ |
|
30 .. | ⇡ |
|
31 .. A ø⇠⇠⇠○ A' |
|
32 .. | ⇡/ |
|
33 .. | ○ B' |
|
34 .. |/ |
|
35 .. ● O |
|
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 server |
|
47 $ mkcommit B0 |
|
48 $ cd ../client |
|
49 $ hg pull |
|
50 pulling from $TESTTMP/server |
|
51 searching for changes |
|
52 adding changesets |
|
53 adding manifests |
|
54 adding file changes |
|
55 added 1 changesets with 1 changes to 1 files |
|
56 (run 'hg update' to get a working copy) |
|
57 $ hg up 0 |
|
58 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
59 $ mkcommit B1 |
|
60 created new head |
|
61 $ mkcommit A1 |
|
62 $ hg debugobsolete `getid "desc(A0)" ` `getid "desc(A1)"` |
|
63 $ hg debugobsolete `getid "desc(B0)" ` `getid "desc(B1)"` |
|
64 $ hg log -G --hidden |
|
65 @ c1c7524e9488 (draft): A1 |
|
66 | |
|
67 o 25c56d33e4c4 (draft): B1 |
|
68 | |
|
69 | x d73caddc5533 (draft): B0 |
|
70 | | |
|
71 | x 8aaa48160adc (draft): A0 |
|
72 |/ |
|
73 o 1e4be0697311 (public): root |
|
74 |
|
75 |
|
76 |
|
77 Actual testing |
|
78 -------------- |
|
79 |
|
80 $ hg push |
|
81 pushing to $TESTTMP/server |
|
82 searching for changes |
|
83 adding changesets |
|
84 adding manifests |
|
85 adding file changes |
|
86 added 2 changesets with 2 changes to 2 files (+1 heads) |
|
87 2 new obsolescence markers |
|