##// END OF EJS Templates
obsolescence: add test case B-5 for obsolescence markers exchange...
Pierre-Yves David -
r31917:e4d1a7e0 default
parent child Browse files
Show More
@@ -0,0 +1,148 b''
1 ============================================
2 Testing obsolescence markers push: Cases B.5
3 ============================================
4
5 Mercurial pushes obsolescences markers relevant to the "pushed-set", the set of
6 all changesets that requested to be "in sync" after the push (even if they are
7 already on both side).
8
9 This test belongs to a series of tests checking such set is properly computed
10 and applied. This does not tests "obsmarkers" discovery capabilities.
11
12 Category B: pruning case
13 TestCase 5: Push of a children of changeset which successors is pruned
14
15 B.5 Push of a children of changeset which successors is pruned
16 ==============================================================
17
18 .. This case Mirror A.4, with pruned changeset successors.
19 ..
20 .. {{{
21 .. C β—”
22 .. |
23 .. Bβ‡ ΓΈβ‡ βŠ— B'
24 .. | |
25 .. A ΓΈβ‡ β—‹ A'
26 .. |/
27 .. ●
28 .. }}}
29 ..
30 .. Marker exist from:
31 ..
32 .. * `A ΓΈβ‡ β—‹ A'`
33 .. * `B ΓΈβ‡ β—‹ B'`
34 .. * chain from B
35 .. * `B' is pruned`
36 ..
37 .. Command run:
38 ..
39 .. * hg push -r C
40 ..
41 .. Expected exchange:
42 ..
43 .. * chain from B
44 ..
45 .. Expected exclude:
46 ..
47 .. * `A ΓΈβ‡ β—‹ A'`
48 .. * `B ΓΈβ‡ β—‹ B'`
49 .. * `B' prune`
50
51 Setup
52 -----
53
54 $ . $TESTDIR/testlib/exchange-obsmarker-util.sh
55
56 initial
57
58 $ setuprepos B.5
59 creating test repo for test case B.5
60 - pulldest
61 - main
62 - pushdest
63 cd into `main` and proceed with env setup
64 $ cd main
65 $ mkcommit A0
66 $ mkcommit B0
67 $ mkcommit C
68 $ hg up --quiet 0
69 $ mkcommit A1
70 created new head
71 $ mkcommit B1
72 $ hg debugobsolete --hidden `getid 'desc(A0)'` `getid 'desc(A1)'`
73 $ hg debugobsolete --hidden aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa `getid 'desc(B0)'`
74 $ hg debugobsolete --hidden `getid 'desc(B0)'` `getid 'desc(B1)'`
75 $ hg prune -qd '0 0' 'desc(B1)'
76 $ hg log -G --hidden
77 x 069b05c3876d (draft): B1
78 |
79 @ e5ea8f9c7314 (draft): A1
80 |
81 | o 1d0f3cd25300 (draft): C
82 | |
83 | x 6e72f0a95b5e (draft): B0
84 | |
85 | x 28b51eb45704 (draft): A0
86 |/
87 o a9bdc8b26820 (public): O
88
89 $ inspect_obsmarkers
90 obsstore content
91 ================
92 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
93 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
94 6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 069b05c3876d56f62895e853a501ea58ea85f68d 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
95 069b05c3876d56f62895e853a501ea58ea85f68d 0 {e5ea8f9c73143125d36658e90ef70c6d2027a5b7} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
96 $ cd ..
97 $ cd ..
98
99 Actual Test (explicit push version)
100 -----------------------------------
101
102 $ dotest B.5 C -f
103 ## Running testcase B.5
104 # testing echange of "C" (1d0f3cd25300)
105 ## initial state
106 # obstore: main
107 069b05c3876d56f62895e853a501ea58ea85f68d 0 {e5ea8f9c73143125d36658e90ef70c6d2027a5b7} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
108 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
109 6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 069b05c3876d56f62895e853a501ea58ea85f68d 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
110 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
111 # obstore: pushdest
112 # obstore: pulldest
113 ## pushing "C" from main to pushdest
114 pushing to pushdest
115 searching for changes
116 remote: adding changesets
117 remote: adding manifests
118 remote: adding file changes
119 remote: added 3 changesets with 3 changes to 3 files
120 remote: 1 new obsolescence markers
121 ## post push state
122 # obstore: main
123 069b05c3876d56f62895e853a501ea58ea85f68d 0 {e5ea8f9c73143125d36658e90ef70c6d2027a5b7} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
124 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
125 6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 069b05c3876d56f62895e853a501ea58ea85f68d 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
126 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
127 # obstore: pushdest
128 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
129 # obstore: pulldest
130 ## pulling "1d0f3cd25300" from main into pulldest
131 pulling from main
132 searching for changes
133 adding changesets
134 adding manifests
135 adding file changes
136 added 3 changesets with 3 changes to 3 files
137 1 new obsolescence markers
138 (run 'hg update' to get a working copy)
139 ## post pull state
140 # obstore: main
141 069b05c3876d56f62895e853a501ea58ea85f68d 0 {e5ea8f9c73143125d36658e90ef70c6d2027a5b7} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
142 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
143 6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 069b05c3876d56f62895e853a501ea58ea85f68d 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
144 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
145 # obstore: pushdest
146 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
147 # obstore: pulldest
148 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
General Comments 0
You need to be logged in to leave comments. Login now