##// END OF EJS Templates
test: add a push race case where obsoleted head is updated...
marmoute -
r32669:6ac367b6 default
parent child Browse files
Show More
@@ -1,1248 +1,1431 b''
1 ============================================================================================
1 ============================================================================================
2 Test cases where there are race condition between two clients pushing to the same repository
2 Test cases where there are race condition between two clients pushing to the same repository
3 ============================================================================================
3 ============================================================================================
4
4
5 This file tests cases where two clients push to a server at the same time. The
5 This file tests cases where two clients push to a server at the same time. The
6 "raced" client is done preparing it push bundle when the "racing" client
6 "raced" client is done preparing it push bundle when the "racing" client
7 perform its push. The "raced" client starts its actual push after the "racing"
7 perform its push. The "raced" client starts its actual push after the "racing"
8 client push is fully complete.
8 client push is fully complete.
9
9
10 A set of extension and shell functions ensures this scheduling.
10 A set of extension and shell functions ensures this scheduling.
11
11
12 $ cat >> delaypush.py << EOF
12 $ cat >> delaypush.py << EOF
13 > """small extension orchestrate push race
13 > """small extension orchestrate push race
14 >
14 >
15 > Client with the extensions will create a file when ready and get stuck until
15 > Client with the extensions will create a file when ready and get stuck until
16 > a file is created."""
16 > a file is created."""
17 >
17 >
18 > import atexit
18 > import atexit
19 > import errno
19 > import errno
20 > import os
20 > import os
21 > import time
21 > import time
22 >
22 >
23 > from mercurial import (
23 > from mercurial import (
24 > exchange,
24 > exchange,
25 > extensions,
25 > extensions,
26 > )
26 > )
27 >
27 >
28 > def delaypush(orig, pushop):
28 > def delaypush(orig, pushop):
29 > # notify we are done preparing
29 > # notify we are done preparing
30 > readypath = pushop.repo.ui.config('delaypush', 'ready-path', None)
30 > readypath = pushop.repo.ui.config('delaypush', 'ready-path', None)
31 > if readypath is not None:
31 > if readypath is not None:
32 > with open(readypath, 'w') as r:
32 > with open(readypath, 'w') as r:
33 > r.write('foo')
33 > r.write('foo')
34 > pushop.repo.ui.status('wrote ready: %s\n' % readypath)
34 > pushop.repo.ui.status('wrote ready: %s\n' % readypath)
35 > # now wait for the other process to be done
35 > # now wait for the other process to be done
36 > watchpath = pushop.repo.ui.config('delaypush', 'release-path', None)
36 > watchpath = pushop.repo.ui.config('delaypush', 'release-path', None)
37 > if watchpath is not None:
37 > if watchpath is not None:
38 > pushop.repo.ui.status('waiting on: %s\n' % watchpath)
38 > pushop.repo.ui.status('waiting on: %s\n' % watchpath)
39 > limit = 100
39 > limit = 100
40 > while 0 < limit and not os.path.exists(watchpath):
40 > while 0 < limit and not os.path.exists(watchpath):
41 > limit -= 1
41 > limit -= 1
42 > time.sleep(0.1)
42 > time.sleep(0.1)
43 > if limit <= 0:
43 > if limit <= 0:
44 > repo.ui.warn('exiting without watchfile: %s' % watchpath)
44 > repo.ui.warn('exiting without watchfile: %s' % watchpath)
45 > else:
45 > else:
46 > # delete the file at the end of the push
46 > # delete the file at the end of the push
47 > def delete():
47 > def delete():
48 > try:
48 > try:
49 > os.unlink(watchpath)
49 > os.unlink(watchpath)
50 > except OSError as exc:
50 > except OSError as exc:
51 > if exc.errno != errno.ENOENT:
51 > if exc.errno != errno.ENOENT:
52 > raise
52 > raise
53 > atexit.register(delete)
53 > atexit.register(delete)
54 > return orig(pushop)
54 > return orig(pushop)
55 >
55 >
56 > def uisetup(ui):
56 > def uisetup(ui):
57 > extensions.wrapfunction(exchange, '_pushbundle2', delaypush)
57 > extensions.wrapfunction(exchange, '_pushbundle2', delaypush)
58 > EOF
58 > EOF
59
59
60 $ waiton () {
60 $ waiton () {
61 > # wait for a file to be created (then delete it)
61 > # wait for a file to be created (then delete it)
62 > count=100
62 > count=100
63 > while [ ! -f $1 ] ;
63 > while [ ! -f $1 ] ;
64 > do
64 > do
65 > sleep 0.1;
65 > sleep 0.1;
66 > count=`expr $count - 1`;
66 > count=`expr $count - 1`;
67 > if [ $count -lt 0 ];
67 > if [ $count -lt 0 ];
68 > then
68 > then
69 > break
69 > break
70 > fi;
70 > fi;
71 > done
71 > done
72 > [ -f $1 ] || echo "ready file still missing: $1"
72 > [ -f $1 ] || echo "ready file still missing: $1"
73 > rm -f $1
73 > rm -f $1
74 > }
74 > }
75
75
76 $ release () {
76 $ release () {
77 > # create a file and wait for it be deleted
77 > # create a file and wait for it be deleted
78 > count=100
78 > count=100
79 > touch $1
79 > touch $1
80 > while [ -f $1 ] ;
80 > while [ -f $1 ] ;
81 > do
81 > do
82 > sleep 0.1;
82 > sleep 0.1;
83 > count=`expr $count - 1`;
83 > count=`expr $count - 1`;
84 > if [ $count -lt 0 ];
84 > if [ $count -lt 0 ];
85 > then
85 > then
86 > break
86 > break
87 > fi;
87 > fi;
88 > done
88 > done
89 > [ ! -f $1 ] || echo "delay file still exist: $1"
89 > [ ! -f $1 ] || echo "delay file still exist: $1"
90 > }
90 > }
91
91
92 $ cat >> $HGRCPATH << EOF
92 $ cat >> $HGRCPATH << EOF
93 > [ui]
93 > [ui]
94 > ssh = python "$TESTDIR/dummyssh"
94 > ssh = python "$TESTDIR/dummyssh"
95 > # simplify output
95 > # simplify output
96 > logtemplate = {node|short} {desc} ({branch})
96 > logtemplate = {node|short} {desc} ({branch})
97 > [phases]
98 > publish = no
99 > [experimental]
100 > evolution = all
97 > [alias]
101 > [alias]
98 > graph = log -G --rev 'sort(all(), "topo")'
102 > graph = log -G --rev 'sort(all(), "topo")'
99 > EOF
103 > EOF
100
104
101 Setup
105 Setup
102 -----
106 -----
103
107
104 create a repo with one root
108 create a repo with one root
105
109
106 $ hg init server
110 $ hg init server
107 $ cd server
111 $ cd server
108 $ echo root > root
112 $ echo root > root
109 $ hg ci -Am "C-ROOT"
113 $ hg ci -Am "C-ROOT"
110 adding root
114 adding root
111 $ cd ..
115 $ cd ..
112
116
113 clone it in two clients
117 clone it in two clients
114
118
115 $ hg clone ssh://user@dummy/server client-racy
119 $ hg clone ssh://user@dummy/server client-racy
116 requesting all changes
120 requesting all changes
117 adding changesets
121 adding changesets
118 adding manifests
122 adding manifests
119 adding file changes
123 adding file changes
120 added 1 changesets with 1 changes to 1 files
124 added 1 changesets with 1 changes to 1 files
121 updating to branch default
125 updating to branch default
122 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
126 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
123 $ hg clone ssh://user@dummy/server client-other
127 $ hg clone ssh://user@dummy/server client-other
124 requesting all changes
128 requesting all changes
125 adding changesets
129 adding changesets
126 adding manifests
130 adding manifests
127 adding file changes
131 adding file changes
128 added 1 changesets with 1 changes to 1 files
132 added 1 changesets with 1 changes to 1 files
129 updating to branch default
133 updating to branch default
130 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
134 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
131
135
132 setup one to allow race on push
136 setup one to allow race on push
133
137
134 $ cat >> client-racy/.hg/hgrc << EOF
138 $ cat >> client-racy/.hg/hgrc << EOF
135 > [extensions]
139 > [extensions]
136 > delaypush = $TESTTMP/delaypush.py
140 > delaypush = $TESTTMP/delaypush.py
137 > [delaypush]
141 > [delaypush]
138 > ready-path = $TESTTMP/readyfile
142 > ready-path = $TESTTMP/readyfile
139 > release-path = $TESTTMP/watchfile
143 > release-path = $TESTTMP/watchfile
140 > EOF
144 > EOF
141
145
142 Simple race, both try to push to the server at the same time
146 Simple race, both try to push to the server at the same time
143 ------------------------------------------------------------
147 ------------------------------------------------------------
144
148
145 Both try to replace the same head
149 Both try to replace the same head
146
150
147 # a
151 # a
148 # | b
152 # | b
149 # |/
153 # |/
150 # *
154 # *
151
155
152 Creating changesets
156 Creating changesets
153
157
154 $ echo b > client-other/a
158 $ echo b > client-other/a
155 $ hg -R client-other/ add client-other/a
159 $ hg -R client-other/ add client-other/a
156 $ hg -R client-other/ commit -m "C-A"
160 $ hg -R client-other/ commit -m "C-A"
157 $ echo b > client-racy/b
161 $ echo b > client-racy/b
158 $ hg -R client-racy/ add client-racy/b
162 $ hg -R client-racy/ add client-racy/b
159 $ hg -R client-racy/ commit -m "C-B"
163 $ hg -R client-racy/ commit -m "C-B"
160
164
161 Pushing
165 Pushing
162
166
163 $ hg -R client-racy push -r 'tip' > ./push-log 2>&1 &
167 $ hg -R client-racy push -r 'tip' > ./push-log 2>&1 &
164
168
165 $ waiton $TESTTMP/readyfile
169 $ waiton $TESTTMP/readyfile
166
170
167 $ hg -R client-other push -r 'tip'
171 $ hg -R client-other push -r 'tip'
168 pushing to ssh://user@dummy/server
172 pushing to ssh://user@dummy/server
169 searching for changes
173 searching for changes
170 remote: adding changesets
174 remote: adding changesets
171 remote: adding manifests
175 remote: adding manifests
172 remote: adding file changes
176 remote: adding file changes
173 remote: added 1 changesets with 1 changes to 1 files
177 remote: added 1 changesets with 1 changes to 1 files
174
178
175 $ release $TESTTMP/watchfile
179 $ release $TESTTMP/watchfile
176
180
177 Check the result of the push
181 Check the result of the push
178
182
179 $ cat ./push-log
183 $ cat ./push-log
180 pushing to ssh://user@dummy/server
184 pushing to ssh://user@dummy/server
181 searching for changes
185 searching for changes
182 wrote ready: $TESTTMP/readyfile
186 wrote ready: $TESTTMP/readyfile
183 waiting on: $TESTTMP/watchfile
187 waiting on: $TESTTMP/watchfile
184 abort: push failed:
188 abort: push failed:
185 'repository changed while pushing - please try again'
189 'repository changed while pushing - please try again'
186
190
187 $ hg -R server graph
191 $ hg -R server graph
188 o 98217d5a1659 C-A (default)
192 o 98217d5a1659 C-A (default)
189 |
193 |
190 @ 842e2fac6304 C-ROOT (default)
194 @ 842e2fac6304 C-ROOT (default)
191
195
192
196
193 Pushing on two different heads
197 Pushing on two different heads
194 ------------------------------
198 ------------------------------
195
199
196 Both try to replace a different head
200 Both try to replace a different head
197
201
198 # a b
202 # a b
199 # | |
203 # | |
200 # * *
204 # * *
201 # |/
205 # |/
202 # *
206 # *
203
207
204 (resync-all)
208 (resync-all)
205
209
206 $ hg -R ./server pull ./client-racy
210 $ hg -R ./server pull ./client-racy
207 pulling from ./client-racy
211 pulling from ./client-racy
208 searching for changes
212 searching for changes
209 adding changesets
213 adding changesets
210 adding manifests
214 adding manifests
211 adding file changes
215 adding file changes
212 added 1 changesets with 1 changes to 1 files (+1 heads)
216 added 1 changesets with 1 changes to 1 files (+1 heads)
213 (run 'hg heads' to see heads, 'hg merge' to merge)
217 (run 'hg heads' to see heads, 'hg merge' to merge)
214 $ hg -R ./client-other pull
218 $ hg -R ./client-other pull
215 pulling from ssh://user@dummy/server
219 pulling from ssh://user@dummy/server
216 searching for changes
220 searching for changes
217 adding changesets
221 adding changesets
218 adding manifests
222 adding manifests
219 adding file changes
223 adding file changes
220 added 1 changesets with 1 changes to 1 files (+1 heads)
224 added 1 changesets with 1 changes to 1 files (+1 heads)
221 (run 'hg heads' to see heads, 'hg merge' to merge)
225 (run 'hg heads' to see heads, 'hg merge' to merge)
222 $ hg -R ./client-racy pull
226 $ hg -R ./client-racy pull
223 pulling from ssh://user@dummy/server
227 pulling from ssh://user@dummy/server
224 searching for changes
228 searching for changes
225 adding changesets
229 adding changesets
226 adding manifests
230 adding manifests
227 adding file changes
231 adding file changes
228 added 1 changesets with 1 changes to 1 files (+1 heads)
232 added 1 changesets with 1 changes to 1 files (+1 heads)
229 (run 'hg heads' to see heads, 'hg merge' to merge)
233 (run 'hg heads' to see heads, 'hg merge' to merge)
230
234
231 $ hg -R server graph
235 $ hg -R server graph
232 o a9149a1428e2 C-B (default)
236 o a9149a1428e2 C-B (default)
233 |
237 |
234 | o 98217d5a1659 C-A (default)
238 | o 98217d5a1659 C-A (default)
235 |/
239 |/
236 @ 842e2fac6304 C-ROOT (default)
240 @ 842e2fac6304 C-ROOT (default)
237
241
238
242
239 Creating changesets
243 Creating changesets
240
244
241 $ echo aa >> client-other/a
245 $ echo aa >> client-other/a
242 $ hg -R client-other/ commit -m "C-C"
246 $ hg -R client-other/ commit -m "C-C"
243 $ echo bb >> client-racy/b
247 $ echo bb >> client-racy/b
244 $ hg -R client-racy/ commit -m "C-D"
248 $ hg -R client-racy/ commit -m "C-D"
245
249
246 Pushing
250 Pushing
247
251
248 $ hg -R client-racy push -r 'tip' > ./push-log 2>&1 &
252 $ hg -R client-racy push -r 'tip' > ./push-log 2>&1 &
249
253
250 $ waiton $TESTTMP/readyfile
254 $ waiton $TESTTMP/readyfile
251
255
252 $ hg -R client-other push -r 'tip'
256 $ hg -R client-other push -r 'tip'
253 pushing to ssh://user@dummy/server
257 pushing to ssh://user@dummy/server
254 searching for changes
258 searching for changes
255 remote: adding changesets
259 remote: adding changesets
256 remote: adding manifests
260 remote: adding manifests
257 remote: adding file changes
261 remote: adding file changes
258 remote: added 1 changesets with 1 changes to 1 files
262 remote: added 1 changesets with 1 changes to 1 files
259
263
260 $ release $TESTTMP/watchfile
264 $ release $TESTTMP/watchfile
261
265
262 Check the result of the push
266 Check the result of the push
263
267
264 $ cat ./push-log
268 $ cat ./push-log
265 pushing to ssh://user@dummy/server
269 pushing to ssh://user@dummy/server
266 searching for changes
270 searching for changes
267 wrote ready: $TESTTMP/readyfile
271 wrote ready: $TESTTMP/readyfile
268 waiting on: $TESTTMP/watchfile
272 waiting on: $TESTTMP/watchfile
269 abort: push failed:
273 abort: push failed:
270 'repository changed while pushing - please try again'
274 'repository changed while pushing - please try again'
271
275
272 $ hg -R server graph
276 $ hg -R server graph
273 o 51c544a58128 C-C (default)
277 o 51c544a58128 C-C (default)
274 |
278 |
275 o 98217d5a1659 C-A (default)
279 o 98217d5a1659 C-A (default)
276 |
280 |
277 | o a9149a1428e2 C-B (default)
281 | o a9149a1428e2 C-B (default)
278 |/
282 |/
279 @ 842e2fac6304 C-ROOT (default)
283 @ 842e2fac6304 C-ROOT (default)
280
284
281 Pushing while someone creates a new head
285 Pushing while someone creates a new head
282 -----------------------------------------
286 -----------------------------------------
283
287
284 Pushing a new changeset while someone creates a new branch.
288 Pushing a new changeset while someone creates a new branch.
285
289
286 # a (raced)
290 # a (raced)
287 # |
291 # |
288 # * b
292 # * b
289 # |/
293 # |/
290 # *
294 # *
291
295
292 (resync-all)
296 (resync-all)
293
297
294 $ hg -R ./server pull ./client-racy
298 $ hg -R ./server pull ./client-racy
295 pulling from ./client-racy
299 pulling from ./client-racy
296 searching for changes
300 searching for changes
297 adding changesets
301 adding changesets
298 adding manifests
302 adding manifests
299 adding file changes
303 adding file changes
300 added 1 changesets with 1 changes to 1 files
304 added 1 changesets with 1 changes to 1 files
301 (run 'hg update' to get a working copy)
305 (run 'hg update' to get a working copy)
302 $ hg -R ./client-other pull
306 $ hg -R ./client-other pull
303 pulling from ssh://user@dummy/server
307 pulling from ssh://user@dummy/server
304 searching for changes
308 searching for changes
305 adding changesets
309 adding changesets
306 adding manifests
310 adding manifests
307 adding file changes
311 adding file changes
308 added 1 changesets with 1 changes to 1 files
312 added 1 changesets with 1 changes to 1 files
309 (run 'hg update' to get a working copy)
313 (run 'hg update' to get a working copy)
310 $ hg -R ./client-racy pull
314 $ hg -R ./client-racy pull
311 pulling from ssh://user@dummy/server
315 pulling from ssh://user@dummy/server
312 searching for changes
316 searching for changes
313 adding changesets
317 adding changesets
314 adding manifests
318 adding manifests
315 adding file changes
319 adding file changes
316 added 1 changesets with 1 changes to 1 files
320 added 1 changesets with 1 changes to 1 files
317 (run 'hg update' to get a working copy)
321 (run 'hg update' to get a working copy)
318
322
319 $ hg -R server graph
323 $ hg -R server graph
320 o 59e76faf78bd C-D (default)
324 o 59e76faf78bd C-D (default)
321 |
325 |
322 o a9149a1428e2 C-B (default)
326 o a9149a1428e2 C-B (default)
323 |
327 |
324 | o 51c544a58128 C-C (default)
328 | o 51c544a58128 C-C (default)
325 | |
329 | |
326 | o 98217d5a1659 C-A (default)
330 | o 98217d5a1659 C-A (default)
327 |/
331 |/
328 @ 842e2fac6304 C-ROOT (default)
332 @ 842e2fac6304 C-ROOT (default)
329
333
330
334
331 Creating changesets
335 Creating changesets
332
336
333 (new head)
337 (new head)
334
338
335 $ hg -R client-other/ up 'desc("C-A")'
339 $ hg -R client-other/ up 'desc("C-A")'
336 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
340 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
337 $ echo aaa >> client-other/a
341 $ echo aaa >> client-other/a
338 $ hg -R client-other/ commit -m "C-E"
342 $ hg -R client-other/ commit -m "C-E"
339 created new head
343 created new head
340
344
341 (children of existing head)
345 (children of existing head)
342
346
343 $ hg -R client-racy/ up 'desc("C-C")'
347 $ hg -R client-racy/ up 'desc("C-C")'
344 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
348 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
345 $ echo bbb >> client-racy/a
349 $ echo bbb >> client-racy/a
346 $ hg -R client-racy/ commit -m "C-F"
350 $ hg -R client-racy/ commit -m "C-F"
347
351
348 Pushing
352 Pushing
349
353
350 $ hg -R client-racy push -r 'tip' > ./push-log 2>&1 &
354 $ hg -R client-racy push -r 'tip' > ./push-log 2>&1 &
351
355
352 $ waiton $TESTTMP/readyfile
356 $ waiton $TESTTMP/readyfile
353
357
354 $ hg -R client-other push -fr 'tip'
358 $ hg -R client-other push -fr 'tip'
355 pushing to ssh://user@dummy/server
359 pushing to ssh://user@dummy/server
356 searching for changes
360 searching for changes
357 remote: adding changesets
361 remote: adding changesets
358 remote: adding manifests
362 remote: adding manifests
359 remote: adding file changes
363 remote: adding file changes
360 remote: added 1 changesets with 1 changes to 1 files (+1 heads)
364 remote: added 1 changesets with 1 changes to 1 files (+1 heads)
361
365
362 $ release $TESTTMP/watchfile
366 $ release $TESTTMP/watchfile
363
367
364 Check the result of the push
368 Check the result of the push
365
369
366 $ cat ./push-log
370 $ cat ./push-log
367 pushing to ssh://user@dummy/server
371 pushing to ssh://user@dummy/server
368 searching for changes
372 searching for changes
369 wrote ready: $TESTTMP/readyfile
373 wrote ready: $TESTTMP/readyfile
370 waiting on: $TESTTMP/watchfile
374 waiting on: $TESTTMP/watchfile
371 abort: push failed:
375 abort: push failed:
372 'repository changed while pushing - please try again'
376 'repository changed while pushing - please try again'
373
377
374 $ hg -R server graph
378 $ hg -R server graph
375 o d603e2c0cdd7 C-E (default)
379 o d603e2c0cdd7 C-E (default)
376 |
380 |
377 | o 51c544a58128 C-C (default)
381 | o 51c544a58128 C-C (default)
378 |/
382 |/
379 o 98217d5a1659 C-A (default)
383 o 98217d5a1659 C-A (default)
380 |
384 |
381 | o 59e76faf78bd C-D (default)
385 | o 59e76faf78bd C-D (default)
382 | |
386 | |
383 | o a9149a1428e2 C-B (default)
387 | o a9149a1428e2 C-B (default)
384 |/
388 |/
385 @ 842e2fac6304 C-ROOT (default)
389 @ 842e2fac6304 C-ROOT (default)
386
390
387
391
388 Pushing touching different named branch (same topo): new branch raced
392 Pushing touching different named branch (same topo): new branch raced
389 ---------------------------------------------------------------------
393 ---------------------------------------------------------------------
390
394
391 Pushing two children on the same head, one is a different named branch
395 Pushing two children on the same head, one is a different named branch
392
396
393 # a (raced, branch-a)
397 # a (raced, branch-a)
394 # |
398 # |
395 # | b (default branch)
399 # | b (default branch)
396 # |/
400 # |/
397 # *
401 # *
398
402
399 (resync-all)
403 (resync-all)
400
404
401 $ hg -R ./server pull ./client-racy
405 $ hg -R ./server pull ./client-racy
402 pulling from ./client-racy
406 pulling from ./client-racy
403 searching for changes
407 searching for changes
404 adding changesets
408 adding changesets
405 adding manifests
409 adding manifests
406 adding file changes
410 adding file changes
407 added 1 changesets with 1 changes to 1 files
411 added 1 changesets with 1 changes to 1 files
408 (run 'hg update' to get a working copy)
412 (run 'hg update' to get a working copy)
409 $ hg -R ./client-other pull
413 $ hg -R ./client-other pull
410 pulling from ssh://user@dummy/server
414 pulling from ssh://user@dummy/server
411 searching for changes
415 searching for changes
412 adding changesets
416 adding changesets
413 adding manifests
417 adding manifests
414 adding file changes
418 adding file changes
415 added 1 changesets with 1 changes to 1 files
419 added 1 changesets with 1 changes to 1 files
416 (run 'hg update' to get a working copy)
420 (run 'hg update' to get a working copy)
417 $ hg -R ./client-racy pull
421 $ hg -R ./client-racy pull
418 pulling from ssh://user@dummy/server
422 pulling from ssh://user@dummy/server
419 searching for changes
423 searching for changes
420 adding changesets
424 adding changesets
421 adding manifests
425 adding manifests
422 adding file changes
426 adding file changes
423 added 1 changesets with 1 changes to 1 files (+1 heads)
427 added 1 changesets with 1 changes to 1 files (+1 heads)
424 (run 'hg heads .' to see heads, 'hg merge' to merge)
428 (run 'hg heads .' to see heads, 'hg merge' to merge)
425
429
426 $ hg -R server graph
430 $ hg -R server graph
427 o d9e379a8c432 C-F (default)
431 o d9e379a8c432 C-F (default)
428 |
432 |
429 o 51c544a58128 C-C (default)
433 o 51c544a58128 C-C (default)
430 |
434 |
431 | o d603e2c0cdd7 C-E (default)
435 | o d603e2c0cdd7 C-E (default)
432 |/
436 |/
433 o 98217d5a1659 C-A (default)
437 o 98217d5a1659 C-A (default)
434 |
438 |
435 | o 59e76faf78bd C-D (default)
439 | o 59e76faf78bd C-D (default)
436 | |
440 | |
437 | o a9149a1428e2 C-B (default)
441 | o a9149a1428e2 C-B (default)
438 |/
442 |/
439 @ 842e2fac6304 C-ROOT (default)
443 @ 842e2fac6304 C-ROOT (default)
440
444
441
445
442 Creating changesets
446 Creating changesets
443
447
444 (update existing head)
448 (update existing head)
445
449
446 $ hg -R client-other/ up 'desc("C-F")'
450 $ hg -R client-other/ up 'desc("C-F")'
447 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
451 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
448 $ echo aaa >> client-other/a
452 $ echo aaa >> client-other/a
449 $ hg -R client-other/ commit -m "C-G"
453 $ hg -R client-other/ commit -m "C-G"
450
454
451 (new named branch from that existing head)
455 (new named branch from that existing head)
452
456
453 $ hg -R client-racy/ up 'desc("C-F")'
457 $ hg -R client-racy/ up 'desc("C-F")'
454 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
458 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
455 $ echo bbb >> client-racy/a
459 $ echo bbb >> client-racy/a
456 $ hg -R client-racy/ branch my-first-test-branch
460 $ hg -R client-racy/ branch my-first-test-branch
457 marked working directory as branch my-first-test-branch
461 marked working directory as branch my-first-test-branch
458 (branches are permanent and global, did you want a bookmark?)
462 (branches are permanent and global, did you want a bookmark?)
459 $ hg -R client-racy/ commit -m "C-H"
463 $ hg -R client-racy/ commit -m "C-H"
460
464
461 Pushing
465 Pushing
462
466
463 $ hg -R client-racy push -r 'tip' --new-branch > ./push-log 2>&1 &
467 $ hg -R client-racy push -r 'tip' --new-branch > ./push-log 2>&1 &
464
468
465 $ waiton $TESTTMP/readyfile
469 $ waiton $TESTTMP/readyfile
466
470
467 $ hg -R client-other push -fr 'tip'
471 $ hg -R client-other push -fr 'tip'
468 pushing to ssh://user@dummy/server
472 pushing to ssh://user@dummy/server
469 searching for changes
473 searching for changes
470 remote: adding changesets
474 remote: adding changesets
471 remote: adding manifests
475 remote: adding manifests
472 remote: adding file changes
476 remote: adding file changes
473 remote: added 1 changesets with 1 changes to 1 files
477 remote: added 1 changesets with 1 changes to 1 files
474
478
475 $ release $TESTTMP/watchfile
479 $ release $TESTTMP/watchfile
476
480
477 Check the result of the push
481 Check the result of the push
478
482
479 $ cat ./push-log
483 $ cat ./push-log
480 pushing to ssh://user@dummy/server
484 pushing to ssh://user@dummy/server
481 searching for changes
485 searching for changes
482 wrote ready: $TESTTMP/readyfile
486 wrote ready: $TESTTMP/readyfile
483 waiting on: $TESTTMP/watchfile
487 waiting on: $TESTTMP/watchfile
484 abort: push failed:
488 abort: push failed:
485 'repository changed while pushing - please try again'
489 'repository changed while pushing - please try again'
486
490
487 $ hg -R server graph
491 $ hg -R server graph
488 o 75d69cba5402 C-G (default)
492 o 75d69cba5402 C-G (default)
489 |
493 |
490 o d9e379a8c432 C-F (default)
494 o d9e379a8c432 C-F (default)
491 |
495 |
492 o 51c544a58128 C-C (default)
496 o 51c544a58128 C-C (default)
493 |
497 |
494 | o d603e2c0cdd7 C-E (default)
498 | o d603e2c0cdd7 C-E (default)
495 |/
499 |/
496 o 98217d5a1659 C-A (default)
500 o 98217d5a1659 C-A (default)
497 |
501 |
498 | o 59e76faf78bd C-D (default)
502 | o 59e76faf78bd C-D (default)
499 | |
503 | |
500 | o a9149a1428e2 C-B (default)
504 | o a9149a1428e2 C-B (default)
501 |/
505 |/
502 @ 842e2fac6304 C-ROOT (default)
506 @ 842e2fac6304 C-ROOT (default)
503
507
504
508
505 pushing touching different named branch (same topo): old branch raced
509 pushing touching different named branch (same topo): old branch raced
506 ---------------------------------------------------------------------
510 ---------------------------------------------------------------------
507
511
508 Pushing two children on the same head, one is a different named branch
512 Pushing two children on the same head, one is a different named branch
509
513
510 # a (raced, default-branch)
514 # a (raced, default-branch)
511 # |
515 # |
512 # | b (new branch)
516 # | b (new branch)
513 # |/
517 # |/
514 # * (default-branch)
518 # * (default-branch)
515
519
516 (resync-all)
520 (resync-all)
517
521
518 $ hg -R ./server pull ./client-racy
522 $ hg -R ./server pull ./client-racy
519 pulling from ./client-racy
523 pulling from ./client-racy
520 searching for changes
524 searching for changes
521 adding changesets
525 adding changesets
522 adding manifests
526 adding manifests
523 adding file changes
527 adding file changes
524 added 1 changesets with 1 changes to 1 files (+1 heads)
528 added 1 changesets with 1 changes to 1 files (+1 heads)
525 (run 'hg heads .' to see heads, 'hg merge' to merge)
529 (run 'hg heads .' to see heads, 'hg merge' to merge)
526 $ hg -R ./client-other pull
530 $ hg -R ./client-other pull
527 pulling from ssh://user@dummy/server
531 pulling from ssh://user@dummy/server
528 searching for changes
532 searching for changes
529 adding changesets
533 adding changesets
530 adding manifests
534 adding manifests
531 adding file changes
535 adding file changes
532 added 1 changesets with 1 changes to 1 files (+1 heads)
536 added 1 changesets with 1 changes to 1 files (+1 heads)
533 (run 'hg heads .' to see heads, 'hg merge' to merge)
537 (run 'hg heads .' to see heads, 'hg merge' to merge)
534 $ hg -R ./client-racy pull
538 $ hg -R ./client-racy pull
535 pulling from ssh://user@dummy/server
539 pulling from ssh://user@dummy/server
536 searching for changes
540 searching for changes
537 adding changesets
541 adding changesets
538 adding manifests
542 adding manifests
539 adding file changes
543 adding file changes
540 added 1 changesets with 1 changes to 1 files (+1 heads)
544 added 1 changesets with 1 changes to 1 files (+1 heads)
541 (run 'hg heads' to see heads)
545 (run 'hg heads' to see heads)
542
546
543 $ hg -R server graph
547 $ hg -R server graph
544 o 833be552cfe6 C-H (my-first-test-branch)
548 o 833be552cfe6 C-H (my-first-test-branch)
545 |
549 |
546 | o 75d69cba5402 C-G (default)
550 | o 75d69cba5402 C-G (default)
547 |/
551 |/
548 o d9e379a8c432 C-F (default)
552 o d9e379a8c432 C-F (default)
549 |
553 |
550 o 51c544a58128 C-C (default)
554 o 51c544a58128 C-C (default)
551 |
555 |
552 | o d603e2c0cdd7 C-E (default)
556 | o d603e2c0cdd7 C-E (default)
553 |/
557 |/
554 o 98217d5a1659 C-A (default)
558 o 98217d5a1659 C-A (default)
555 |
559 |
556 | o 59e76faf78bd C-D (default)
560 | o 59e76faf78bd C-D (default)
557 | |
561 | |
558 | o a9149a1428e2 C-B (default)
562 | o a9149a1428e2 C-B (default)
559 |/
563 |/
560 @ 842e2fac6304 C-ROOT (default)
564 @ 842e2fac6304 C-ROOT (default)
561
565
562
566
563 Creating changesets
567 Creating changesets
564
568
565 (new named branch from one head)
569 (new named branch from one head)
566
570
567 $ hg -R client-other/ up 'desc("C-G")'
571 $ hg -R client-other/ up 'desc("C-G")'
568 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
572 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
569 $ echo aaa >> client-other/a
573 $ echo aaa >> client-other/a
570 $ hg -R client-other/ branch my-second-test-branch
574 $ hg -R client-other/ branch my-second-test-branch
571 marked working directory as branch my-second-test-branch
575 marked working directory as branch my-second-test-branch
572 $ hg -R client-other/ commit -m "C-I"
576 $ hg -R client-other/ commit -m "C-I"
573
577
574 (children "updating" that same head)
578 (children "updating" that same head)
575
579
576 $ hg -R client-racy/ up 'desc("C-G")'
580 $ hg -R client-racy/ up 'desc("C-G")'
577 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
581 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
578 $ echo bbb >> client-racy/a
582 $ echo bbb >> client-racy/a
579 $ hg -R client-racy/ commit -m "C-J"
583 $ hg -R client-racy/ commit -m "C-J"
580
584
581 Pushing
585 Pushing
582
586
583 $ hg -R client-racy push -r 'tip' > ./push-log 2>&1 &
587 $ hg -R client-racy push -r 'tip' > ./push-log 2>&1 &
584
588
585 $ waiton $TESTTMP/readyfile
589 $ waiton $TESTTMP/readyfile
586
590
587 $ hg -R client-other push -fr 'tip' --new-branch
591 $ hg -R client-other push -fr 'tip' --new-branch
588 pushing to ssh://user@dummy/server
592 pushing to ssh://user@dummy/server
589 searching for changes
593 searching for changes
590 remote: adding changesets
594 remote: adding changesets
591 remote: adding manifests
595 remote: adding manifests
592 remote: adding file changes
596 remote: adding file changes
593 remote: added 1 changesets with 1 changes to 1 files
597 remote: added 1 changesets with 1 changes to 1 files
594
598
595 $ release $TESTTMP/watchfile
599 $ release $TESTTMP/watchfile
596
600
597 Check the result of the push
601 Check the result of the push
598
602
599 $ cat ./push-log
603 $ cat ./push-log
600 pushing to ssh://user@dummy/server
604 pushing to ssh://user@dummy/server
601 searching for changes
605 searching for changes
602 wrote ready: $TESTTMP/readyfile
606 wrote ready: $TESTTMP/readyfile
603 waiting on: $TESTTMP/watchfile
607 waiting on: $TESTTMP/watchfile
604 abort: push failed:
608 abort: push failed:
605 'repository changed while pushing - please try again'
609 'repository changed while pushing - please try again'
606
610
607 $ hg -R server graph
611 $ hg -R server graph
608 o b35ed749f288 C-I (my-second-test-branch)
612 o b35ed749f288 C-I (my-second-test-branch)
609 |
613 |
610 o 75d69cba5402 C-G (default)
614 o 75d69cba5402 C-G (default)
611 |
615 |
612 | o 833be552cfe6 C-H (my-first-test-branch)
616 | o 833be552cfe6 C-H (my-first-test-branch)
613 |/
617 |/
614 o d9e379a8c432 C-F (default)
618 o d9e379a8c432 C-F (default)
615 |
619 |
616 o 51c544a58128 C-C (default)
620 o 51c544a58128 C-C (default)
617 |
621 |
618 | o d603e2c0cdd7 C-E (default)
622 | o d603e2c0cdd7 C-E (default)
619 |/
623 |/
620 o 98217d5a1659 C-A (default)
624 o 98217d5a1659 C-A (default)
621 |
625 |
622 | o 59e76faf78bd C-D (default)
626 | o 59e76faf78bd C-D (default)
623 | |
627 | |
624 | o a9149a1428e2 C-B (default)
628 | o a9149a1428e2 C-B (default)
625 |/
629 |/
626 @ 842e2fac6304 C-ROOT (default)
630 @ 842e2fac6304 C-ROOT (default)
627
631
628
632
629 pushing racing push touch multiple heads
633 pushing racing push touch multiple heads
630 ----------------------------------------
634 ----------------------------------------
631
635
632 There are multiple heads, but the racing push touch all of them
636 There are multiple heads, but the racing push touch all of them
633
637
634 # a (raced)
638 # a (raced)
635 # | b
639 # | b
636 # |/|
640 # |/|
637 # * *
641 # * *
638 # |/
642 # |/
639 # *
643 # *
640
644
641 (resync-all)
645 (resync-all)
642
646
643 $ hg -R ./server pull ./client-racy
647 $ hg -R ./server pull ./client-racy
644 pulling from ./client-racy
648 pulling from ./client-racy
645 searching for changes
649 searching for changes
646 adding changesets
650 adding changesets
647 adding manifests
651 adding manifests
648 adding file changes
652 adding file changes
649 added 1 changesets with 1 changes to 1 files (+1 heads)
653 added 1 changesets with 1 changes to 1 files (+1 heads)
650 (run 'hg heads .' to see heads, 'hg merge' to merge)
654 (run 'hg heads .' to see heads, 'hg merge' to merge)
651 $ hg -R ./client-other pull
655 $ hg -R ./client-other pull
652 pulling from ssh://user@dummy/server
656 pulling from ssh://user@dummy/server
653 searching for changes
657 searching for changes
654 adding changesets
658 adding changesets
655 adding manifests
659 adding manifests
656 adding file changes
660 adding file changes
657 added 1 changesets with 1 changes to 1 files (+1 heads)
661 added 1 changesets with 1 changes to 1 files (+1 heads)
658 (run 'hg heads' to see heads)
662 (run 'hg heads' to see heads)
659 $ hg -R ./client-racy pull
663 $ hg -R ./client-racy pull
660 pulling from ssh://user@dummy/server
664 pulling from ssh://user@dummy/server
661 searching for changes
665 searching for changes
662 adding changesets
666 adding changesets
663 adding manifests
667 adding manifests
664 adding file changes
668 adding file changes
665 added 1 changesets with 1 changes to 1 files (+1 heads)
669 added 1 changesets with 1 changes to 1 files (+1 heads)
666 (run 'hg heads .' to see heads, 'hg merge' to merge)
670 (run 'hg heads .' to see heads, 'hg merge' to merge)
667
671
668 $ hg -R server graph
672 $ hg -R server graph
669 o 89420bf00fae C-J (default)
673 o 89420bf00fae C-J (default)
670 |
674 |
671 | o b35ed749f288 C-I (my-second-test-branch)
675 | o b35ed749f288 C-I (my-second-test-branch)
672 |/
676 |/
673 o 75d69cba5402 C-G (default)
677 o 75d69cba5402 C-G (default)
674 |
678 |
675 | o 833be552cfe6 C-H (my-first-test-branch)
679 | o 833be552cfe6 C-H (my-first-test-branch)
676 |/
680 |/
677 o d9e379a8c432 C-F (default)
681 o d9e379a8c432 C-F (default)
678 |
682 |
679 o 51c544a58128 C-C (default)
683 o 51c544a58128 C-C (default)
680 |
684 |
681 | o d603e2c0cdd7 C-E (default)
685 | o d603e2c0cdd7 C-E (default)
682 |/
686 |/
683 o 98217d5a1659 C-A (default)
687 o 98217d5a1659 C-A (default)
684 |
688 |
685 | o 59e76faf78bd C-D (default)
689 | o 59e76faf78bd C-D (default)
686 | |
690 | |
687 | o a9149a1428e2 C-B (default)
691 | o a9149a1428e2 C-B (default)
688 |/
692 |/
689 @ 842e2fac6304 C-ROOT (default)
693 @ 842e2fac6304 C-ROOT (default)
690
694
691
695
692 Creating changesets
696 Creating changesets
693
697
694 (merges heads)
698 (merges heads)
695
699
696 $ hg -R client-other/ up 'desc("C-E")'
700 $ hg -R client-other/ up 'desc("C-E")'
697 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
701 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
698 $ hg -R client-other/ merge 'desc("C-D")'
702 $ hg -R client-other/ merge 'desc("C-D")'
699 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
703 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
700 (branch merge, don't forget to commit)
704 (branch merge, don't forget to commit)
701 $ hg -R client-other/ commit -m "C-K"
705 $ hg -R client-other/ commit -m "C-K"
702
706
703 (update one head)
707 (update one head)
704
708
705 $ hg -R client-racy/ up 'desc("C-D")'
709 $ hg -R client-racy/ up 'desc("C-D")'
706 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
710 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
707 $ echo bbb >> client-racy/b
711 $ echo bbb >> client-racy/b
708 $ hg -R client-racy/ commit -m "C-L"
712 $ hg -R client-racy/ commit -m "C-L"
709
713
710 Pushing
714 Pushing
711
715
712 $ hg -R client-racy push -r 'tip' > ./push-log 2>&1 &
716 $ hg -R client-racy push -r 'tip' > ./push-log 2>&1 &
713
717
714 $ waiton $TESTTMP/readyfile
718 $ waiton $TESTTMP/readyfile
715
719
716 $ hg -R client-other push -fr 'tip' --new-branch
720 $ hg -R client-other push -fr 'tip' --new-branch
717 pushing to ssh://user@dummy/server
721 pushing to ssh://user@dummy/server
718 searching for changes
722 searching for changes
719 remote: adding changesets
723 remote: adding changesets
720 remote: adding manifests
724 remote: adding manifests
721 remote: adding file changes
725 remote: adding file changes
722 remote: added 1 changesets with 0 changes to 0 files (-1 heads)
726 remote: added 1 changesets with 0 changes to 0 files (-1 heads)
723
727
724 $ release $TESTTMP/watchfile
728 $ release $TESTTMP/watchfile
725
729
726 Check the result of the push
730 Check the result of the push
727
731
728 $ cat ./push-log
732 $ cat ./push-log
729 pushing to ssh://user@dummy/server
733 pushing to ssh://user@dummy/server
730 searching for changes
734 searching for changes
731 wrote ready: $TESTTMP/readyfile
735 wrote ready: $TESTTMP/readyfile
732 waiting on: $TESTTMP/watchfile
736 waiting on: $TESTTMP/watchfile
733 abort: push failed:
737 abort: push failed:
734 'repository changed while pushing - please try again'
738 'repository changed while pushing - please try again'
735
739
736 $ hg -R server graph
740 $ hg -R server graph
737 o be705100c623 C-K (default)
741 o be705100c623 C-K (default)
738 |\
742 |\
739 | o d603e2c0cdd7 C-E (default)
743 | o d603e2c0cdd7 C-E (default)
740 | |
744 | |
741 o | 59e76faf78bd C-D (default)
745 o | 59e76faf78bd C-D (default)
742 | |
746 | |
743 | | o 89420bf00fae C-J (default)
747 | | o 89420bf00fae C-J (default)
744 | | |
748 | | |
745 | | | o b35ed749f288 C-I (my-second-test-branch)
749 | | | o b35ed749f288 C-I (my-second-test-branch)
746 | | |/
750 | | |/
747 | | o 75d69cba5402 C-G (default)
751 | | o 75d69cba5402 C-G (default)
748 | | |
752 | | |
749 | | | o 833be552cfe6 C-H (my-first-test-branch)
753 | | | o 833be552cfe6 C-H (my-first-test-branch)
750 | | |/
754 | | |/
751 | | o d9e379a8c432 C-F (default)
755 | | o d9e379a8c432 C-F (default)
752 | | |
756 | | |
753 | | o 51c544a58128 C-C (default)
757 | | o 51c544a58128 C-C (default)
754 | |/
758 | |/
755 o | a9149a1428e2 C-B (default)
759 o | a9149a1428e2 C-B (default)
756 | |
760 | |
757 | o 98217d5a1659 C-A (default)
761 | o 98217d5a1659 C-A (default)
758 |/
762 |/
759 @ 842e2fac6304 C-ROOT (default)
763 @ 842e2fac6304 C-ROOT (default)
760
764
761
765
762 pushing raced push touch multiple heads
766 pushing raced push touch multiple heads
763 ---------------------------------------
767 ---------------------------------------
764
768
765 There are multiple heads, the raced push touch all of them
769 There are multiple heads, the raced push touch all of them
766
770
767 # b
771 # b
768 # | a (raced)
772 # | a (raced)
769 # |/|
773 # |/|
770 # * *
774 # * *
771 # |/
775 # |/
772 # *
776 # *
773
777
774 (resync-all)
778 (resync-all)
775
779
776 $ hg -R ./server pull ./client-racy
780 $ hg -R ./server pull ./client-racy
777 pulling from ./client-racy
781 pulling from ./client-racy
778 searching for changes
782 searching for changes
779 adding changesets
783 adding changesets
780 adding manifests
784 adding manifests
781 adding file changes
785 adding file changes
782 added 1 changesets with 1 changes to 1 files (+1 heads)
786 added 1 changesets with 1 changes to 1 files (+1 heads)
783 (run 'hg heads .' to see heads, 'hg merge' to merge)
787 (run 'hg heads .' to see heads, 'hg merge' to merge)
784 $ hg -R ./client-other pull
788 $ hg -R ./client-other pull
785 pulling from ssh://user@dummy/server
789 pulling from ssh://user@dummy/server
786 searching for changes
790 searching for changes
787 adding changesets
791 adding changesets
788 adding manifests
792 adding manifests
789 adding file changes
793 adding file changes
790 added 1 changesets with 1 changes to 1 files (+1 heads)
794 added 1 changesets with 1 changes to 1 files (+1 heads)
791 (run 'hg heads .' to see heads, 'hg merge' to merge)
795 (run 'hg heads .' to see heads, 'hg merge' to merge)
792 $ hg -R ./client-racy pull
796 $ hg -R ./client-racy pull
793 pulling from ssh://user@dummy/server
797 pulling from ssh://user@dummy/server
794 searching for changes
798 searching for changes
795 adding changesets
799 adding changesets
796 adding manifests
800 adding manifests
797 adding file changes
801 adding file changes
798 added 1 changesets with 0 changes to 0 files
802 added 1 changesets with 0 changes to 0 files
799 (run 'hg update' to get a working copy)
803 (run 'hg update' to get a working copy)
800
804
801 $ hg -R server graph
805 $ hg -R server graph
802 o cac2cead0ff0 C-L (default)
806 o cac2cead0ff0 C-L (default)
803 |
807 |
804 | o be705100c623 C-K (default)
808 | o be705100c623 C-K (default)
805 |/|
809 |/|
806 | o d603e2c0cdd7 C-E (default)
810 | o d603e2c0cdd7 C-E (default)
807 | |
811 | |
808 o | 59e76faf78bd C-D (default)
812 o | 59e76faf78bd C-D (default)
809 | |
813 | |
810 | | o 89420bf00fae C-J (default)
814 | | o 89420bf00fae C-J (default)
811 | | |
815 | | |
812 | | | o b35ed749f288 C-I (my-second-test-branch)
816 | | | o b35ed749f288 C-I (my-second-test-branch)
813 | | |/
817 | | |/
814 | | o 75d69cba5402 C-G (default)
818 | | o 75d69cba5402 C-G (default)
815 | | |
819 | | |
816 | | | o 833be552cfe6 C-H (my-first-test-branch)
820 | | | o 833be552cfe6 C-H (my-first-test-branch)
817 | | |/
821 | | |/
818 | | o d9e379a8c432 C-F (default)
822 | | o d9e379a8c432 C-F (default)
819 | | |
823 | | |
820 | | o 51c544a58128 C-C (default)
824 | | o 51c544a58128 C-C (default)
821 | |/
825 | |/
822 o | a9149a1428e2 C-B (default)
826 o | a9149a1428e2 C-B (default)
823 | |
827 | |
824 | o 98217d5a1659 C-A (default)
828 | o 98217d5a1659 C-A (default)
825 |/
829 |/
826 @ 842e2fac6304 C-ROOT (default)
830 @ 842e2fac6304 C-ROOT (default)
827
831
828
832
829 Creating changesets
833 Creating changesets
830
834
831 (update existing head)
835 (update existing head)
832
836
833 $ echo aaa >> client-other/a
837 $ echo aaa >> client-other/a
834 $ hg -R client-other/ commit -m "C-M"
838 $ hg -R client-other/ commit -m "C-M"
835
839
836 (merge heads)
840 (merge heads)
837
841
838 $ hg -R client-racy/ merge 'desc("C-K")'
842 $ hg -R client-racy/ merge 'desc("C-K")'
839 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
843 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
840 (branch merge, don't forget to commit)
844 (branch merge, don't forget to commit)
841 $ hg -R client-racy/ commit -m "C-N"
845 $ hg -R client-racy/ commit -m "C-N"
842
846
843 Pushing
847 Pushing
844
848
845 $ hg -R client-racy push -r 'tip' > ./push-log 2>&1 &
849 $ hg -R client-racy push -r 'tip' > ./push-log 2>&1 &
846
850
847 $ waiton $TESTTMP/readyfile
851 $ waiton $TESTTMP/readyfile
848
852
849 $ hg -R client-other push -fr 'tip' --new-branch
853 $ hg -R client-other push -fr 'tip' --new-branch
850 pushing to ssh://user@dummy/server
854 pushing to ssh://user@dummy/server
851 searching for changes
855 searching for changes
852 remote: adding changesets
856 remote: adding changesets
853 remote: adding manifests
857 remote: adding manifests
854 remote: adding file changes
858 remote: adding file changes
855 remote: added 1 changesets with 1 changes to 1 files
859 remote: added 1 changesets with 1 changes to 1 files
856
860
857 $ release $TESTTMP/watchfile
861 $ release $TESTTMP/watchfile
858
862
859 Check the result of the push
863 Check the result of the push
860
864
861 $ cat ./push-log
865 $ cat ./push-log
862 pushing to ssh://user@dummy/server
866 pushing to ssh://user@dummy/server
863 searching for changes
867 searching for changes
864 wrote ready: $TESTTMP/readyfile
868 wrote ready: $TESTTMP/readyfile
865 waiting on: $TESTTMP/watchfile
869 waiting on: $TESTTMP/watchfile
866 abort: push failed:
870 abort: push failed:
867 'repository changed while pushing - please try again'
871 'repository changed while pushing - please try again'
868
872
869 $ hg -R server graph
873 $ hg -R server graph
870 o 6fd3090135df C-M (default)
874 o 6fd3090135df C-M (default)
871 |
875 |
872 o be705100c623 C-K (default)
876 o be705100c623 C-K (default)
873 |\
877 |\
874 | o d603e2c0cdd7 C-E (default)
878 | o d603e2c0cdd7 C-E (default)
875 | |
879 | |
876 +---o cac2cead0ff0 C-L (default)
880 +---o cac2cead0ff0 C-L (default)
877 | |
881 | |
878 o | 59e76faf78bd C-D (default)
882 o | 59e76faf78bd C-D (default)
879 | |
883 | |
880 | | o 89420bf00fae C-J (default)
884 | | o 89420bf00fae C-J (default)
881 | | |
885 | | |
882 | | | o b35ed749f288 C-I (my-second-test-branch)
886 | | | o b35ed749f288 C-I (my-second-test-branch)
883 | | |/
887 | | |/
884 | | o 75d69cba5402 C-G (default)
888 | | o 75d69cba5402 C-G (default)
885 | | |
889 | | |
886 | | | o 833be552cfe6 C-H (my-first-test-branch)
890 | | | o 833be552cfe6 C-H (my-first-test-branch)
887 | | |/
891 | | |/
888 | | o d9e379a8c432 C-F (default)
892 | | o d9e379a8c432 C-F (default)
889 | | |
893 | | |
890 | | o 51c544a58128 C-C (default)
894 | | o 51c544a58128 C-C (default)
891 | |/
895 | |/
892 o | a9149a1428e2 C-B (default)
896 o | a9149a1428e2 C-B (default)
893 | |
897 | |
894 | o 98217d5a1659 C-A (default)
898 | o 98217d5a1659 C-A (default)
895 |/
899 |/
896 @ 842e2fac6304 C-ROOT (default)
900 @ 842e2fac6304 C-ROOT (default)
897
901
898
902
899 racing commit push a new head behind another named branch
903 racing commit push a new head behind another named branch
900 ---------------------------------------------------------
904 ---------------------------------------------------------
901
905
902 non-continuous branch are valid case, we tests for them.
906 non-continuous branch are valid case, we tests for them.
903
907
904 # b (branch default)
908 # b (branch default)
905 # |
909 # |
906 # o (branch foo)
910 # o (branch foo)
907 # |
911 # |
908 # | a (raced, branch default)
912 # | a (raced, branch default)
909 # |/
913 # |/
910 # * (branch foo)
914 # * (branch foo)
911 # |
915 # |
912 # * (branch default)
916 # * (branch default)
913
917
914 (resync-all + other branch)
918 (resync-all + other branch)
915
919
916 $ hg -R ./server pull ./client-racy
920 $ hg -R ./server pull ./client-racy
917 pulling from ./client-racy
921 pulling from ./client-racy
918 searching for changes
922 searching for changes
919 adding changesets
923 adding changesets
920 adding manifests
924 adding manifests
921 adding file changes
925 adding file changes
922 added 1 changesets with 0 changes to 0 files
926 added 1 changesets with 0 changes to 0 files
923 (run 'hg update' to get a working copy)
927 (run 'hg update' to get a working copy)
924
928
925 (creates named branch on head)
929 (creates named branch on head)
926
930
927 $ hg -R ./server/ up 'desc("C-N")'
931 $ hg -R ./server/ up 'desc("C-N")'
928 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
932 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
929 $ hg -R ./server/ branch other
933 $ hg -R ./server/ branch other
930 marked working directory as branch other
934 marked working directory as branch other
931 $ hg -R ./server/ ci -m "C-Z"
935 $ hg -R ./server/ ci -m "C-Z"
932 $ hg -R ./server/ up null
936 $ hg -R ./server/ up null
933 0 files updated, 0 files merged, 3 files removed, 0 files unresolved
937 0 files updated, 0 files merged, 3 files removed, 0 files unresolved
934
938
935 (sync client)
939 (sync client)
936
940
937 $ hg -R ./client-other pull
941 $ hg -R ./client-other pull
938 pulling from ssh://user@dummy/server
942 pulling from ssh://user@dummy/server
939 searching for changes
943 searching for changes
940 adding changesets
944 adding changesets
941 adding manifests
945 adding manifests
942 adding file changes
946 adding file changes
943 added 2 changesets with 0 changes to 0 files
947 added 2 changesets with 0 changes to 0 files
944 (run 'hg update' to get a working copy)
948 (run 'hg update' to get a working copy)
945 $ hg -R ./client-racy pull
949 $ hg -R ./client-racy pull
946 pulling from ssh://user@dummy/server
950 pulling from ssh://user@dummy/server
947 searching for changes
951 searching for changes
948 adding changesets
952 adding changesets
949 adding manifests
953 adding manifests
950 adding file changes
954 adding file changes
951 added 2 changesets with 1 changes to 1 files (+1 heads)
955 added 2 changesets with 1 changes to 1 files (+1 heads)
952 (run 'hg heads .' to see heads, 'hg merge' to merge)
956 (run 'hg heads .' to see heads, 'hg merge' to merge)
953
957
954 $ hg -R server graph
958 $ hg -R server graph
955 o 55a6f1c01b48 C-Z (other)
959 o 55a6f1c01b48 C-Z (other)
956 |
960 |
957 o 866a66e18630 C-N (default)
961 o 866a66e18630 C-N (default)
958 |\
962 |\
959 +---o 6fd3090135df C-M (default)
963 +---o 6fd3090135df C-M (default)
960 | |
964 | |
961 | o cac2cead0ff0 C-L (default)
965 | o cac2cead0ff0 C-L (default)
962 | |
966 | |
963 o | be705100c623 C-K (default)
967 o | be705100c623 C-K (default)
964 |\|
968 |\|
965 o | d603e2c0cdd7 C-E (default)
969 o | d603e2c0cdd7 C-E (default)
966 | |
970 | |
967 | o 59e76faf78bd C-D (default)
971 | o 59e76faf78bd C-D (default)
968 | |
972 | |
969 | | o 89420bf00fae C-J (default)
973 | | o 89420bf00fae C-J (default)
970 | | |
974 | | |
971 | | | o b35ed749f288 C-I (my-second-test-branch)
975 | | | o b35ed749f288 C-I (my-second-test-branch)
972 | | |/
976 | | |/
973 | | o 75d69cba5402 C-G (default)
977 | | o 75d69cba5402 C-G (default)
974 | | |
978 | | |
975 | | | o 833be552cfe6 C-H (my-first-test-branch)
979 | | | o 833be552cfe6 C-H (my-first-test-branch)
976 | | |/
980 | | |/
977 | | o d9e379a8c432 C-F (default)
981 | | o d9e379a8c432 C-F (default)
978 | | |
982 | | |
979 +---o 51c544a58128 C-C (default)
983 +---o 51c544a58128 C-C (default)
980 | |
984 | |
981 | o a9149a1428e2 C-B (default)
985 | o a9149a1428e2 C-B (default)
982 | |
986 | |
983 o | 98217d5a1659 C-A (default)
987 o | 98217d5a1659 C-A (default)
984 |/
988 |/
985 o 842e2fac6304 C-ROOT (default)
989 o 842e2fac6304 C-ROOT (default)
986
990
987
991
988 Creating changesets
992 Creating changesets
989
993
990 (update default head through another named branch one)
994 (update default head through another named branch one)
991
995
992 $ hg -R client-other/ up 'desc("C-Z")'
996 $ hg -R client-other/ up 'desc("C-Z")'
993 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
997 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
994 $ echo aaa >> client-other/a
998 $ echo aaa >> client-other/a
995 $ hg -R client-other/ commit -m "C-O"
999 $ hg -R client-other/ commit -m "C-O"
996 $ echo aaa >> client-other/a
1000 $ echo aaa >> client-other/a
997 $ hg -R client-other/ branch --force default
1001 $ hg -R client-other/ branch --force default
998 marked working directory as branch default
1002 marked working directory as branch default
999 $ hg -R client-other/ commit -m "C-P"
1003 $ hg -R client-other/ commit -m "C-P"
1000 created new head
1004 created new head
1001
1005
1002 (update default head)
1006 (update default head)
1003
1007
1004 $ hg -R client-racy/ up 'desc("C-Z")'
1008 $ hg -R client-racy/ up 'desc("C-Z")'
1005 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
1009 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
1006 $ echo bbb >> client-other/a
1010 $ echo bbb >> client-other/a
1007 $ hg -R client-racy/ branch --force default
1011 $ hg -R client-racy/ branch --force default
1008 marked working directory as branch default
1012 marked working directory as branch default
1009 $ hg -R client-racy/ commit -m "C-Q"
1013 $ hg -R client-racy/ commit -m "C-Q"
1010 created new head
1014 created new head
1011
1015
1012 Pushing
1016 Pushing
1013
1017
1014 $ hg -R client-racy push -r 'tip' > ./push-log 2>&1 &
1018 $ hg -R client-racy push -r 'tip' > ./push-log 2>&1 &
1015
1019
1016 $ waiton $TESTTMP/readyfile
1020 $ waiton $TESTTMP/readyfile
1017
1021
1018 $ hg -R client-other push -fr 'tip' --new-branch
1022 $ hg -R client-other push -fr 'tip' --new-branch
1019 pushing to ssh://user@dummy/server
1023 pushing to ssh://user@dummy/server
1020 searching for changes
1024 searching for changes
1021 remote: adding changesets
1025 remote: adding changesets
1022 remote: adding manifests
1026 remote: adding manifests
1023 remote: adding file changes
1027 remote: adding file changes
1024 remote: added 2 changesets with 1 changes to 1 files
1028 remote: added 2 changesets with 1 changes to 1 files
1025
1029
1026 $ release $TESTTMP/watchfile
1030 $ release $TESTTMP/watchfile
1027
1031
1028 Check the result of the push
1032 Check the result of the push
1029
1033
1030 $ cat ./push-log
1034 $ cat ./push-log
1031 pushing to ssh://user@dummy/server
1035 pushing to ssh://user@dummy/server
1032 searching for changes
1036 searching for changes
1033 wrote ready: $TESTTMP/readyfile
1037 wrote ready: $TESTTMP/readyfile
1034 waiting on: $TESTTMP/watchfile
1038 waiting on: $TESTTMP/watchfile
1035 abort: push failed:
1039 abort: push failed:
1036 'repository changed while pushing - please try again'
1040 'repository changed while pushing - please try again'
1037
1041
1038 $ hg -R server graph
1042 $ hg -R server graph
1039 o 1b58ee3f79e5 C-P (default)
1043 o 1b58ee3f79e5 C-P (default)
1040 |
1044 |
1041 o d0a85b2252a9 C-O (other)
1045 o d0a85b2252a9 C-O (other)
1042 |
1046 |
1043 o 55a6f1c01b48 C-Z (other)
1047 o 55a6f1c01b48 C-Z (other)
1044 |
1048 |
1045 o 866a66e18630 C-N (default)
1049 o 866a66e18630 C-N (default)
1046 |\
1050 |\
1047 +---o 6fd3090135df C-M (default)
1051 +---o 6fd3090135df C-M (default)
1048 | |
1052 | |
1049 | o cac2cead0ff0 C-L (default)
1053 | o cac2cead0ff0 C-L (default)
1050 | |
1054 | |
1051 o | be705100c623 C-K (default)
1055 o | be705100c623 C-K (default)
1052 |\|
1056 |\|
1053 o | d603e2c0cdd7 C-E (default)
1057 o | d603e2c0cdd7 C-E (default)
1054 | |
1058 | |
1055 | o 59e76faf78bd C-D (default)
1059 | o 59e76faf78bd C-D (default)
1056 | |
1060 | |
1057 | | o 89420bf00fae C-J (default)
1061 | | o 89420bf00fae C-J (default)
1058 | | |
1062 | | |
1059 | | | o b35ed749f288 C-I (my-second-test-branch)
1063 | | | o b35ed749f288 C-I (my-second-test-branch)
1060 | | |/
1064 | | |/
1061 | | o 75d69cba5402 C-G (default)
1065 | | o 75d69cba5402 C-G (default)
1062 | | |
1066 | | |
1063 | | | o 833be552cfe6 C-H (my-first-test-branch)
1067 | | | o 833be552cfe6 C-H (my-first-test-branch)
1064 | | |/
1068 | | |/
1065 | | o d9e379a8c432 C-F (default)
1069 | | o d9e379a8c432 C-F (default)
1066 | | |
1070 | | |
1067 +---o 51c544a58128 C-C (default)
1071 +---o 51c544a58128 C-C (default)
1068 | |
1072 | |
1069 | o a9149a1428e2 C-B (default)
1073 | o a9149a1428e2 C-B (default)
1070 | |
1074 | |
1071 o | 98217d5a1659 C-A (default)
1075 o | 98217d5a1659 C-A (default)
1072 |/
1076 |/
1073 o 842e2fac6304 C-ROOT (default)
1077 o 842e2fac6304 C-ROOT (default)
1074
1078
1075
1079
1076 raced commit push a new head behind another named branch
1080 raced commit push a new head behind another named branch
1077 ---------------------------------------------------------
1081 ---------------------------------------------------------
1078
1082
1079 non-continuous branch are valid case, we tests for them.
1083 non-continuous branch are valid case, we tests for them.
1080
1084
1081 # b (raced branch default)
1085 # b (raced branch default)
1082 # |
1086 # |
1083 # o (branch foo)
1087 # o (branch foo)
1084 # |
1088 # |
1085 # | a (branch default)
1089 # | a (branch default)
1086 # |/
1090 # |/
1087 # * (branch foo)
1091 # * (branch foo)
1088 # |
1092 # |
1089 # * (branch default)
1093 # * (branch default)
1090
1094
1091 (resync-all)
1095 (resync-all)
1092
1096
1093 $ hg -R ./server pull ./client-racy
1097 $ hg -R ./server pull ./client-racy
1094 pulling from ./client-racy
1098 pulling from ./client-racy
1095 searching for changes
1099 searching for changes
1096 adding changesets
1100 adding changesets
1097 adding manifests
1101 adding manifests
1098 adding file changes
1102 adding file changes
1099 added 1 changesets with 0 changes to 0 files (+1 heads)
1103 added 1 changesets with 0 changes to 0 files (+1 heads)
1100 (run 'hg heads .' to see heads, 'hg merge' to merge)
1104 (run 'hg heads .' to see heads, 'hg merge' to merge)
1101 $ hg -R ./client-other pull
1105 $ hg -R ./client-other pull
1102 pulling from ssh://user@dummy/server
1106 pulling from ssh://user@dummy/server
1103 searching for changes
1107 searching for changes
1104 adding changesets
1108 adding changesets
1105 adding manifests
1109 adding manifests
1106 adding file changes
1110 adding file changes
1107 added 1 changesets with 0 changes to 0 files (+1 heads)
1111 added 1 changesets with 0 changes to 0 files (+1 heads)
1108 (run 'hg heads .' to see heads, 'hg merge' to merge)
1112 (run 'hg heads .' to see heads, 'hg merge' to merge)
1109 $ hg -R ./client-racy pull
1113 $ hg -R ./client-racy pull
1110 pulling from ssh://user@dummy/server
1114 pulling from ssh://user@dummy/server
1111 searching for changes
1115 searching for changes
1112 adding changesets
1116 adding changesets
1113 adding manifests
1117 adding manifests
1114 adding file changes
1118 adding file changes
1115 added 2 changesets with 1 changes to 1 files (+1 heads)
1119 added 2 changesets with 1 changes to 1 files (+1 heads)
1116 (run 'hg heads .' to see heads, 'hg merge' to merge)
1120 (run 'hg heads .' to see heads, 'hg merge' to merge)
1117
1121
1118 $ hg -R server graph
1122 $ hg -R server graph
1119 o b0ee3d6f51bc C-Q (default)
1123 o b0ee3d6f51bc C-Q (default)
1120 |
1124 |
1121 | o 1b58ee3f79e5 C-P (default)
1125 | o 1b58ee3f79e5 C-P (default)
1122 | |
1126 | |
1123 | o d0a85b2252a9 C-O (other)
1127 | o d0a85b2252a9 C-O (other)
1124 |/
1128 |/
1125 o 55a6f1c01b48 C-Z (other)
1129 o 55a6f1c01b48 C-Z (other)
1126 |
1130 |
1127 o 866a66e18630 C-N (default)
1131 o 866a66e18630 C-N (default)
1128 |\
1132 |\
1129 +---o 6fd3090135df C-M (default)
1133 +---o 6fd3090135df C-M (default)
1130 | |
1134 | |
1131 | o cac2cead0ff0 C-L (default)
1135 | o cac2cead0ff0 C-L (default)
1132 | |
1136 | |
1133 o | be705100c623 C-K (default)
1137 o | be705100c623 C-K (default)
1134 |\|
1138 |\|
1135 o | d603e2c0cdd7 C-E (default)
1139 o | d603e2c0cdd7 C-E (default)
1136 | |
1140 | |
1137 | o 59e76faf78bd C-D (default)
1141 | o 59e76faf78bd C-D (default)
1138 | |
1142 | |
1139 | | o 89420bf00fae C-J (default)
1143 | | o 89420bf00fae C-J (default)
1140 | | |
1144 | | |
1141 | | | o b35ed749f288 C-I (my-second-test-branch)
1145 | | | o b35ed749f288 C-I (my-second-test-branch)
1142 | | |/
1146 | | |/
1143 | | o 75d69cba5402 C-G (default)
1147 | | o 75d69cba5402 C-G (default)
1144 | | |
1148 | | |
1145 | | | o 833be552cfe6 C-H (my-first-test-branch)
1149 | | | o 833be552cfe6 C-H (my-first-test-branch)
1146 | | |/
1150 | | |/
1147 | | o d9e379a8c432 C-F (default)
1151 | | o d9e379a8c432 C-F (default)
1148 | | |
1152 | | |
1149 +---o 51c544a58128 C-C (default)
1153 +---o 51c544a58128 C-C (default)
1150 | |
1154 | |
1151 | o a9149a1428e2 C-B (default)
1155 | o a9149a1428e2 C-B (default)
1152 | |
1156 | |
1153 o | 98217d5a1659 C-A (default)
1157 o | 98217d5a1659 C-A (default)
1154 |/
1158 |/
1155 o 842e2fac6304 C-ROOT (default)
1159 o 842e2fac6304 C-ROOT (default)
1156
1160
1157
1161
1158 Creating changesets
1162 Creating changesets
1159
1163
1160 (update 'other' named branch head)
1164 (update 'other' named branch head)
1161
1165
1162 $ hg -R client-other/ up 'desc("C-P")'
1166 $ hg -R client-other/ up 'desc("C-P")'
1163 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
1167 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
1164 $ echo aaa >> client-other/a
1168 $ echo aaa >> client-other/a
1165 $ hg -R client-other/ branch --force other
1169 $ hg -R client-other/ branch --force other
1166 marked working directory as branch other
1170 marked working directory as branch other
1167 $ hg -R client-other/ commit -m "C-R"
1171 $ hg -R client-other/ commit -m "C-R"
1168 created new head
1172 created new head
1169
1173
1170 (update 'other named brnach through a 'default' changeset')
1174 (update 'other named brnach through a 'default' changeset')
1171
1175
1172 $ hg -R client-racy/ up 'desc("C-P")'
1176 $ hg -R client-racy/ up 'desc("C-P")'
1173 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1177 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1174 $ echo bbb >> client-racy/a
1178 $ echo bbb >> client-racy/a
1175 $ hg -R client-racy/ commit -m "C-S"
1179 $ hg -R client-racy/ commit -m "C-S"
1176 $ echo bbb >> client-racy/a
1180 $ echo bbb >> client-racy/a
1177 $ hg -R client-racy/ branch --force other
1181 $ hg -R client-racy/ branch --force other
1178 marked working directory as branch other
1182 marked working directory as branch other
1179 $ hg -R client-racy/ commit -m "C-T"
1183 $ hg -R client-racy/ commit -m "C-T"
1180 created new head
1184 created new head
1181
1185
1182 Pushing
1186 Pushing
1183
1187
1184 $ hg -R client-racy push -r 'tip' > ./push-log 2>&1 &
1188 $ hg -R client-racy push -r 'tip' > ./push-log 2>&1 &
1185
1189
1186 $ waiton $TESTTMP/readyfile
1190 $ waiton $TESTTMP/readyfile
1187
1191
1188 $ hg -R client-other push -fr 'tip' --new-branch
1192 $ hg -R client-other push -fr 'tip' --new-branch
1189 pushing to ssh://user@dummy/server
1193 pushing to ssh://user@dummy/server
1190 searching for changes
1194 searching for changes
1191 remote: adding changesets
1195 remote: adding changesets
1192 remote: adding manifests
1196 remote: adding manifests
1193 remote: adding file changes
1197 remote: adding file changes
1194 remote: added 1 changesets with 1 changes to 1 files
1198 remote: added 1 changesets with 1 changes to 1 files
1195
1199
1196 $ release $TESTTMP/watchfile
1200 $ release $TESTTMP/watchfile
1197
1201
1198 Check the result of the push
1202 Check the result of the push
1199
1203
1200 $ cat ./push-log
1204 $ cat ./push-log
1201 pushing to ssh://user@dummy/server
1205 pushing to ssh://user@dummy/server
1202 searching for changes
1206 searching for changes
1203 wrote ready: $TESTTMP/readyfile
1207 wrote ready: $TESTTMP/readyfile
1204 waiting on: $TESTTMP/watchfile
1208 waiting on: $TESTTMP/watchfile
1205 abort: push failed:
1209 abort: push failed:
1206 'repository changed while pushing - please try again'
1210 'repository changed while pushing - please try again'
1207
1211
1208 $ hg -R server graph
1212 $ hg -R server graph
1209 o de7b9e2ba3f6 C-R (other)
1213 o de7b9e2ba3f6 C-R (other)
1210 |
1214 |
1211 o 1b58ee3f79e5 C-P (default)
1215 o 1b58ee3f79e5 C-P (default)
1212 |
1216 |
1213 o d0a85b2252a9 C-O (other)
1217 o d0a85b2252a9 C-O (other)
1214 |
1218 |
1215 | o b0ee3d6f51bc C-Q (default)
1219 | o b0ee3d6f51bc C-Q (default)
1216 |/
1220 |/
1217 o 55a6f1c01b48 C-Z (other)
1221 o 55a6f1c01b48 C-Z (other)
1218 |
1222 |
1219 o 866a66e18630 C-N (default)
1223 o 866a66e18630 C-N (default)
1220 |\
1224 |\
1221 +---o 6fd3090135df C-M (default)
1225 +---o 6fd3090135df C-M (default)
1222 | |
1226 | |
1223 | o cac2cead0ff0 C-L (default)
1227 | o cac2cead0ff0 C-L (default)
1224 | |
1228 | |
1225 o | be705100c623 C-K (default)
1229 o | be705100c623 C-K (default)
1226 |\|
1230 |\|
1227 o | d603e2c0cdd7 C-E (default)
1231 o | d603e2c0cdd7 C-E (default)
1228 | |
1232 | |
1229 | o 59e76faf78bd C-D (default)
1233 | o 59e76faf78bd C-D (default)
1230 | |
1234 | |
1231 | | o 89420bf00fae C-J (default)
1235 | | o 89420bf00fae C-J (default)
1232 | | |
1236 | | |
1233 | | | o b35ed749f288 C-I (my-second-test-branch)
1237 | | | o b35ed749f288 C-I (my-second-test-branch)
1234 | | |/
1238 | | |/
1235 | | o 75d69cba5402 C-G (default)
1239 | | o 75d69cba5402 C-G (default)
1236 | | |
1240 | | |
1237 | | | o 833be552cfe6 C-H (my-first-test-branch)
1241 | | | o 833be552cfe6 C-H (my-first-test-branch)
1238 | | |/
1242 | | |/
1239 | | o d9e379a8c432 C-F (default)
1243 | | o d9e379a8c432 C-F (default)
1240 | | |
1244 | | |
1241 +---o 51c544a58128 C-C (default)
1245 +---o 51c544a58128 C-C (default)
1242 | |
1246 | |
1243 | o a9149a1428e2 C-B (default)
1247 | o a9149a1428e2 C-B (default)
1244 | |
1248 | |
1245 o | 98217d5a1659 C-A (default)
1249 o | 98217d5a1659 C-A (default)
1246 |/
1250 |/
1247 o 842e2fac6304 C-ROOT (default)
1251 o 842e2fac6304 C-ROOT (default)
1248
1252
1253
1254 raced commit push a new head obsoleting the one touched by the racing push
1255 --------------------------------------------------------------------------
1256
1257 # b (racing)
1258 # |
1259 # ΓΈβ‡ β—” a (raced)
1260 # |/
1261 # *
1262
1263 (resync-all)
1264
1265 $ hg -R ./server pull ./client-racy
1266 pulling from ./client-racy
1267 searching for changes
1268 adding changesets
1269 adding manifests
1270 adding file changes
1271 added 2 changesets with 2 changes to 1 files (+1 heads)
1272 (run 'hg heads .' to see heads, 'hg merge' to merge)
1273 $ hg -R ./client-other pull
1274 pulling from ssh://user@dummy/server
1275 searching for changes
1276 adding changesets
1277 adding manifests
1278 adding file changes
1279 added 2 changesets with 2 changes to 1 files (+1 heads)
1280 (run 'hg heads' to see heads, 'hg merge' to merge)
1281 $ hg -R ./client-racy pull
1282 pulling from ssh://user@dummy/server
1283 searching for changes
1284 adding changesets
1285 adding manifests
1286 adding file changes
1287 added 1 changesets with 1 changes to 1 files (+1 heads)
1288 (run 'hg heads' to see heads, 'hg merge' to merge)
1289
1290 $ hg -R server graph
1291 o 3d57ed3c1091 C-T (other)
1292 |
1293 o 2efd43f7b5ba C-S (default)
1294 |
1295 | o de7b9e2ba3f6 C-R (other)
1296 |/
1297 o 1b58ee3f79e5 C-P (default)
1298 |
1299 o d0a85b2252a9 C-O (other)
1300 |
1301 | o b0ee3d6f51bc C-Q (default)
1302 |/
1303 o 55a6f1c01b48 C-Z (other)
1304 |
1305 o 866a66e18630 C-N (default)
1306 |\
1307 +---o 6fd3090135df C-M (default)
1308 | |
1309 | o cac2cead0ff0 C-L (default)
1310 | |
1311 o | be705100c623 C-K (default)
1312 |\|
1313 o | d603e2c0cdd7 C-E (default)
1314 | |
1315 | o 59e76faf78bd C-D (default)
1316 | |
1317 | | o 89420bf00fae C-J (default)
1318 | | |
1319 | | | o b35ed749f288 C-I (my-second-test-branch)
1320 | | |/
1321 | | o 75d69cba5402 C-G (default)
1322 | | |
1323 | | | o 833be552cfe6 C-H (my-first-test-branch)
1324 | | |/
1325 | | o d9e379a8c432 C-F (default)
1326 | | |
1327 +---o 51c544a58128 C-C (default)
1328 | |
1329 | o a9149a1428e2 C-B (default)
1330 | |
1331 o | 98217d5a1659 C-A (default)
1332 |/
1333 o 842e2fac6304 C-ROOT (default)
1334
1335
1336 Creating changesets and markers
1337
1338 (continue existing head)
1339
1340 $ hg -R client-other/ up 'desc("C-Q")'
1341 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1342 $ echo aaa >> client-other/a
1343 $ hg -R client-other/ commit -m "C-U"
1344
1345 (new topo branch obsoleting that same head)
1346
1347 $ hg -R client-racy/ up 'desc("C-Z")'
1348 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1349 $ echo bbb >> client-racy/a
1350 $ hg -R client-racy/ branch --force default
1351 marked working directory as branch default
1352 $ hg -R client-racy/ commit -m "C-V"
1353 created new head
1354 $ ID_Q=`hg -R client-racy log -T '{node}\n' -r 'desc("C-Q")'`
1355 $ ID_V=`hg -R client-racy log -T '{node}\n' -r 'desc("C-V")'`
1356 $ hg -R client-racy debugobsolete $ID_Q $ID_V
1357
1358 Pushing
1359
1360 $ hg -R client-racy push -r 'tip' > ./push-log 2>&1 &
1361
1362 $ waiton $TESTTMP/readyfile
1363
1364 $ hg -R client-other push -fr 'tip' --new-branch
1365 pushing to ssh://user@dummy/server
1366 searching for changes
1367 remote: adding changesets
1368 remote: adding manifests
1369 remote: adding file changes
1370 remote: added 1 changesets with 0 changes to 0 files
1371
1372 $ release $TESTTMP/watchfile
1373
1374 Check the result of the push
1375
1376 $ cat ./push-log
1377 pushing to ssh://user@dummy/server
1378 searching for changes
1379 wrote ready: $TESTTMP/readyfile
1380 waiting on: $TESTTMP/watchfile
1381 abort: push failed:
1382 'repository changed while pushing - please try again'
1383
1384 $ hg -R server debugobsolete
1385 $ hg -R server graph
1386 o a98a47d8b85b C-U (default)
1387 |
1388 o b0ee3d6f51bc C-Q (default)
1389 |
1390 | o 3d57ed3c1091 C-T (other)
1391 | |
1392 | o 2efd43f7b5ba C-S (default)
1393 | |
1394 | | o de7b9e2ba3f6 C-R (other)
1395 | |/
1396 | o 1b58ee3f79e5 C-P (default)
1397 | |
1398 | o d0a85b2252a9 C-O (other)
1399 |/
1400 o 55a6f1c01b48 C-Z (other)
1401 |
1402 o 866a66e18630 C-N (default)
1403 |\
1404 +---o 6fd3090135df C-M (default)
1405 | |
1406 | o cac2cead0ff0 C-L (default)
1407 | |
1408 o | be705100c623 C-K (default)
1409 |\|
1410 o | d603e2c0cdd7 C-E (default)
1411 | |
1412 | o 59e76faf78bd C-D (default)
1413 | |
1414 | | o 89420bf00fae C-J (default)
1415 | | |
1416 | | | o b35ed749f288 C-I (my-second-test-branch)
1417 | | |/
1418 | | o 75d69cba5402 C-G (default)
1419 | | |
1420 | | | o 833be552cfe6 C-H (my-first-test-branch)
1421 | | |/
1422 | | o d9e379a8c432 C-F (default)
1423 | | |
1424 +---o 51c544a58128 C-C (default)
1425 | |
1426 | o a9149a1428e2 C-B (default)
1427 | |
1428 o | 98217d5a1659 C-A (default)
1429 |/
1430 o 842e2fac6304 C-ROOT (default)
1431
General Comments 0
You need to be logged in to leave comments. Login now