comparison tests/test-push-checkheads-multibranches-E1.t @ 5223:11c359b4071d stable

head-checking: backport fix from 7d5455b988ec See 7d5455b988ec for details. Having a version in the evolve repository allow us to check the behavior when topic is enabled. It will also become the base of further head checking fix and topic compatibility.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Mon, 06 Apr 2020 02:17:43 +0200
parents
children 35e769c9604f fc60328270ac ebc2dea354a2
comparison
equal deleted inserted replaced
5222:ba53591d4aab 5223:11c359b4071d
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 E: case involving changeset on multiple branch
12 TestCase 8: moving a branch to another location
13
14 .. old-state:
15 ..
16 .. * 1-changeset on branch default
17 .. * 1-changeset on branch Z (above default)
18 ..
19 .. new-state:
20 ..
21 .. * 1-changeset on branch default
22 .. * 1-changeset on branch Z (rebased away from A0)
23 ..
24 .. expected-result:
25 ..
26 .. * push allowed
27 ..
28 .. graph-summary:
29 ..
30 .. B ø⇠◔ B'
31 .. | |
32 .. A ◔ |
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 branch Z
50 marked working directory as branch Z
51 (branches are permanent and global, did you want a bookmark?)
52 $ mkcommit B0
53 $ hg push --new-branch
54 pushing to $TESTTMP/E1/server
55 searching for changes
56 adding changesets
57 adding manifests
58 adding file changes
59 added 1 changesets with 1 changes to 1 files
60 $ hg up 0
61 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
62 $ hg branch --force Z
63 marked working directory as branch Z
64 $ mkcommit B1
65 created new head
66 (consider using topic for lightweight branches. See 'hg help topic')
67 $ hg debugobsolete `getid "desc(B0)" ` `getid "desc(B1)"`
68 1 new obsolescence markers
69 obsoleted 1 changesets
70 $ hg log -G --hidden
71 @ c98b855401e7 (draft): B1
72 |
73 | x 93e5c1321ece (draft): B0
74 | |
75 | o 8aaa48160adc (draft): A0
76 |/
77 o 1e4be0697311 (public): root
78
79
80 Actual testing
81 --------------
82
83 $ hg push
84 pushing to $TESTTMP/E1/server
85 searching for changes
86 adding changesets
87 adding manifests
88 adding file changes
89 added 1 changesets with 1 changes to 1 files (+1 heads)
90 1 new obsolescence markers
91 obsoleted 1 changesets
92
93 $ cd ../..