Debian Codegraph @

tests/test-push-checkheads-unpushed-D1.t

raw
1 ====================================
2 Testing head checking code: Case D-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 D: remote head is "obs-affected" locally, but result is not part of the push
12 TestCase 1: remote head is rewritten, but successors is not part of the push
13
14 .. old-state:
15 ..
16 .. * 1 changeset branch
17 ..
18 .. new-state:
19 ..
20 .. * 1 changeset branch succeeding the old branch
21 .. * 1 new unrelated branch
22 ..
23 .. expected-result:
24 ..
25 .. * pushing only the unrelated branch: denied
26 ..
27 .. graph-summary:
28 ..
29 .. A ø⇠○ A'
30 .. |/
31 .. | ◔ B
32 .. |/
33 .. ●
34
35 $ . $TESTDIR/testlib/push-checkheads-util.sh
36
37 Test setup
38 ----------
39
40 $ mkdir D1
41 $ cd D1
42 $ setuprepos
43 creating basic server and client repo
44 updating to branch default
45 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
46 $ cd client
47 $ hg up 0
48 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
49 $ mkcommit A1
50 created new head
51 $ hg debugobsolete `getid "desc(A0)" ` `getid "desc(A1)"`
52 1 new obsolescence markers
53 obsoleted 1 changesets
54 $ hg up 0
55 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
56 $ mkcommit B0
57 created new head
58 $ hg log -G --hidden
59 @ 74ff5441d343 (draft): B0
60 |
61 | o f6082bc4ffef (draft): A1
62 |/
63 | x 8aaa48160adc (draft): A0
64 |/
65 o 1e4be0697311 (public): root
66
67
68 Actual testing
69 --------------
70
71 $ hg push -r 'desc(B0)'
72 pushing to $TESTTMP/D1/server
73 searching for changes
74 abort: push creates new remote head 74ff5441d343
75 (merge or see 'hg help push' for details about pushing new heads)
76 [20]
77
78 $ cd ../..
79