comparison tests/test-push-checkheads-supersede-A2.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-A2.t@a8ff17479fb8
children df773a9bed0c fc60328270ac
comparison
equal deleted inserted replaced
6033:182e2a1dbd1c 6034:144d10e74757
1 ====================================
2 Testing head checking code: Case A-2
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 2: multi-changeset branch
13
14 .. old-state:
15 ..
16 .. * 1 branch with 2 changesets
17 ..
18 .. new-state:
19 ..
20 .. * another 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/push-checkheads-util.sh
35
36 Test setup
37 ----------
38
39 $ mkdir A2
40 $ cd A2
41 $ setuprepos
42 creating basic server and client repo
43 updating to branch default
44 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
45 $ cd server
46 $ mkcommit B0
47 $ cd ../client
48 $ hg pull
49 pulling from $TESTTMP/A2/server (glob)
50 searching for changes
51 adding changesets
52 adding manifests
53 adding file changes
54 added 1 changesets with 1 changes to 1 files
55 new changesets d73caddc5533 (1 drafts)
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 A1
60 created new head
61 $ mkcommit B1
62 $ hg debugobsolete `getid "desc(A0)" ` `getid "desc(A1)"`
63 1 new obsolescence markers
64 obsoleted 1 changesets
65 1 new orphan changesets
66 $ hg debugobsolete `getid "desc(B0)" ` `getid "desc(B1)"`
67 1 new obsolescence markers
68 obsoleted 1 changesets
69 $ hg log -G --hidden
70 @ 262c8c798096 (draft): B1
71 |
72 o f6082bc4ffef (draft): A1
73 |
74 | x d73caddc5533 (draft): B0
75 | |
76 | x 8aaa48160adc (draft): A0
77 |/
78 o 1e4be0697311 (public): root
79
80
81 Actual testing
82 --------------
83
84 $ hg push
85 pushing to $TESTTMP/A2/server (glob)
86 searching for changes
87 adding changesets
88 adding manifests
89 adding file changes
90 added 2 changesets with 2 changes to 2 files (+1 heads)
91 2 new obsolescence markers
92 obsoleted 2 changesets
93
94 $ cd ../..