##// END OF EJS Templates
obsolescence: add test for the "branch replacement" logic during push, case A7...
Pierre-Yves David -
r31980:276390e0 default
parent child Browse files
Show More
@@ -0,0 +1,98 b''
1 ====================================
2 Testing head checking code: Case A-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 A: simple case involving a branch being superceeded by another.
12 TestCase 7: multi-changeset branch, split on multiple other, (head on its own branch), same number of head
13
14 .. old-state:
15 ..
16 .. * 2 branch (1-changeset, and 2-changesets)
17 ..
18 .. new-state:
19 ..
20 .. * 1 new branch superceeding the head of the old-2-changesets-branch,
21 .. * 1 new changesets on the old-1-changeset-branch superceeding the base of the other
22 ..
23 .. expected-result:
24 ..
25 .. * push allowed
26 ..
27 .. graph-summary:
28 ..
29 .. B ΓΈβ‡ β—” B'
30 .. | |
31 .. A'β—”β‡’ΓΈ |
32 .. | |/
33 .. C ● |
34 .. \|
35 .. ●
36
37 $ . $TESTDIR/testlib/push-checkheads-util.sh
38
39 Test setup
40 ----------
41
42 $ mkdir A7
43 $ cd A7
44 $ setuprepos
45 creating basic server and client repo
46 updating to branch default
47 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
48 $ cd server
49 $ mkcommit B0
50 $ hg up 0
51 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
52 $ mkcommit C0
53 created new head
54 $ cd ../client
55 $ hg pull
56 pulling from $TESTTMP/A7/server (glob)
57 searching for changes
58 adding changesets
59 adding manifests
60 adding file changes
61 added 2 changesets with 2 changes to 2 files (+1 heads)
62 (run 'hg heads' to see heads, 'hg merge' to merge)
63 $ hg up 'desc(C0)'
64 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
65 $ mkcommit A1
66 $ hg up 0
67 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
68 $ mkcommit B1
69 created new head
70 $ hg debugobsolete `getid "desc(A0)" ` `getid "desc(A1)"`
71 $ hg debugobsolete `getid "desc(B0)" ` `getid "desc(B1)"`
72 $ hg log -G --hidden
73 @ 25c56d33e4c4 (draft): B1
74 |
75 | o a0802eb7fc1b (draft): A1
76 | |
77 | o 0f88766e02d6 (draft): C0
78 |/
79 | x d73caddc5533 (draft): B0
80 | |
81 | x 8aaa48160adc (draft): A0
82 |/
83 o 1e4be0697311 (public): root
84
85
86 Actual testing
87 --------------
88
89 $ hg push
90 pushing to $TESTTMP/A7/server (glob)
91 searching for changes
92 adding changesets
93 adding manifests
94 adding file changes
95 added 2 changesets with 2 changes to 2 files (+1 heads)
96 2 new obsolescence markers
97
98 $ cd ../..
General Comments 0
You need to be logged in to leave comments. Login now