comparison tests/test-exchange-obsmarkers-case-B4.t @ 2268:f2ebe960998b stable

tests: update test to match upstreamable version Name have been clarified, documentation has been updated and some test-case have been updated to match the intended test.
author Pierre-Yves David <pierre-yves.david@ens-lyon.org>
date Sat, 08 Apr 2017 12:48:20 +0200
parents tests/test-exchange-B4.t@a202f3af890c
children 5adb8bdb935e
comparison
equal deleted inserted replaced
2267:150fee60887a 2268:f2ebe960998b
1 ============================================
2 Testing obsolescence markers push: Cases B.4
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 4: Pruned changeset on common part of the history
14 Variants:
15 # a: explicite push
16 # b: bare push
17
18 B.4 Pruned changeset on common part of history
19 =============================================
20
21 .. {{{
22 .. ⊗ C
23 .. | ● B
24 .. | |
25 .. | ● A
26 .. |/
27 .. ● O
28 .. }}}
29 ..
30 .. Marker exist from:
31 ..
32 .. * C (prune)
33 ..
34 .. Command run:
35 ..
36 .. * hg push -r B
37 .. * hg push
38 ..
39 .. Expected exchange:
40 ..
41 .. * prune for C
42
43 Setup
44 -----
45
46 $ . $TESTDIR/testlib/exchange-obsmarker-util.sh
47
48 initial
49
50 $ setuprepos B.4
51 creating test repo for test case B.4
52 - pulldest
53 - main
54 - pushdest
55 cd into `main` and proceed with env setup
56 $ cd main
57 $ mkcommit A
58 $ mkcommit B
59 $ hg phase --public .
60 $ hg push ../pushdest
61 pushing to ../pushdest
62 searching for changes
63 remote: adding changesets
64 remote: adding manifests
65 remote: adding file changes
66 remote: added 2 changesets with 2 changes to 2 files
67 $ hg push ../pulldest
68 pushing to ../pulldest
69 searching for changes
70 remote: adding changesets
71 remote: adding manifests
72 remote: adding file changes
73 remote: added 2 changesets with 2 changes to 2 files
74 $ hg update -q 0
75 $ mkcommit C
76 created new head
77 $ hg prune -qd '0 0' .
78 $ hg log -G --hidden
79 x 7f7f229b13a6 (draft): C
80 |
81 | o f6fbb35d8ac9 (public): B
82 | |
83 | o f5bc6836db60 (public): A
84 |/
85 @ a9bdc8b26820 (public): O
86
87 $ inspect_obsmarkers
88 obsstore content
89 ================
90 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
91 obshashtree
92 ===========
93 a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 1900882e85db10a1dc5bc7748f436a8a834356c6
94 f5bc6836db60e308a17ba08bf050154ba9c4fad7 c27e764c783f451ef3aa40daf2a3795e6674cd06
95 f6fbb35d8ac958bbe70035e4c789c18471cdc0af 907beff79fdff2b82b5d3bed7989107a6d744508
96 7f7f229b13a629a5b20581c6cb723f4e2ca54bed c27e764c783f451ef3aa40daf2a3795e6674cd06
97 obshashrange
98 ============
99 rev node index size depth obshash
100 2 f6fbb35d8ac9 0 3 3 000000000000
101 1 f5bc6836db60 0 2 2 000000000000
102 0 a9bdc8b26820 0 1 1 1900882e85db
103 1 f5bc6836db60 1 1 2 000000000000
104 2 f6fbb35d8ac9 2 1 3 000000000000
105 $ cd ..
106 $ cd ..
107
108 $ cp -R B.4 B.4.a
109 $ cp -R B.4 B.4.b
110
111 Actual Test (explicit push version)
112 -----------------------------------
113
114 $ dotest B.4.a O
115 ## Running testcase B.4.a
116 # testing echange of "O" (a9bdc8b26820)
117 ## initial state
118 # obstore: main
119 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
120 # obstore: pushdest
121 # obstore: pulldest
122 ## pushing "O" from main to pushdest
123 pushing to pushdest
124 searching for changes
125 no changes found
126 remote: 1 new obsolescence markers
127 ## post push state
128 # obstore: main
129 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
130 # obstore: pushdest
131 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
132 # obstore: pulldest
133 ## pulling "a9bdc8b26820" from main into pulldest
134 pulling from main
135 no changes found
136 1 new obsolescence markers
137 ## post pull state
138 # obstore: main
139 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
140 # obstore: pushdest
141 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
142 # obstore: pulldest
143 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
144
145 Actual Test (bare push version)
146 -----------------------------------
147
148 $ dotest B.4.b
149 ## Running testcase B.4.b
150 ## initial state
151 # obstore: main
152 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
153 # obstore: pushdest
154 # obstore: pulldest
155 ## pushing from main to pushdest
156 pushing to pushdest
157 searching for changes
158 no changes found
159 remote: 1 new obsolescence markers
160 ## post push state
161 # obstore: main
162 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
163 # obstore: pushdest
164 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
165 # obstore: pulldest
166 ## pulling from main into pulldest
167 pulling from main
168 searching for changes
169 no changes found
170 1 new obsolescence markers
171 ## post pull state
172 # obstore: main
173 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
174 # obstore: pushdest
175 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
176 # obstore: pulldest
177 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}