Mercurial > evolve
comparison tests/test-push-checkheads-multi-topics-F3.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 12c53d7122a7 |
comparison
equal
deleted
inserted
replaced
5223:11c359b4071d | 5224:5a46f156c9b7 |
---|---|
1 ==================================== | |
2 Testing head checking code: Case E-3 | |
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 E: case involving changeset on multiple branch | |
12 TestCase 8: moving only part of the interleaved branch away, creating 2 heads | |
13 | |
14 .. old-state: | |
15 .. | |
16 .. * 2-changeset on topic Y | |
17 .. * 1-changeset on topic Z (between the two other) | |
18 .. | |
19 .. new-state: | |
20 .. | |
21 .. * 2-changeset on topic Y, on untouched, the other moved | |
22 .. * 1-changeset on topic Z (at the same location) | |
23 .. | |
24 .. expected-result: | |
25 .. | |
26 .. * push rejected | |
27 .. | |
28 .. graph-summary: | |
29 .. | |
30 .. C ø⇠◔ C' topic Y | |
31 .. | | | |
32 .. B ◔ | topic Z | |
33 .. | | | |
34 .. A ◔ | topic Y | |
35 .. |/ | |
36 .. ● | |
37 | |
38 $ . $TESTDIR/testlib/topic_setup.sh | |
39 $ . $TESTDIR/testlib/push-checkheads-util.sh | |
40 | |
41 Test setup | |
42 ---------- | |
43 | |
44 $ mkdir E1 | |
45 $ cd E1 | |
46 $ setuprepos | |
47 creating basic server and client repo | |
48 updating to branch default | |
49 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
50 $ cd client | |
51 $ hg topic -r . Y | |
52 switching to topic Y | |
53 changed topic on 1 changesets to "Y" | |
54 $ hg strip --config extensions.strip= --hidden 'hidden()' # clean old A0 | |
55 saved backup bundle to $TESTTMP/E1/client/.hg/strip-backup/8aaa48160adc-19166392-backup.hg | |
56 $ hg topic Z | |
57 $ mkcommit B0 | |
58 active topic 'Z' grew its first changeset | |
59 (see 'hg help topics' for more information) | |
60 $ hg topic Y | |
61 $ mkcommit C0 | |
62 $ hg push | |
63 pushing to $TESTTMP/E1/server | |
64 searching for changes | |
65 adding changesets | |
66 adding manifests | |
67 adding file changes | |
68 added 3 changesets with 2 changes to 3 files (+1 heads) | |
69 1 new obsolescence markers | |
70 obsoleted 1 changesets | |
71 $ hg up 0 | |
72 0 files updated, 0 files merged, 3 files removed, 0 files unresolved | |
73 $ hg topic Y | |
74 marked working directory as topic: Y | |
75 $ mkcommit C1 | |
76 $ hg debugobsolete `getid "desc(C0)" ` `getid "desc(C1)"` | |
77 1 new obsolescence markers | |
78 obsoleted 1 changesets | |
79 $ hg log -G --hidden | |
80 @ 57530ca5eb24 (draft)[Y]: C1 | |
81 | | |
82 | x 345721b128e8 (draft)[Y]: C0 | |
83 | | | |
84 | o e1494106e1ca (draft)[Z]: B0 | |
85 | | | |
86 | o f5cd873e2965 (draft)[Y]: A0 | |
87 |/ | |
88 o 1e4be0697311 (public): root | |
89 | |
90 | |
91 Actual testing | |
92 -------------- | |
93 | |
94 $ hg push -r 'desc("C1")' | |
95 pushing to $TESTTMP/E1/server | |
96 searching for changes | |
97 abort: push creates new remote head 57530ca5eb24 on branch 'default:Y'! | |
98 (merge or see 'hg help push' for details about pushing new heads) | |
99 [255] | |
100 | |
101 $ cd ../.. |