##// END OF EJS Templates
test: add a push race case where each client replaces a different head...
marmoute -
r32631:63afbc74 default
parent child Browse files
Show More
@@ -189,3 +189,92 b' Check the result of the push'
189 |
189 |
190 @ 842e2fac6304 C-ROOT (default)
190 @ 842e2fac6304 C-ROOT (default)
191
191
192
193 Pushing on two different heads
194 ------------------------------
195
196 Both try to replace a different head
197
198 # a b
199 # | |
200 # * *
201 # |/
202 # *
203
204 (resync-all)
205
206 $ hg -R ./server pull ./client-racy
207 pulling from ./client-racy
208 searching for changes
209 adding changesets
210 adding manifests
211 adding file changes
212 added 1 changesets with 1 changes to 1 files (+1 heads)
213 (run 'hg heads' to see heads, 'hg merge' to merge)
214 $ hg -R ./client-other pull
215 pulling from ssh://user@dummy/server
216 searching for changes
217 adding changesets
218 adding manifests
219 adding file changes
220 added 1 changesets with 1 changes to 1 files (+1 heads)
221 (run 'hg heads' to see heads, 'hg merge' to merge)
222 $ hg -R ./client-racy pull
223 pulling from ssh://user@dummy/server
224 searching for changes
225 adding changesets
226 adding manifests
227 adding file changes
228 added 1 changesets with 1 changes to 1 files (+1 heads)
229 (run 'hg heads' to see heads, 'hg merge' to merge)
230
231 $ hg -R server graph
232 o a9149a1428e2 C-B (default)
233 |
234 | o 98217d5a1659 C-A (default)
235 |/
236 @ 842e2fac6304 C-ROOT (default)
237
238
239 Creating changesets
240
241 $ echo aa >> client-other/a
242 $ hg -R client-other/ commit -m "C-C"
243 $ echo bb >> client-racy/b
244 $ hg -R client-racy/ commit -m "C-D"
245
246 Pushing
247
248 $ hg -R client-racy push -r 'tip' > ./push-log 2>&1 &
249
250 $ waiton $TESTTMP/readyfile
251
252 $ hg -R client-other push -r 'tip'
253 pushing to ssh://user@dummy/server
254 searching for changes
255 remote: adding changesets
256 remote: adding manifests
257 remote: adding file changes
258 remote: added 1 changesets with 1 changes to 1 files
259
260 $ release $TESTTMP/watchfile
261
262 Check the result of the push
263
264 $ cat ./push-log
265 pushing to ssh://user@dummy/server
266 searching for changes
267 wrote ready: $TESTTMP/readyfile
268 waiting on: $TESTTMP/watchfile
269 abort: push failed:
270 'repository changed while pushing - please try again'
271
272 $ hg -R server graph
273 o 51c544a58128 C-C (default)
274 |
275 o 98217d5a1659 C-A (default)
276 |
277 | o a9149a1428e2 C-B (default)
278 |/
279 @ 842e2fac6304 C-ROOT (default)
280
General Comments 0
You need to be logged in to leave comments. Login now