Debian Codegraph @

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

raw
1 ====================================
2 Testing head checking code: Case B-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 B: simple case involving pruned changesets
12 TestCase 1: single pruned changeset
13
14 .. old-state:
15 ..
16 .. * 1 changeset branch
17 ..
18 .. new-state:
19 ..
20 .. * old branch is pruned
21 .. * 1 new unrelated branch
22 ..
23 .. expected-result:
24 ..
25 .. * push allowed
26 ..
27 .. graph-summary:
28 ..
29 .. ◔ B
30 .. |
31 .. A ⊗ |
32 .. |/
33 .. ●
34
35 $ . $TESTDIR/testlib/push-checkheads-util.sh
36
37 Test setup
38 ----------
39
40 $ mkdir B1
41 $ cd B1
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 B0
50 created new head
51 $ hg debugobsolete --record-parents `getid "desc(A0)"`
52 1 new obsolescence markers
53 obsoleted 1 changesets
54 $ hg log -G --hidden
55 @ 74ff5441d343 (draft): B0
56 |
57 | x 8aaa48160adc (draft): A0
58 |/
59 o 1e4be0697311 (public): root
60
61
62 Actual testing
63 --------------
64
65 $ hg push
66 pushing to $TESTTMP/B1/server
67 searching for changes
68 adding changesets
69 adding manifests
70 adding file changes
71 added 1 changesets with 1 changes to 1 files (+1 heads)
72 1 new obsolescence markers
73 obsoleted 1 changesets
74
75 $ cd ../..