##// END OF EJS Templates
obsolescence: add test for the "branch replacement" logic during push, case B6...
Pierre-Yves David -
r32013:0cf4d676 default
parent child Browse files
Show More
@@ -0,0 +1,78 b''
1 ====================================
2 Testing head checking code: Case B-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 B: simple case involving pruned changesets
12 TestCase 6: single changesets, pruned then superseeded (on a new changeset)
13
14 .. old-state:
15 ..
16 .. * 1 changeset branch
17 ..
18 .. new-state:
19 ..
20 .. * old branch is rewritten onto another one,
21 .. * the new version is then pruned.
22 ..
23 .. expected-result:
24 ..
25 .. * push allowed
26 ..
27 .. graph-summary:
28 ..
29 .. A ΓΈβ‡ βŠ— A'
30 .. | |
31 .. | β—” B
32 .. |/
33 .. ●
34
35 $ . $TESTDIR/testlib/push-checkheads-util.sh
36
37 Test setup
38 ----------
39
40 $ mkdir B6
41 $ cd B6
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 $ mkcommit A1
52 $ hg up 'desc(B0)'
53 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
54 $ hg debugobsolete `getid "desc(A0)"` `getid "desc(A1)"`
55 $ hg debugobsolete --record-parents `getid "desc(A1)"`
56 $ hg log -G --hidden
57 x ba93660aff8d (draft): A1
58 |
59 @ 74ff5441d343 (draft): B0
60 |
61 | x 8aaa48160adc (draft): A0
62 |/
63 o 1e4be0697311 (public): root
64
65
66 Actual testing
67 --------------
68
69 $ hg push
70 pushing to $TESTTMP/B6/server (glob)
71 searching for changes
72 adding changesets
73 adding manifests
74 adding file changes
75 added 1 changesets with 1 changes to 1 files (+1 heads)
76 2 new obsolescence markers
77
78 $ cd ../..
General Comments 0
You need to be logged in to leave comments. Login now