comparison tests/test-single-head-obsolescence-topic-B3.t @ 5229:fa1324e58fcf stable

head-checking: also test single head enforcement with topic They are an important part of why we want this.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Thu, 12 Mar 2020 02:08:39 +0100
parents tests/test-single-head-obsolescence-named-branch-A3.t@f560d23639e1
children 35e769c9604f 144d10e74757
comparison
equal deleted inserted replaced
5228:f560d23639e1 5229:fa1324e58fcf
1 =========================================
2 Testing single head enforcement: Case A-3
3 =========================================
4
5 A repository is set to only accept a single head per name (typically named
6 branch). However, obsolete changesets can make this enforcement more
7 complicated, because they can be kept visible by other changeset on other
8 branch.
9
10 This case is part of a series of tests checking this behavior.
11
12 Category B: Involving obsolescence with topic
13 TestCase 3: Full superceedig of a branch interleaved with another
14
15 .. old-state:
16 ..
17 .. * 2 changeset changeset on topic Y
18 .. * 2 changeset changeset on topic X interleaved with the other
19 ..
20 .. new-state:
21 ..
22 .. * 2 changeset changeset on topic X at the same location
23 .. * 2 changeset changeset on topic Y superceeding the other ones
24 ..
25 .. expected-result:
26 ..
27 .. * only one head detected
28 ..
29 .. graph-summary:
30 ..
31 .. D ● (topic-Y)
32 .. |
33 .. C ø⇠◔ C' (topix-X)
34 .. | |
35 .. B ● | (topic-Y)
36 .. | |
37 .. A ø⇠◔ A' (topic-X)
38 .. |/
39 .. ●
40
41 $ . $TESTDIR/testlib/topic_setup.sh
42 $ . $TESTDIR/testlib/push-checkheads-util.sh
43
44 Test setup
45 ----------
46
47 $ mkdir B3
48 $ cd B3
49 $ setuprepos single-head
50 creating basic server and client repo
51 updating to branch default
52 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
53 $ cd client
54 $ hg topic -r . topic-X
55 switching to topic topic-X
56 changed topic on 1 changesets to "topic-X"
57 $ hg strip --config extensions.strip= --hidden 'hidden()' --no-backup # clean old A0
58 $ hg topic topic-Y
59 $ mkcommit B0
60 active topic 'topic-Y' grew its first changeset
61 (see 'hg help topics' for more information)
62 $ hg topic topic-X
63 $ mkcommit C0
64 $ hg topic topic-Y
65 $ mkcommit D0
66 $ hg push --new-branch
67 pushing to $TESTTMP/B3/server
68 searching for changes
69 adding changesets
70 adding manifests
71 adding file changes
72 added 4 changesets with 3 changes to 4 files (+1 heads)
73 1 new obsolescence markers
74 obsoleted 1 changesets
75 $ hg up 0
76 0 files updated, 0 files merged, 4 files removed, 0 files unresolved
77 $ hg topic topic-X
78 marked working directory as topic: topic-X
79 $ mkcommit A1
80 $ mkcommit C1
81 $ hg debugobsolete `getid "desc(A0)" ` `getid "desc(A1)"`
82 1 new obsolescence markers
83 obsoleted 1 changesets
84 3 new orphan changesets
85 $ hg debugobsolete `getid "desc(C0)" ` `getid "desc(C1)"`
86 1 new obsolescence markers
87 obsoleted 1 changesets
88 $ hg log -G --hidden
89 @ 9f6e6381b9aa [default:topic-X] (draft): C1
90 |
91 o c1340bef453e [default:topic-X] (draft): A1
92 |
93 | * 850d57e10bfe [default:topic-Y] (draft): D0
94 | |
95 | x fcdd583577e8 [default:topic-X] (draft): C0
96 | |
97 | * 030eec7a0fe2 [default:topic-Y] (draft): B0
98 | |
99 | x 5a47a98cd8e5 [default:topic-X] (draft): A0
100 |/
101 o 1e4be0697311 [default] (public): root
102
103
104 Actual testing
105 --------------
106
107 $ hg push -r 'desc("C1")'
108 pushing to $TESTTMP/B3/server
109 searching for changes
110 adding changesets
111 adding manifests
112 adding file changes
113 added 2 changesets with 2 changes to 2 files (+1 heads)
114 2 new obsolescence markers
115 obsoleted 2 changesets
116 2 new orphan changesets