Show More
@@ -0,0 +1,98 b'' | |||||
|
1 | ==================================== | |||
|
2 | Testing head checking code: Case A-6 | |||
|
3 | ==================================== | |||
|
4 | ||||
|
5 | Mercurial checks for the introduction of new heads on push. Evolution comes | |||
|
6 | into play to detect if existing branches on the server are being replaced by | |||
|
7 | some of the new one we push. | |||
|
8 | ||||
|
9 | This case is part of a series of tests checking this behavior. | |||
|
10 | ||||
|
11 | Category A: simple case involving a branch being superceeded by another. | |||
|
12 | TestCase 6: multi-changeset branch, split on multiple other, (base on its own branch), same number of head | |||
|
13 | ||||
|
14 | .. old-state: | |||
|
15 | .. | |||
|
16 | .. * 2 branch (1-changeset, and 2-changesets) | |||
|
17 | .. | |||
|
18 | .. new-state: | |||
|
19 | .. | |||
|
20 | .. * 1 new branch superceeding the base of the old-2-changesets-branch, | |||
|
21 | .. * 1 new changesets on the old-1-changeset-branch superceeding the head of the other | |||
|
22 | .. | |||
|
23 | .. expected-result: | |||
|
24 | .. | |||
|
25 | .. * push allowed | |||
|
26 | .. | |||
|
27 | .. graph-summary: | |||
|
28 | .. | |||
|
29 | .. B'ββ’ΓΈ B | |||
|
30 | .. | | | |||
|
31 | .. A | ΓΈβ β A' | |||
|
32 | .. | |/ | |||
|
33 | .. C β | | |||
|
34 | .. \| | |||
|
35 | .. β | |||
|
36 | ||||
|
37 | $ . $TESTDIR/testlib/push-checkheads-util.sh | |||
|
38 | ||||
|
39 | Test setup | |||
|
40 | ---------- | |||
|
41 | ||||
|
42 | $ mkdir A6 | |||
|
43 | $ cd A6 | |||
|
44 | $ setuprepos | |||
|
45 | creating basic server and client repo | |||
|
46 | updating to branch default | |||
|
47 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |||
|
48 | $ cd server | |||
|
49 | $ mkcommit B0 | |||
|
50 | $ hg up 0 | |||
|
51 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved | |||
|
52 | $ mkcommit C0 | |||
|
53 | created new head | |||
|
54 | $ cd ../client | |||
|
55 | $ hg pull | |||
|
56 | pulling from $TESTTMP/A6/server (glob) | |||
|
57 | searching for changes | |||
|
58 | adding changesets | |||
|
59 | adding manifests | |||
|
60 | adding file changes | |||
|
61 | added 2 changesets with 2 changes to 2 files (+1 heads) | |||
|
62 | (run 'hg heads' to see heads, 'hg merge' to merge) | |||
|
63 | $ hg up 0 | |||
|
64 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |||
|
65 | $ mkcommit A1 | |||
|
66 | created new head | |||
|
67 | $ hg up 'desc(C0)' | |||
|
68 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |||
|
69 | $ mkcommit B1 | |||
|
70 | $ hg debugobsolete `getid "desc(A0)" ` `getid "desc(A1)"` | |||
|
71 | $ hg debugobsolete `getid "desc(B0)" ` `getid "desc(B1)"` | |||
|
72 | $ hg log -G --hidden | |||
|
73 | @ d70a1f75a020 (draft): B1 | |||
|
74 | | | |||
|
75 | | o f6082bc4ffef (draft): A1 | |||
|
76 | | | | |||
|
77 | o | 0f88766e02d6 (draft): C0 | |||
|
78 | |/ | |||
|
79 | | x d73caddc5533 (draft): B0 | |||
|
80 | | | | |||
|
81 | | x 8aaa48160adc (draft): A0 | |||
|
82 | |/ | |||
|
83 | o 1e4be0697311 (public): root | |||
|
84 | ||||
|
85 | ||||
|
86 | Actual testing | |||
|
87 | -------------- | |||
|
88 | ||||
|
89 | $ hg push | |||
|
90 | pushing to $TESTTMP/A6/server (glob) | |||
|
91 | searching for changes | |||
|
92 | adding changesets | |||
|
93 | adding manifests | |||
|
94 | adding file changes | |||
|
95 | added 2 changesets with 2 changes to 2 files (+1 heads) | |||
|
96 | 2 new obsolescence markers | |||
|
97 | ||||
|
98 | $ cd ../.. |
General Comments 0
You need to be logged in to leave comments.
Login now