comparison tests/test-push-checkheads-supersede-A6.t @ 6034:144d10e74757

tests: s/superceed/supersede/g
author Anton Shestakov <av6@dwimlabs.net>
date Fri, 10 Sep 2021 16:02:20 +0300
parents tests/test-push-checkheads-superceed-A6.t@a8ff17479fb8
children df773a9bed0c fc60328270ac
comparison
equal deleted inserted replaced
6033:182e2a1dbd1c 6034:144d10e74757
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 superseded 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 superseding the base of the old-2-changesets-branch,
21 .. * 1 new changesets on the old-1-changeset-branch superseding 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 new changesets d73caddc5533:0f88766e02d6 (2 drafts)
63 (run 'hg heads' to see heads, 'hg merge' to merge)
64 $ hg up 0
65 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
66 $ mkcommit A1
67 created new head
68 $ hg up 'desc(C0)'
69 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
70 $ mkcommit B1
71 $ hg debugobsolete `getid "desc(A0)" ` `getid "desc(A1)"`
72 1 new obsolescence markers
73 obsoleted 1 changesets
74 1 new orphan changesets
75 $ hg debugobsolete `getid "desc(B0)" ` `getid "desc(B1)"`
76 1 new obsolescence markers
77 obsoleted 1 changesets
78 $ hg log -G --hidden
79 @ d70a1f75a020 (draft): B1
80 |
81 | o f6082bc4ffef (draft): A1
82 | |
83 o | 0f88766e02d6 (draft): C0
84 |/
85 | x d73caddc5533 (draft): B0
86 | |
87 | x 8aaa48160adc (draft): A0
88 |/
89 o 1e4be0697311 (public): root
90
91
92 Actual testing
93 --------------
94
95 $ hg push
96 pushing to $TESTTMP/A6/server (glob)
97 searching for changes
98 adding changesets
99 adding manifests
100 adding file changes
101 added 2 changesets with 2 changes to 2 files (+1 heads)
102 2 new obsolescence markers
103 obsoleted 2 changesets
104
105 $ cd ../..