Debian Codegraph @

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

raw
1 ====================================
2 Testing head checking code: Case D-6
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 6: single changeset, superseeded then pruned (on a new changeset unpushed) changeset
13
14 This is a partial push variation of case B-6
15
16 .. old-state:
17 ..
18 .. * 1 changeset branch
19 ..
20 .. new-state:
21 ..
22 .. * old branch is rewritten onto another one,
23 .. * the new version is then pruned.
24 ..
25 .. expected-result:
26 ..
27 .. * push denied
28 ..
29 .. graph-summary:
30 ..
31 .. A ø⇠⊗ A'
32 .. | |
33 .. C ◔ | ○ B
34 .. \|/
35 .. ●
36
37 $ . $TESTDIR/testlib/push-checkheads-util.sh
38
39 Test setup
40 ----------
41
42 $ mkdir D6
43 $ cd D6
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 up 0
50 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
51 $ mkcommit B0
52 created new head
53 $ mkcommit A1
54 $ hg up '0'
55 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
56 $ mkcommit C0
57 created new head
58 $ hg debugobsolete `getid "desc(A0)"` `getid "desc(A1)"`
59 1 new obsolescence markers
60 obsoleted 1 changesets
61 $ hg debugobsolete --record-parents `getid "desc(A1)"`
62 1 new obsolescence markers
63 obsoleted 1 changesets
64 $ hg log -G --hidden
65 @ 0f88766e02d6 (draft): C0
66 |
67 | x ba93660aff8d (draft): A1
68 | |
69 | o 74ff5441d343 (draft): B0
70 |/
71 | x 8aaa48160adc (draft): A0
72 |/
73 o 1e4be0697311 (public): root
74
75
76 Actual testing
77 --------------
78
79 $ hg push --rev 'desc(C0)'
80 pushing to $TESTTMP/D6/server
81 searching for changes
82 abort: push creates new remote head 0f88766e02d6
83 (merge or see 'hg help push' for details about pushing new heads)
84 [20]
85
86 $ cd ../..