##// END OF EJS Templates
obsolescence: add test for the "branch replacement" logic during push, case D7...
Pierre-Yves David -
r32018:090fff9b default
parent child Browse files
Show More
@@ -0,0 +1,96 b''
1 ====================================
2 Testing head checking code: Case D-7
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 7: single changesets, superseeded multiple time then pruned (on a new changeset unpushed) changeset
13
14 This is a partial push variation of B6
15
16 .. old-state:
17 ..
18 .. * 1 changeset branch
19 ..
20 .. new-state:
21 ..
22 .. * old branch is rewritten onto another one,
23 .. * The rewriting it again rewritten on the root
24 .. * the new version is then pruned.
25 ..
26 .. expected-result:
27 ..
28 .. * push allowed
29 ..
30 .. graph-summary:
31 ..
32 .. A'
33 .. A ΓΈβ‡ ΓΈβ‡ βŠ— A''
34 .. | | |
35 .. C β—” | β—” | B
36 .. \|/ /
37 .. | /
38 .. |/
39 .. |
40 .. ●
41
42 $ . $TESTDIR/testlib/push-checkheads-util.sh
43
44 Test setup
45 ----------
46
47 $ mkdir D7
48 $ cd D7
49 $ setuprepos
50 creating basic server and client repo
51 updating to branch default
52 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
53 $ cd client
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 $ mkcommit A1
59 $ hg up '0'
60 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
61 $ mkcommit A2
62 created new head
63 $ hg up '0'
64 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
65 $ mkcommit C0
66 created new head
67 $ hg debugobsolete `getid "desc(A0)"` `getid "desc(A1)"`
68 $ hg debugobsolete `getid "desc(A1)"` `getid "desc(A2)"`
69 $ hg debugobsolete --record-parents `getid "desc(A2)"`
70 $ hg log -G --hidden
71 @ 0f88766e02d6 (draft): C0
72 |
73 | x c1f8d089020f (draft): A2
74 |/
75 | x ba93660aff8d (draft): A1
76 | |
77 | o 74ff5441d343 (draft): B0
78 |/
79 | x 8aaa48160adc (draft): A0
80 |/
81 o 1e4be0697311 (public): root
82
83
84 Actual testing
85 --------------
86
87 $ hg push --rev 'desc(C0)'
88 pushing to $TESTTMP/D7/server (glob)
89 searching for changes
90 adding changesets
91 adding manifests
92 adding file changes
93 added 1 changesets with 1 changes to 1 files (+1 heads)
94 3 new obsolescence markers
95
96 $ cd ../..
General Comments 0
You need to be logged in to leave comments. Login now