Debian Codegraph @

tests/test-push-checkheads-superceed-A8.t

raw
1 ====================================
2 Testing head checking code: Case A-8
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 A: simple case involving a branch being superseded by another.
12 TestCase 8: single-changeset branch indirect rewrite
13
14 .. old-state:
15 ..
16 .. * 1-changeset branch
17 ..
18 .. new-state:
19 ..
20 .. * 1-changeset branch succeeding to A, through another unpushed changesets
21 ..
22 .. expected-result:
23 ..
24 .. * push allowed
25 ..
26 .. graph-summary:
27 ..
28 .. A'
29 .. A ø⇠ø⇠◔ A''
30 .. |/ /
31 .. | /
32 .. |/
33 .. ●
34
35 $ . $TESTDIR/testlib/push-checkheads-util.sh
36
37 Test setup
38 ----------
39
40 $ mkdir A8
41 $ cd A8
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 up 0
52 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
53 $ mkcommit A2
54 created new head
55 $ hg debugobsolete `getid "desc(A0)" ` `getid "desc(A1)"`
56 1 new obsolescence markers
57 obsoleted 1 changesets
58 $ hg debugobsolete `getid "desc(A1)" ` `getid "desc(A2)"`
59 1 new obsolescence markers
60 obsoleted 1 changesets
61 $ hg log -G --hidden
62 @ c1f8d089020f (draft): A2
63 |
64 | x f6082bc4ffef (draft): A1
65 |/
66 | x 8aaa48160adc (draft): A0
67 |/
68 o 1e4be0697311 (public): root
69
70
71 Actual testing
72 --------------
73
74 $ hg push
75 pushing to $TESTTMP/A8/server
76 searching for changes
77 adding changesets
78 adding manifests
79 adding file changes
80 added 1 changesets with 1 changes to 1 files (+1 heads)
81 2 new obsolescence markers
82 obsoleted 1 changesets
83
84 $ cd ../..