comparison tests/test-push-checkheads-multi-topics-F1.t @ 5224:5a46f156c9b7 stable

head-checking: add test variants with topics
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Mon, 06 Apr 2020 02:56:43 +0200
parents
children 35e769c9604f fc60328270ac
comparison
equal deleted inserted replaced
5223:11c359b4071d 5224:5a46f156c9b7
1 ====================================
2 Testing head checking code: Case E-1
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 F: case involving changeset on multiple topic
12 TestCase 1: moving a branch to another location
13
14 .. old-state:
15 ..
16 .. * 1-changeset on topic Y
17 .. * 1-changeset on topic Z (above Y)
18 ..
19 .. new-state:
20 ..
21 .. * 1-changeset on topic Y
22 .. * 1-changeset on topic Z (rebased away from A0)
23 ..
24 .. expected-result:
25 ..
26 .. * push allowed
27 ..
28 .. graph-summary:
29 ..
30 .. B ø⇠◔ B' topic Z
31 .. | |
32 .. A ◔ | topic Y
33 .. |/
34 .. ●
35
36 $ . $TESTDIR/testlib/topic_setup.sh
37 $ . $TESTDIR/testlib/push-checkheads-util.sh
38
39 Test setup
40 ----------
41
42 $ mkdir E1
43 $ cd E1
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 client
49 $ hg topic -r . Y
50 switching to topic Y
51 changed topic on 1 changesets to "Y"
52 $ hg topic Z
53 $ mkcommit B0
54 active topic 'Z' grew its first changeset
55 (see 'hg help topics' for more information)
56 $ hg push
57 pushing to $TESTTMP/E1/server
58 searching for changes
59 adding changesets
60 adding manifests
61 adding file changes
62 added 2 changesets with 1 changes to 2 files (+1 heads)
63 1 new obsolescence markers
64 obsoleted 1 changesets
65 $ hg up 0
66 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
67 $ hg topic Z
68 marked working directory as topic: Z
69 $ mkcommit B1
70 $ hg debugobsolete `getid "desc(B0)" ` `getid "desc(B1)"`
71 1 new obsolescence markers
72 obsoleted 1 changesets
73 $ hg log -G --hidden
74 @ 845eeb768064 (draft)[Z]: B1
75 |
76 | x e1494106e1ca (draft)[Z]: B0
77 | |
78 | o f5cd873e2965 (draft)[Y]: A0
79 |/
80 | x 8aaa48160adc (draft): A0
81 |/
82 o 1e4be0697311 (public): root
83
84
85 Actual testing
86 --------------
87
88 $ hg push
89 pushing to $TESTTMP/E1/server
90 searching for changes
91 adding changesets
92 adding manifests
93 adding file changes
94 added 1 changesets with 1 changes to 1 files (+1 heads)
95 1 new obsolescence markers
96 obsoleted 1 changesets
97
98 $ cd ../..