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