Debian Codegraph @

tests/test-push-checkheads-multibranches-E3.t

raw
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 branch default
17 .. * 1-changeset on branch Z (between the two other)
18 ..
19 .. new-state:
20 ..
21 .. * 2-changeset on branch default, on untouched, the other moved
22 .. * 1-changeset on branch Z (at the same location)
23 ..
24 .. expected-result:
25 ..
26 .. * push rejected
27 ..
28 .. graph-summary:
29 ..
30 .. C ø⇠◔ C'
31 .. | |
32 .. B ◔ |
33 .. | |
34 .. A ◔ |
35 .. |/
36 .. ●
37
38 $ . $TESTDIR/testlib/push-checkheads-util.sh
39
40 Test setup
41 ----------
42
43 $ mkdir E1
44 $ cd E1
45 $ setuprepos
46 creating basic server and client repo
47 updating to branch default
48 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
49 $ cd client
50 $ hg branch Z
51 marked working directory as branch Z
52 (branches are permanent and global, did you want a bookmark?)
53 $ mkcommit B0
54 $ hg branch default --force
55 marked working directory as branch default
56 $ mkcommit C0
57 created new head
58 $ hg push --new-branch
59 pushing to $TESTTMP/E1/server
60 searching for changes
61 adding changesets
62 adding manifests
63 adding file changes
64 added 2 changesets with 2 changes to 2 files
65 $ hg up 0
66 0 files updated, 0 files merged, 3 files removed, 0 files unresolved
67 $ mkcommit C1
68 created new head
69 $ hg debugobsolete `getid "desc(C0)" ` `getid "desc(C1)"`
70 1 new obsolescence markers
71 obsoleted 1 changesets
72 $ hg log -G --hidden
73 @ dc44c53142f0 (draft): C1
74 |
75 | x afc55ba2ce61 (draft): C0
76 | |
77 | o 93e5c1321ece (draft): B0
78 | |
79 | o 8aaa48160adc (draft): A0
80 |/
81 o 1e4be0697311 (public): root
82
83
84 Actual testing
85 --------------
86
87 $ hg push -r 'desc("C1")'
88 pushing to $TESTTMP/E1/server
89 searching for changes
90 abort: push creates new remote head dc44c53142f0
91 (merge or see 'hg help push' for details about pushing new heads)
92 [20]
93
94 $ cd ../..