Debian Codegraph @

tests/test-push-checkheads-pruned-B3.t

raw
1 ====================================
2 Testing head checking code: Case B-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 B: simple case involving pruned changesets
12 TestCase 3: multi-changeset branch, other is pruned, rest is superseded
13
14 .. old-state:
15 ..
16 .. * 2 changeset branch
17 ..
18 .. new-state:
19 ..
20 .. * old head is superseded
21 .. * old other is pruned
22 ..
23 .. expected-result:
24 ..
25 .. * push allowed
26 ..
27 .. graph-summary:
28 ..
29 .. B ø⇠◔ B'
30 .. | |
31 .. A ⊗ |
32 .. |/
33 .. ●
34
35 $ . $TESTDIR/testlib/push-checkheads-util.sh
36
37 Test setup
38 ----------
39
40 $ mkdir B3
41 $ cd B3
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 server
47 $ mkcommit B0
48 $ cd ../client
49 $ hg pull
50 pulling from $TESTTMP/B3/server
51 searching for changes
52 adding changesets
53 adding manifests
54 adding file changes
55 added 1 changesets with 1 changes to 1 files
56 new changesets d73caddc5533 (1 drafts)
57 (run 'hg update' to get a working copy)
58 $ hg up 0
59 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
60 $ mkcommit B1
61 created new head
62 $ hg debugobsolete --record-parents `getid "desc(A0)"`
63 1 new obsolescence markers
64 obsoleted 1 changesets
65 1 new orphan changesets
66 $ hg debugobsolete `getid "desc(B0)" ` `getid "desc(B1)"`
67 1 new obsolescence markers
68 obsoleted 1 changesets
69 $ hg log -G --hidden
70 @ 25c56d33e4c4 (draft): B1
71 |
72 | x d73caddc5533 (draft): B0
73 | |
74 | x 8aaa48160adc (draft): A0
75 |/
76 o 1e4be0697311 (public): root
77
78
79 Actual testing
80 --------------
81
82 $ hg push
83 pushing to $TESTTMP/B3/server
84 searching for changes
85 adding changesets
86 adding manifests
87 adding file changes
88 added 1 changesets with 1 changes to 1 files (+1 heads)
89 2 new obsolescence markers
90 obsoleted 2 changesets
91
92 $ cd ../..
93