##// END OF EJS Templates
test: adjust test-push-race.t timeout's to overall test timeout...
marmoute -
r50551:c6f0bcb7 stable
parent child Browse files
Show More
@@ -1,1892 +1,1900 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 errno
18 > import errno
19 > import os
19 > import os
20 > import time
20 > import time
21 >
21 >
22 > from mercurial import (
22 > from mercurial import (
23 > exchange,
23 > exchange,
24 > extensions,
24 > extensions,
25 > registrar,
25 > registrar,
26 > )
26 > )
27 >
27 >
28 > configtable = {}
28 > configtable = {}
29 > configitem = registrar.configitem(configtable)
29 > configitem = registrar.configitem(configtable)
30 >
30 >
31 > configitem(b'delaypush', b'ready-path',
31 > configitem(b'delaypush', b'ready-path',
32 > default=None,
32 > default=None,
33 > )
33 > )
34 > configitem(b'delaypush', b'release-path',
34 > configitem(b'delaypush', b'release-path',
35 > default=None,
35 > default=None,
36 > )
36 > )
37 >
37 >
38 > def delaypush(orig, pushop):
38 > def delaypush(orig, pushop):
39 > # notify we are done preparing
39 > # notify we are done preparing
40 > ui = pushop.repo.ui
40 > ui = pushop.repo.ui
41 > readypath = ui.config(b'delaypush', b'ready-path')
41 > readypath = ui.config(b'delaypush', b'ready-path')
42 > if readypath is not None:
42 > if readypath is not None:
43 > with open(readypath, 'w') as r:
43 > with open(readypath, 'w') as r:
44 > r.write('foo')
44 > r.write('foo')
45 > ui.status(b'wrote ready: %s\n' % readypath)
45 > ui.status(b'wrote ready: %s\n' % readypath)
46 > # now wait for the other process to be done
46 > # now wait for the other process to be done
47 > watchpath = ui.config(b'delaypush', b'release-path')
47 > watchpath = ui.config(b'delaypush', b'release-path')
48 > if watchpath is not None:
48 > if watchpath is not None:
49 > ui.status(b'waiting on: %s\n' % watchpath)
49 > ui.status(b'waiting on: %s\n' % watchpath)
50 > limit = 100
50 > limit = 100
51 > test_default_timeout = os.environ.get('HGTEST_TIMEOUT_DEFAULT')
52 > test_timeout = os.environ.get('HGTEST_TIMEOUT')
53 > if (
54 > test_default_timeout is not None
55 > and test_timeout is not None
56 > and test_default_timeout < test_timeout
57 > ):
58 > limit = int(limit * (test_timeout / test_default_timeout))
51 > while 0 < limit and not os.path.exists(watchpath):
59 > while 0 < limit and not os.path.exists(watchpath):
52 > limit -= 1
60 > limit -= 1
53 > time.sleep(0.1)
61 > time.sleep(0.1)
54 > if limit <= 0:
62 > if limit <= 0:
55 > ui.warn(b'exiting without watchfile: %s' % watchpath)
63 > ui.warn(b'exiting without watchfile: %s' % watchpath)
56 > else:
64 > else:
57 > # delete the file at the end of the push
65 > # delete the file at the end of the push
58 > def delete():
66 > def delete():
59 > try:
67 > try:
60 > os.unlink(watchpath)
68 > os.unlink(watchpath)
61 > except FileNotFoundError:
69 > except FileNotFoundError:
62 > pass
70 > pass
63 > ui.atexit(delete)
71 > ui.atexit(delete)
64 > return orig(pushop)
72 > return orig(pushop)
65 >
73 >
66 > def uisetup(ui):
74 > def uisetup(ui):
67 > extensions.wrapfunction(exchange, b'_pushbundle2', delaypush)
75 > extensions.wrapfunction(exchange, b'_pushbundle2', delaypush)
68 > EOF
76 > EOF
69
77
70 $ waiton () {
78 $ waiton () {
71 > # wait for a file to be created (then delete it)
79 > # wait for a file to be created (then delete it)
72 > count=100
80 > count=100
73 > while [ ! -f $1 ] ;
81 > while [ ! -f $1 ] ;
74 > do
82 > do
75 > sleep 0.1;
83 > sleep 0.1;
76 > count=`expr $count - 1`;
84 > count=`expr $count - 1`;
77 > if [ $count -lt 0 ];
85 > if [ $count -lt 0 ];
78 > then
86 > then
79 > break
87 > break
80 > fi;
88 > fi;
81 > done
89 > done
82 > [ -f $1 ] || echo "ready file still missing: $1"
90 > [ -f $1 ] || echo "ready file still missing: $1"
83 > rm -f $1
91 > rm -f $1
84 > }
92 > }
85
93
86 $ release () {
94 $ release () {
87 > # create a file and wait for it be deleted
95 > # create a file and wait for it be deleted
88 > count=100
96 > count=100
89 > touch $1
97 > touch $1
90 > while [ -f $1 ] ;
98 > while [ -f $1 ] ;
91 > do
99 > do
92 > sleep 0.1;
100 > sleep 0.1;
93 > count=`expr $count - 1`;
101 > count=`expr $count - 1`;
94 > if [ $count -lt 0 ];
102 > if [ $count -lt 0 ];
95 > then
103 > then
96 > break
104 > break
97 > fi;
105 > fi;
98 > done
106 > done
99 > [ ! -f $1 ] || echo "delay file still exist: $1"
107 > [ ! -f $1 ] || echo "delay file still exist: $1"
100 > }
108 > }
101
109
102 $ cat >> $HGRCPATH << EOF
110 $ cat >> $HGRCPATH << EOF
103 > [ui]
111 > [ui]
104 > # simplify output
112 > # simplify output
105 > logtemplate = {node|short} {desc} ({branch})
113 > logtemplate = {node|short} {desc} ({branch})
106 > [phases]
114 > [phases]
107 > publish = no
115 > publish = no
108 > [experimental]
116 > [experimental]
109 > evolution=true
117 > evolution=true
110 > [alias]
118 > [alias]
111 > graph = log -G --rev 'sort(all(), "topo")'
119 > graph = log -G --rev 'sort(all(), "topo")'
112 > EOF
120 > EOF
113
121
114 We tests multiple cases:
122 We tests multiple cases:
115 * strict: no race detected,
123 * strict: no race detected,
116 * unrelated: race on unrelated heads are allowed.
124 * unrelated: race on unrelated heads are allowed.
117
125
118 #testcases strict unrelated
126 #testcases strict unrelated
119
127
120 #if strict
128 #if strict
121
129
122 $ cat >> $HGRCPATH << EOF
130 $ cat >> $HGRCPATH << EOF
123 > [server]
131 > [server]
124 > concurrent-push-mode = strict
132 > concurrent-push-mode = strict
125 > EOF
133 > EOF
126
134
127 #endif
135 #endif
128
136
129 Setup
137 Setup
130 -----
138 -----
131
139
132 create a repo with one root
140 create a repo with one root
133
141
134 $ hg init server
142 $ hg init server
135 $ cd server
143 $ cd server
136 $ echo root > root
144 $ echo root > root
137 $ hg ci -Am "C-ROOT"
145 $ hg ci -Am "C-ROOT"
138 adding root
146 adding root
139 $ cd ..
147 $ cd ..
140
148
141 clone it in two clients
149 clone it in two clients
142
150
143 $ hg clone ssh://user@dummy/server client-racy
151 $ hg clone ssh://user@dummy/server client-racy
144 requesting all changes
152 requesting all changes
145 adding changesets
153 adding changesets
146 adding manifests
154 adding manifests
147 adding file changes
155 adding file changes
148 added 1 changesets with 1 changes to 1 files
156 added 1 changesets with 1 changes to 1 files
149 new changesets 842e2fac6304 (1 drafts)
157 new changesets 842e2fac6304 (1 drafts)
150 updating to branch default
158 updating to branch default
151 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
159 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
152 $ hg clone ssh://user@dummy/server client-other
160 $ hg clone ssh://user@dummy/server client-other
153 requesting all changes
161 requesting all changes
154 adding changesets
162 adding changesets
155 adding manifests
163 adding manifests
156 adding file changes
164 adding file changes
157 added 1 changesets with 1 changes to 1 files
165 added 1 changesets with 1 changes to 1 files
158 new changesets 842e2fac6304 (1 drafts)
166 new changesets 842e2fac6304 (1 drafts)
159 updating to branch default
167 updating to branch default
160 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
168 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
161
169
162 setup one to allow race on push
170 setup one to allow race on push
163
171
164 $ cat >> client-racy/.hg/hgrc << EOF
172 $ cat >> client-racy/.hg/hgrc << EOF
165 > [extensions]
173 > [extensions]
166 > delaypush = $TESTTMP/delaypush.py
174 > delaypush = $TESTTMP/delaypush.py
167 > [delaypush]
175 > [delaypush]
168 > ready-path = $TESTTMP/readyfile
176 > ready-path = $TESTTMP/readyfile
169 > release-path = $TESTTMP/watchfile
177 > release-path = $TESTTMP/watchfile
170 > EOF
178 > EOF
171
179
172 Simple race, both try to push to the server at the same time
180 Simple race, both try to push to the server at the same time
173 ------------------------------------------------------------
181 ------------------------------------------------------------
174
182
175 Both try to replace the same head
183 Both try to replace the same head
176
184
177 # a
185 # a
178 # | b
186 # | b
179 # |/
187 # |/
180 # *
188 # *
181
189
182 Creating changesets
190 Creating changesets
183
191
184 $ echo b > client-other/a
192 $ echo b > client-other/a
185 $ hg -R client-other/ add client-other/a
193 $ hg -R client-other/ add client-other/a
186 $ hg -R client-other/ commit -m "C-A"
194 $ hg -R client-other/ commit -m "C-A"
187 $ echo b > client-racy/b
195 $ echo b > client-racy/b
188 $ hg -R client-racy/ add client-racy/b
196 $ hg -R client-racy/ add client-racy/b
189 $ hg -R client-racy/ commit -m "C-B"
197 $ hg -R client-racy/ commit -m "C-B"
190
198
191 Pushing
199 Pushing
192
200
193 $ hg -R client-racy push -r 'tip' > ./push-log 2>&1 &
201 $ hg -R client-racy push -r 'tip' > ./push-log 2>&1 &
194
202
195 $ waiton $TESTTMP/readyfile
203 $ waiton $TESTTMP/readyfile
196
204
197 $ hg -R client-other push -r 'tip'
205 $ hg -R client-other push -r 'tip'
198 pushing to ssh://user@dummy/server
206 pushing to ssh://user@dummy/server
199 searching for changes
207 searching for changes
200 remote: adding changesets
208 remote: adding changesets
201 remote: adding manifests
209 remote: adding manifests
202 remote: adding file changes
210 remote: adding file changes
203 remote: added 1 changesets with 1 changes to 1 files
211 remote: added 1 changesets with 1 changes to 1 files
204
212
205 $ release $TESTTMP/watchfile
213 $ release $TESTTMP/watchfile
206
214
207 Check the result of the push
215 Check the result of the push
208
216
209 $ cat ./push-log
217 $ cat ./push-log
210 pushing to ssh://user@dummy/server
218 pushing to ssh://user@dummy/server
211 searching for changes
219 searching for changes
212 wrote ready: $TESTTMP/readyfile
220 wrote ready: $TESTTMP/readyfile
213 waiting on: $TESTTMP/watchfile
221 waiting on: $TESTTMP/watchfile
214 abort: push failed:
222 abort: push failed:
215 'remote repository changed while pushing - please try again'
223 'remote repository changed while pushing - please try again'
216
224
217 $ hg -R server graph
225 $ hg -R server graph
218 o 98217d5a1659 C-A (default)
226 o 98217d5a1659 C-A (default)
219 |
227 |
220 @ 842e2fac6304 C-ROOT (default)
228 @ 842e2fac6304 C-ROOT (default)
221
229
222
230
223 Pushing on two different heads
231 Pushing on two different heads
224 ------------------------------
232 ------------------------------
225
233
226 Both try to replace a different head
234 Both try to replace a different head
227
235
228 # a b
236 # a b
229 # | |
237 # | |
230 # * *
238 # * *
231 # |/
239 # |/
232 # *
240 # *
233
241
234 (resync-all)
242 (resync-all)
235
243
236 $ hg -R ./server pull ./client-racy
244 $ hg -R ./server pull ./client-racy
237 pulling from ./client-racy
245 pulling from ./client-racy
238 searching for changes
246 searching for changes
239 adding changesets
247 adding changesets
240 adding manifests
248 adding manifests
241 adding file changes
249 adding file changes
242 added 1 changesets with 1 changes to 1 files (+1 heads)
250 added 1 changesets with 1 changes to 1 files (+1 heads)
243 new changesets a9149a1428e2 (1 drafts)
251 new changesets a9149a1428e2 (1 drafts)
244 (run 'hg heads' to see heads, 'hg merge' to merge)
252 (run 'hg heads' to see heads, 'hg merge' to merge)
245 $ hg -R ./client-other pull
253 $ hg -R ./client-other pull
246 pulling from ssh://user@dummy/server
254 pulling from ssh://user@dummy/server
247 searching for changes
255 searching for changes
248 adding changesets
256 adding changesets
249 adding manifests
257 adding manifests
250 adding file changes
258 adding file changes
251 added 1 changesets with 1 changes to 1 files (+1 heads)
259 added 1 changesets with 1 changes to 1 files (+1 heads)
252 new changesets a9149a1428e2 (1 drafts)
260 new changesets a9149a1428e2 (1 drafts)
253 (run 'hg heads' to see heads, 'hg merge' to merge)
261 (run 'hg heads' to see heads, 'hg merge' to merge)
254 $ hg -R ./client-racy pull
262 $ hg -R ./client-racy pull
255 pulling from ssh://user@dummy/server
263 pulling from ssh://user@dummy/server
256 searching for changes
264 searching for changes
257 adding changesets
265 adding changesets
258 adding manifests
266 adding manifests
259 adding file changes
267 adding file changes
260 added 1 changesets with 1 changes to 1 files (+1 heads)
268 added 1 changesets with 1 changes to 1 files (+1 heads)
261 new changesets 98217d5a1659 (1 drafts)
269 new changesets 98217d5a1659 (1 drafts)
262 (run 'hg heads' to see heads, 'hg merge' to merge)
270 (run 'hg heads' to see heads, 'hg merge' to merge)
263
271
264 $ hg -R server graph
272 $ hg -R server graph
265 o a9149a1428e2 C-B (default)
273 o a9149a1428e2 C-B (default)
266 |
274 |
267 | o 98217d5a1659 C-A (default)
275 | o 98217d5a1659 C-A (default)
268 |/
276 |/
269 @ 842e2fac6304 C-ROOT (default)
277 @ 842e2fac6304 C-ROOT (default)
270
278
271
279
272 Creating changesets
280 Creating changesets
273
281
274 $ echo aa >> client-other/a
282 $ echo aa >> client-other/a
275 $ hg -R client-other/ commit -m "C-C"
283 $ hg -R client-other/ commit -m "C-C"
276 $ echo bb >> client-racy/b
284 $ echo bb >> client-racy/b
277 $ hg -R client-racy/ commit -m "C-D"
285 $ hg -R client-racy/ commit -m "C-D"
278
286
279 Pushing
287 Pushing
280
288
281 $ hg -R client-racy push -r 'tip' > ./push-log 2>&1 &
289 $ hg -R client-racy push -r 'tip' > ./push-log 2>&1 &
282
290
283 $ waiton $TESTTMP/readyfile
291 $ waiton $TESTTMP/readyfile
284
292
285 $ hg -R client-other push -r 'tip'
293 $ hg -R client-other push -r 'tip'
286 pushing to ssh://user@dummy/server
294 pushing to ssh://user@dummy/server
287 searching for changes
295 searching for changes
288 remote: adding changesets
296 remote: adding changesets
289 remote: adding manifests
297 remote: adding manifests
290 remote: adding file changes
298 remote: adding file changes
291 remote: added 1 changesets with 1 changes to 1 files
299 remote: added 1 changesets with 1 changes to 1 files
292
300
293 $ release $TESTTMP/watchfile
301 $ release $TESTTMP/watchfile
294
302
295 Check the result of the push
303 Check the result of the push
296
304
297 #if strict
305 #if strict
298 $ cat ./push-log
306 $ cat ./push-log
299 pushing to ssh://user@dummy/server
307 pushing to ssh://user@dummy/server
300 searching for changes
308 searching for changes
301 wrote ready: $TESTTMP/readyfile
309 wrote ready: $TESTTMP/readyfile
302 waiting on: $TESTTMP/watchfile
310 waiting on: $TESTTMP/watchfile
303 abort: push failed:
311 abort: push failed:
304 'remote repository changed while pushing - please try again'
312 'remote repository changed while pushing - please try again'
305
313
306 $ hg -R server graph
314 $ hg -R server graph
307 o 51c544a58128 C-C (default)
315 o 51c544a58128 C-C (default)
308 |
316 |
309 o 98217d5a1659 C-A (default)
317 o 98217d5a1659 C-A (default)
310 |
318 |
311 | o a9149a1428e2 C-B (default)
319 | o a9149a1428e2 C-B (default)
312 |/
320 |/
313 @ 842e2fac6304 C-ROOT (default)
321 @ 842e2fac6304 C-ROOT (default)
314
322
315 #endif
323 #endif
316 #if unrelated
324 #if unrelated
317
325
318 (The two heads are unrelated, push should be allowed)
326 (The two heads are unrelated, push should be allowed)
319
327
320 $ cat ./push-log
328 $ cat ./push-log
321 pushing to ssh://user@dummy/server
329 pushing to ssh://user@dummy/server
322 searching for changes
330 searching for changes
323 wrote ready: $TESTTMP/readyfile
331 wrote ready: $TESTTMP/readyfile
324 waiting on: $TESTTMP/watchfile
332 waiting on: $TESTTMP/watchfile
325 remote: adding changesets
333 remote: adding changesets
326 remote: adding manifests
334 remote: adding manifests
327 remote: adding file changes
335 remote: adding file changes
328 remote: added 1 changesets with 1 changes to 1 files
336 remote: added 1 changesets with 1 changes to 1 files
329
337
330 $ hg -R server graph
338 $ hg -R server graph
331 o 59e76faf78bd C-D (default)
339 o 59e76faf78bd C-D (default)
332 |
340 |
333 o a9149a1428e2 C-B (default)
341 o a9149a1428e2 C-B (default)
334 |
342 |
335 | o 51c544a58128 C-C (default)
343 | o 51c544a58128 C-C (default)
336 | |
344 | |
337 | o 98217d5a1659 C-A (default)
345 | o 98217d5a1659 C-A (default)
338 |/
346 |/
339 @ 842e2fac6304 C-ROOT (default)
347 @ 842e2fac6304 C-ROOT (default)
340
348
341 #endif
349 #endif
342
350
343 Pushing while someone creates a new head
351 Pushing while someone creates a new head
344 -----------------------------------------
352 -----------------------------------------
345
353
346 Pushing a new changeset while someone creates a new branch.
354 Pushing a new changeset while someone creates a new branch.
347
355
348 # a (raced)
356 # a (raced)
349 # |
357 # |
350 # * b
358 # * b
351 # |/
359 # |/
352 # *
360 # *
353
361
354 (resync-all)
362 (resync-all)
355
363
356 #if strict
364 #if strict
357
365
358 $ hg -R ./server pull ./client-racy
366 $ hg -R ./server pull ./client-racy
359 pulling from ./client-racy
367 pulling from ./client-racy
360 searching for changes
368 searching for changes
361 adding changesets
369 adding changesets
362 adding manifests
370 adding manifests
363 adding file changes
371 adding file changes
364 added 1 changesets with 1 changes to 1 files
372 added 1 changesets with 1 changes to 1 files
365 new changesets 59e76faf78bd (1 drafts)
373 new changesets 59e76faf78bd (1 drafts)
366 (run 'hg update' to get a working copy)
374 (run 'hg update' to get a working copy)
367
375
368 #endif
376 #endif
369 #if unrelated
377 #if unrelated
370
378
371 $ hg -R ./server pull ./client-racy
379 $ hg -R ./server pull ./client-racy
372 pulling from ./client-racy
380 pulling from ./client-racy
373 searching for changes
381 searching for changes
374 no changes found
382 no changes found
375
383
376 #endif
384 #endif
377
385
378 $ hg -R ./client-other pull
386 $ hg -R ./client-other pull
379 pulling from ssh://user@dummy/server
387 pulling from ssh://user@dummy/server
380 searching for changes
388 searching for changes
381 adding changesets
389 adding changesets
382 adding manifests
390 adding manifests
383 adding file changes
391 adding file changes
384 added 1 changesets with 1 changes to 1 files
392 added 1 changesets with 1 changes to 1 files
385 new changesets 59e76faf78bd (1 drafts)
393 new changesets 59e76faf78bd (1 drafts)
386 (run 'hg update' to get a working copy)
394 (run 'hg update' to get a working copy)
387 $ hg -R ./client-racy pull
395 $ hg -R ./client-racy pull
388 pulling from ssh://user@dummy/server
396 pulling from ssh://user@dummy/server
389 searching for changes
397 searching for changes
390 adding changesets
398 adding changesets
391 adding manifests
399 adding manifests
392 adding file changes
400 adding file changes
393 added 1 changesets with 1 changes to 1 files
401 added 1 changesets with 1 changes to 1 files
394 new changesets 51c544a58128 (1 drafts)
402 new changesets 51c544a58128 (1 drafts)
395 (run 'hg update' to get a working copy)
403 (run 'hg update' to get a working copy)
396
404
397 $ hg -R server graph
405 $ hg -R server graph
398 o 59e76faf78bd C-D (default)
406 o 59e76faf78bd C-D (default)
399 |
407 |
400 o a9149a1428e2 C-B (default)
408 o a9149a1428e2 C-B (default)
401 |
409 |
402 | o 51c544a58128 C-C (default)
410 | o 51c544a58128 C-C (default)
403 | |
411 | |
404 | o 98217d5a1659 C-A (default)
412 | o 98217d5a1659 C-A (default)
405 |/
413 |/
406 @ 842e2fac6304 C-ROOT (default)
414 @ 842e2fac6304 C-ROOT (default)
407
415
408
416
409 Creating changesets
417 Creating changesets
410
418
411 (new head)
419 (new head)
412
420
413 $ hg -R client-other/ up 'desc("C-A")'
421 $ hg -R client-other/ up 'desc("C-A")'
414 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
422 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
415 $ echo aaa >> client-other/a
423 $ echo aaa >> client-other/a
416 $ hg -R client-other/ commit -m "C-E"
424 $ hg -R client-other/ commit -m "C-E"
417 created new head
425 created new head
418
426
419 (children of existing head)
427 (children of existing head)
420
428
421 $ hg -R client-racy/ up 'desc("C-C")'
429 $ hg -R client-racy/ up 'desc("C-C")'
422 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
430 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
423 $ echo bbb >> client-racy/a
431 $ echo bbb >> client-racy/a
424 $ hg -R client-racy/ commit -m "C-F"
432 $ hg -R client-racy/ commit -m "C-F"
425
433
426 Pushing
434 Pushing
427
435
428 $ hg -R client-racy push -r 'tip' > ./push-log 2>&1 &
436 $ hg -R client-racy push -r 'tip' > ./push-log 2>&1 &
429
437
430 $ waiton $TESTTMP/readyfile
438 $ waiton $TESTTMP/readyfile
431
439
432 $ hg -R client-other push -fr 'tip'
440 $ hg -R client-other push -fr 'tip'
433 pushing to ssh://user@dummy/server
441 pushing to ssh://user@dummy/server
434 searching for changes
442 searching for changes
435 remote: adding changesets
443 remote: adding changesets
436 remote: adding manifests
444 remote: adding manifests
437 remote: adding file changes
445 remote: adding file changes
438 remote: added 1 changesets with 1 changes to 1 files (+1 heads)
446 remote: added 1 changesets with 1 changes to 1 files (+1 heads)
439
447
440 $ release $TESTTMP/watchfile
448 $ release $TESTTMP/watchfile
441
449
442 Check the result of the push
450 Check the result of the push
443
451
444 #if strict
452 #if strict
445
453
446 $ cat ./push-log
454 $ cat ./push-log
447 pushing to ssh://user@dummy/server
455 pushing to ssh://user@dummy/server
448 searching for changes
456 searching for changes
449 wrote ready: $TESTTMP/readyfile
457 wrote ready: $TESTTMP/readyfile
450 waiting on: $TESTTMP/watchfile
458 waiting on: $TESTTMP/watchfile
451 abort: push failed:
459 abort: push failed:
452 'remote repository changed while pushing - please try again'
460 'remote repository changed while pushing - please try again'
453
461
454 $ hg -R server graph
462 $ hg -R server graph
455 o d603e2c0cdd7 C-E (default)
463 o d603e2c0cdd7 C-E (default)
456 |
464 |
457 | o 51c544a58128 C-C (default)
465 | o 51c544a58128 C-C (default)
458 |/
466 |/
459 o 98217d5a1659 C-A (default)
467 o 98217d5a1659 C-A (default)
460 |
468 |
461 | o 59e76faf78bd C-D (default)
469 | o 59e76faf78bd C-D (default)
462 | |
470 | |
463 | o a9149a1428e2 C-B (default)
471 | o a9149a1428e2 C-B (default)
464 |/
472 |/
465 @ 842e2fac6304 C-ROOT (default)
473 @ 842e2fac6304 C-ROOT (default)
466
474
467
475
468 #endif
476 #endif
469
477
470 #if unrelated
478 #if unrelated
471
479
472 (The racing new head do not affect existing heads, push should go through)
480 (The racing new head do not affect existing heads, push should go through)
473
481
474 $ cat ./push-log
482 $ cat ./push-log
475 pushing to ssh://user@dummy/server
483 pushing to ssh://user@dummy/server
476 searching for changes
484 searching for changes
477 wrote ready: $TESTTMP/readyfile
485 wrote ready: $TESTTMP/readyfile
478 waiting on: $TESTTMP/watchfile
486 waiting on: $TESTTMP/watchfile
479 remote: adding changesets
487 remote: adding changesets
480 remote: adding manifests
488 remote: adding manifests
481 remote: adding file changes
489 remote: adding file changes
482 remote: added 1 changesets with 1 changes to 1 files
490 remote: added 1 changesets with 1 changes to 1 files
483
491
484 $ hg -R server graph
492 $ hg -R server graph
485 o d9e379a8c432 C-F (default)
493 o d9e379a8c432 C-F (default)
486 |
494 |
487 o 51c544a58128 C-C (default)
495 o 51c544a58128 C-C (default)
488 |
496 |
489 | o d603e2c0cdd7 C-E (default)
497 | o d603e2c0cdd7 C-E (default)
490 |/
498 |/
491 o 98217d5a1659 C-A (default)
499 o 98217d5a1659 C-A (default)
492 |
500 |
493 | o 59e76faf78bd C-D (default)
501 | o 59e76faf78bd C-D (default)
494 | |
502 | |
495 | o a9149a1428e2 C-B (default)
503 | o a9149a1428e2 C-B (default)
496 |/
504 |/
497 @ 842e2fac6304 C-ROOT (default)
505 @ 842e2fac6304 C-ROOT (default)
498
506
499 #endif
507 #endif
500
508
501 Pushing touching different named branch (same topo): new branch raced
509 Pushing touching different named branch (same topo): new branch raced
502 ---------------------------------------------------------------------
510 ---------------------------------------------------------------------
503
511
504 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
505
513
506 # a (raced, branch-a)
514 # a (raced, branch-a)
507 # |
515 # |
508 # | b (default branch)
516 # | b (default branch)
509 # |/
517 # |/
510 # *
518 # *
511
519
512 (resync-all)
520 (resync-all)
513
521
514 #if strict
522 #if strict
515
523
516 $ hg -R ./server pull ./client-racy
524 $ hg -R ./server pull ./client-racy
517 pulling from ./client-racy
525 pulling from ./client-racy
518 searching for changes
526 searching for changes
519 adding changesets
527 adding changesets
520 adding manifests
528 adding manifests
521 adding file changes
529 adding file changes
522 added 1 changesets with 1 changes to 1 files
530 added 1 changesets with 1 changes to 1 files
523 new changesets d9e379a8c432 (1 drafts)
531 new changesets d9e379a8c432 (1 drafts)
524 (run 'hg update' to get a working copy)
532 (run 'hg update' to get a working copy)
525
533
526 #endif
534 #endif
527 #if unrelated
535 #if unrelated
528
536
529 $ hg -R ./server pull ./client-racy
537 $ hg -R ./server pull ./client-racy
530 pulling from ./client-racy
538 pulling from ./client-racy
531 searching for changes
539 searching for changes
532 no changes found
540 no changes found
533
541
534 #endif
542 #endif
535
543
536 $ hg -R ./client-other pull
544 $ hg -R ./client-other pull
537 pulling from ssh://user@dummy/server
545 pulling from ssh://user@dummy/server
538 searching for changes
546 searching for changes
539 adding changesets
547 adding changesets
540 adding manifests
548 adding manifests
541 adding file changes
549 adding file changes
542 added 1 changesets with 1 changes to 1 files
550 added 1 changesets with 1 changes to 1 files
543 new changesets d9e379a8c432 (1 drafts)
551 new changesets d9e379a8c432 (1 drafts)
544 (run 'hg update' to get a working copy)
552 (run 'hg update' to get a working copy)
545 $ hg -R ./client-racy pull
553 $ hg -R ./client-racy pull
546 pulling from ssh://user@dummy/server
554 pulling from ssh://user@dummy/server
547 searching for changes
555 searching for changes
548 adding changesets
556 adding changesets
549 adding manifests
557 adding manifests
550 adding file changes
558 adding file changes
551 added 1 changesets with 1 changes to 1 files (+1 heads)
559 added 1 changesets with 1 changes to 1 files (+1 heads)
552 new changesets d603e2c0cdd7 (1 drafts)
560 new changesets d603e2c0cdd7 (1 drafts)
553 (run 'hg heads .' to see heads, 'hg merge' to merge)
561 (run 'hg heads .' to see heads, 'hg merge' to merge)
554
562
555 $ hg -R server graph
563 $ hg -R server graph
556 o d9e379a8c432 C-F (default)
564 o d9e379a8c432 C-F (default)
557 |
565 |
558 o 51c544a58128 C-C (default)
566 o 51c544a58128 C-C (default)
559 |
567 |
560 | o d603e2c0cdd7 C-E (default)
568 | o d603e2c0cdd7 C-E (default)
561 |/
569 |/
562 o 98217d5a1659 C-A (default)
570 o 98217d5a1659 C-A (default)
563 |
571 |
564 | o 59e76faf78bd C-D (default)
572 | o 59e76faf78bd C-D (default)
565 | |
573 | |
566 | o a9149a1428e2 C-B (default)
574 | o a9149a1428e2 C-B (default)
567 |/
575 |/
568 @ 842e2fac6304 C-ROOT (default)
576 @ 842e2fac6304 C-ROOT (default)
569
577
570
578
571 Creating changesets
579 Creating changesets
572
580
573 (update existing head)
581 (update existing head)
574
582
575 $ hg -R client-other/ up 'desc("C-F")'
583 $ hg -R client-other/ up 'desc("C-F")'
576 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
584 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
577 $ echo aaa >> client-other/a
585 $ echo aaa >> client-other/a
578 $ hg -R client-other/ commit -m "C-G"
586 $ hg -R client-other/ commit -m "C-G"
579
587
580 (new named branch from that existing head)
588 (new named branch from that existing head)
581
589
582 $ hg -R client-racy/ up 'desc("C-F")'
590 $ hg -R client-racy/ up 'desc("C-F")'
583 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
591 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
584 $ echo bbb >> client-racy/a
592 $ echo bbb >> client-racy/a
585 $ hg -R client-racy/ branch my-first-test-branch
593 $ hg -R client-racy/ branch my-first-test-branch
586 marked working directory as branch my-first-test-branch
594 marked working directory as branch my-first-test-branch
587 (branches are permanent and global, did you want a bookmark?)
595 (branches are permanent and global, did you want a bookmark?)
588 $ hg -R client-racy/ commit -m "C-H"
596 $ hg -R client-racy/ commit -m "C-H"
589
597
590 Pushing
598 Pushing
591
599
592 $ hg -R client-racy push -r 'tip' --new-branch > ./push-log 2>&1 &
600 $ hg -R client-racy push -r 'tip' --new-branch > ./push-log 2>&1 &
593
601
594 $ waiton $TESTTMP/readyfile
602 $ waiton $TESTTMP/readyfile
595
603
596 $ hg -R client-other push -fr 'tip'
604 $ hg -R client-other push -fr 'tip'
597 pushing to ssh://user@dummy/server
605 pushing to ssh://user@dummy/server
598 searching for changes
606 searching for changes
599 remote: adding changesets
607 remote: adding changesets
600 remote: adding manifests
608 remote: adding manifests
601 remote: adding file changes
609 remote: adding file changes
602 remote: added 1 changesets with 1 changes to 1 files
610 remote: added 1 changesets with 1 changes to 1 files
603
611
604 $ release $TESTTMP/watchfile
612 $ release $TESTTMP/watchfile
605
613
606 Check the result of the push
614 Check the result of the push
607
615
608 #if strict
616 #if strict
609 $ cat ./push-log
617 $ cat ./push-log
610 pushing to ssh://user@dummy/server
618 pushing to ssh://user@dummy/server
611 searching for changes
619 searching for changes
612 wrote ready: $TESTTMP/readyfile
620 wrote ready: $TESTTMP/readyfile
613 waiting on: $TESTTMP/watchfile
621 waiting on: $TESTTMP/watchfile
614 abort: push failed:
622 abort: push failed:
615 'remote repository changed while pushing - please try again'
623 'remote repository changed while pushing - please try again'
616
624
617 $ hg -R server graph
625 $ hg -R server graph
618 o 75d69cba5402 C-G (default)
626 o 75d69cba5402 C-G (default)
619 |
627 |
620 o d9e379a8c432 C-F (default)
628 o d9e379a8c432 C-F (default)
621 |
629 |
622 o 51c544a58128 C-C (default)
630 o 51c544a58128 C-C (default)
623 |
631 |
624 | o d603e2c0cdd7 C-E (default)
632 | o d603e2c0cdd7 C-E (default)
625 |/
633 |/
626 o 98217d5a1659 C-A (default)
634 o 98217d5a1659 C-A (default)
627 |
635 |
628 | o 59e76faf78bd C-D (default)
636 | o 59e76faf78bd C-D (default)
629 | |
637 | |
630 | o a9149a1428e2 C-B (default)
638 | o a9149a1428e2 C-B (default)
631 |/
639 |/
632 @ 842e2fac6304 C-ROOT (default)
640 @ 842e2fac6304 C-ROOT (default)
633
641
634 #endif
642 #endif
635 #if unrelated
643 #if unrelated
636
644
637 (unrelated named branches are unrelated)
645 (unrelated named branches are unrelated)
638
646
639 $ cat ./push-log
647 $ cat ./push-log
640 pushing to ssh://user@dummy/server
648 pushing to ssh://user@dummy/server
641 searching for changes
649 searching for changes
642 wrote ready: $TESTTMP/readyfile
650 wrote ready: $TESTTMP/readyfile
643 waiting on: $TESTTMP/watchfile
651 waiting on: $TESTTMP/watchfile
644 remote: adding changesets
652 remote: adding changesets
645 remote: adding manifests
653 remote: adding manifests
646 remote: adding file changes
654 remote: adding file changes
647 remote: added 1 changesets with 1 changes to 1 files (+1 heads)
655 remote: added 1 changesets with 1 changes to 1 files (+1 heads)
648
656
649 $ hg -R server graph
657 $ hg -R server graph
650 o 833be552cfe6 C-H (my-first-test-branch)
658 o 833be552cfe6 C-H (my-first-test-branch)
651 |
659 |
652 | o 75d69cba5402 C-G (default)
660 | o 75d69cba5402 C-G (default)
653 |/
661 |/
654 o d9e379a8c432 C-F (default)
662 o d9e379a8c432 C-F (default)
655 |
663 |
656 o 51c544a58128 C-C (default)
664 o 51c544a58128 C-C (default)
657 |
665 |
658 | o d603e2c0cdd7 C-E (default)
666 | o d603e2c0cdd7 C-E (default)
659 |/
667 |/
660 o 98217d5a1659 C-A (default)
668 o 98217d5a1659 C-A (default)
661 |
669 |
662 | o 59e76faf78bd C-D (default)
670 | o 59e76faf78bd C-D (default)
663 | |
671 | |
664 | o a9149a1428e2 C-B (default)
672 | o a9149a1428e2 C-B (default)
665 |/
673 |/
666 @ 842e2fac6304 C-ROOT (default)
674 @ 842e2fac6304 C-ROOT (default)
667
675
668 #endif
676 #endif
669
677
670 The racing new head do not affect existing heads, push should go through
678 The racing new head do not affect existing heads, push should go through
671
679
672 pushing touching different named branch (same topo): old branch raced
680 pushing touching different named branch (same topo): old branch raced
673 ---------------------------------------------------------------------
681 ---------------------------------------------------------------------
674
682
675 Pushing two children on the same head, one is a different named branch
683 Pushing two children on the same head, one is a different named branch
676
684
677 # a (raced, default-branch)
685 # a (raced, default-branch)
678 # |
686 # |
679 # | b (new branch)
687 # | b (new branch)
680 # |/
688 # |/
681 # * (default-branch)
689 # * (default-branch)
682
690
683 (resync-all)
691 (resync-all)
684
692
685 #if strict
693 #if strict
686
694
687 $ hg -R ./server pull ./client-racy
695 $ hg -R ./server pull ./client-racy
688 pulling from ./client-racy
696 pulling from ./client-racy
689 searching for changes
697 searching for changes
690 adding changesets
698 adding changesets
691 adding manifests
699 adding manifests
692 adding file changes
700 adding file changes
693 added 1 changesets with 1 changes to 1 files (+1 heads)
701 added 1 changesets with 1 changes to 1 files (+1 heads)
694 new changesets 833be552cfe6 (1 drafts)
702 new changesets 833be552cfe6 (1 drafts)
695 (run 'hg heads .' to see heads, 'hg merge' to merge)
703 (run 'hg heads .' to see heads, 'hg merge' to merge)
696
704
697 #endif
705 #endif
698 #if unrelated
706 #if unrelated
699
707
700 $ hg -R ./server pull ./client-racy
708 $ hg -R ./server pull ./client-racy
701 pulling from ./client-racy
709 pulling from ./client-racy
702 searching for changes
710 searching for changes
703 no changes found
711 no changes found
704
712
705 #endif
713 #endif
706
714
707 $ hg -R ./client-other pull
715 $ hg -R ./client-other pull
708 pulling from ssh://user@dummy/server
716 pulling from ssh://user@dummy/server
709 searching for changes
717 searching for changes
710 adding changesets
718 adding changesets
711 adding manifests
719 adding manifests
712 adding file changes
720 adding file changes
713 added 1 changesets with 1 changes to 1 files (+1 heads)
721 added 1 changesets with 1 changes to 1 files (+1 heads)
714 new changesets 833be552cfe6 (1 drafts)
722 new changesets 833be552cfe6 (1 drafts)
715 (run 'hg heads .' to see heads, 'hg merge' to merge)
723 (run 'hg heads .' to see heads, 'hg merge' to merge)
716 $ hg -R ./client-racy pull
724 $ hg -R ./client-racy pull
717 pulling from ssh://user@dummy/server
725 pulling from ssh://user@dummy/server
718 searching for changes
726 searching for changes
719 adding changesets
727 adding changesets
720 adding manifests
728 adding manifests
721 adding file changes
729 adding file changes
722 added 1 changesets with 1 changes to 1 files (+1 heads)
730 added 1 changesets with 1 changes to 1 files (+1 heads)
723 new changesets 75d69cba5402 (1 drafts)
731 new changesets 75d69cba5402 (1 drafts)
724 (run 'hg heads' to see heads)
732 (run 'hg heads' to see heads)
725
733
726 $ hg -R server graph
734 $ hg -R server graph
727 o 833be552cfe6 C-H (my-first-test-branch)
735 o 833be552cfe6 C-H (my-first-test-branch)
728 |
736 |
729 | o 75d69cba5402 C-G (default)
737 | o 75d69cba5402 C-G (default)
730 |/
738 |/
731 o d9e379a8c432 C-F (default)
739 o d9e379a8c432 C-F (default)
732 |
740 |
733 o 51c544a58128 C-C (default)
741 o 51c544a58128 C-C (default)
734 |
742 |
735 | o d603e2c0cdd7 C-E (default)
743 | o d603e2c0cdd7 C-E (default)
736 |/
744 |/
737 o 98217d5a1659 C-A (default)
745 o 98217d5a1659 C-A (default)
738 |
746 |
739 | o 59e76faf78bd C-D (default)
747 | o 59e76faf78bd C-D (default)
740 | |
748 | |
741 | o a9149a1428e2 C-B (default)
749 | o a9149a1428e2 C-B (default)
742 |/
750 |/
743 @ 842e2fac6304 C-ROOT (default)
751 @ 842e2fac6304 C-ROOT (default)
744
752
745
753
746 Creating changesets
754 Creating changesets
747
755
748 (new named branch from one head)
756 (new named branch from one head)
749
757
750 $ hg -R client-other/ up 'desc("C-G")'
758 $ hg -R client-other/ up 'desc("C-G")'
751 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
759 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
752 $ echo aaa >> client-other/a
760 $ echo aaa >> client-other/a
753 $ hg -R client-other/ branch my-second-test-branch
761 $ hg -R client-other/ branch my-second-test-branch
754 marked working directory as branch my-second-test-branch
762 marked working directory as branch my-second-test-branch
755 $ hg -R client-other/ commit -m "C-I"
763 $ hg -R client-other/ commit -m "C-I"
756
764
757 (children "updating" that same head)
765 (children "updating" that same head)
758
766
759 $ hg -R client-racy/ up 'desc("C-G")'
767 $ hg -R client-racy/ up 'desc("C-G")'
760 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
768 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
761 $ echo bbb >> client-racy/a
769 $ echo bbb >> client-racy/a
762 $ hg -R client-racy/ commit -m "C-J"
770 $ hg -R client-racy/ commit -m "C-J"
763
771
764 Pushing
772 Pushing
765
773
766 $ hg -R client-racy push -r 'tip' > ./push-log 2>&1 &
774 $ hg -R client-racy push -r 'tip' > ./push-log 2>&1 &
767
775
768 $ waiton $TESTTMP/readyfile
776 $ waiton $TESTTMP/readyfile
769
777
770 $ hg -R client-other push -fr 'tip' --new-branch
778 $ hg -R client-other push -fr 'tip' --new-branch
771 pushing to ssh://user@dummy/server
779 pushing to ssh://user@dummy/server
772 searching for changes
780 searching for changes
773 remote: adding changesets
781 remote: adding changesets
774 remote: adding manifests
782 remote: adding manifests
775 remote: adding file changes
783 remote: adding file changes
776 remote: added 1 changesets with 1 changes to 1 files
784 remote: added 1 changesets with 1 changes to 1 files
777
785
778 $ release $TESTTMP/watchfile
786 $ release $TESTTMP/watchfile
779
787
780 Check the result of the push
788 Check the result of the push
781
789
782 #if strict
790 #if strict
783
791
784 $ cat ./push-log
792 $ cat ./push-log
785 pushing to ssh://user@dummy/server
793 pushing to ssh://user@dummy/server
786 searching for changes
794 searching for changes
787 wrote ready: $TESTTMP/readyfile
795 wrote ready: $TESTTMP/readyfile
788 waiting on: $TESTTMP/watchfile
796 waiting on: $TESTTMP/watchfile
789 abort: push failed:
797 abort: push failed:
790 'remote repository changed while pushing - please try again'
798 'remote repository changed while pushing - please try again'
791
799
792 $ hg -R server graph
800 $ hg -R server graph
793 o b35ed749f288 C-I (my-second-test-branch)
801 o b35ed749f288 C-I (my-second-test-branch)
794 |
802 |
795 o 75d69cba5402 C-G (default)
803 o 75d69cba5402 C-G (default)
796 |
804 |
797 | o 833be552cfe6 C-H (my-first-test-branch)
805 | o 833be552cfe6 C-H (my-first-test-branch)
798 |/
806 |/
799 o d9e379a8c432 C-F (default)
807 o d9e379a8c432 C-F (default)
800 |
808 |
801 o 51c544a58128 C-C (default)
809 o 51c544a58128 C-C (default)
802 |
810 |
803 | o d603e2c0cdd7 C-E (default)
811 | o d603e2c0cdd7 C-E (default)
804 |/
812 |/
805 o 98217d5a1659 C-A (default)
813 o 98217d5a1659 C-A (default)
806 |
814 |
807 | o 59e76faf78bd C-D (default)
815 | o 59e76faf78bd C-D (default)
808 | |
816 | |
809 | o a9149a1428e2 C-B (default)
817 | o a9149a1428e2 C-B (default)
810 |/
818 |/
811 @ 842e2fac6304 C-ROOT (default)
819 @ 842e2fac6304 C-ROOT (default)
812
820
813
821
814 #endif
822 #endif
815
823
816 #if unrelated
824 #if unrelated
817
825
818 (unrelated named branches are unrelated)
826 (unrelated named branches are unrelated)
819
827
820 $ cat ./push-log
828 $ cat ./push-log
821 pushing to ssh://user@dummy/server
829 pushing to ssh://user@dummy/server
822 searching for changes
830 searching for changes
823 wrote ready: $TESTTMP/readyfile
831 wrote ready: $TESTTMP/readyfile
824 waiting on: $TESTTMP/watchfile
832 waiting on: $TESTTMP/watchfile
825 remote: adding changesets
833 remote: adding changesets
826 remote: adding manifests
834 remote: adding manifests
827 remote: adding file changes
835 remote: adding file changes
828 remote: added 1 changesets with 1 changes to 1 files (+1 heads)
836 remote: added 1 changesets with 1 changes to 1 files (+1 heads)
829
837
830 $ hg -R server graph
838 $ hg -R server graph
831 o 89420bf00fae C-J (default)
839 o 89420bf00fae C-J (default)
832 |
840 |
833 | o b35ed749f288 C-I (my-second-test-branch)
841 | o b35ed749f288 C-I (my-second-test-branch)
834 |/
842 |/
835 o 75d69cba5402 C-G (default)
843 o 75d69cba5402 C-G (default)
836 |
844 |
837 | o 833be552cfe6 C-H (my-first-test-branch)
845 | o 833be552cfe6 C-H (my-first-test-branch)
838 |/
846 |/
839 o d9e379a8c432 C-F (default)
847 o d9e379a8c432 C-F (default)
840 |
848 |
841 o 51c544a58128 C-C (default)
849 o 51c544a58128 C-C (default)
842 |
850 |
843 | o d603e2c0cdd7 C-E (default)
851 | o d603e2c0cdd7 C-E (default)
844 |/
852 |/
845 o 98217d5a1659 C-A (default)
853 o 98217d5a1659 C-A (default)
846 |
854 |
847 | o 59e76faf78bd C-D (default)
855 | o 59e76faf78bd C-D (default)
848 | |
856 | |
849 | o a9149a1428e2 C-B (default)
857 | o a9149a1428e2 C-B (default)
850 |/
858 |/
851 @ 842e2fac6304 C-ROOT (default)
859 @ 842e2fac6304 C-ROOT (default)
852
860
853
861
854 #endif
862 #endif
855
863
856 pushing racing push touch multiple heads
864 pushing racing push touch multiple heads
857 ----------------------------------------
865 ----------------------------------------
858
866
859 There are multiple heads, but the racing push touch all of them
867 There are multiple heads, but the racing push touch all of them
860
868
861 # a (raced)
869 # a (raced)
862 # | b
870 # | b
863 # |/|
871 # |/|
864 # * *
872 # * *
865 # |/
873 # |/
866 # *
874 # *
867
875
868 (resync-all)
876 (resync-all)
869
877
870 #if strict
878 #if strict
871
879
872 $ hg -R ./server pull ./client-racy
880 $ hg -R ./server pull ./client-racy
873 pulling from ./client-racy
881 pulling from ./client-racy
874 searching for changes
882 searching for changes
875 adding changesets
883 adding changesets
876 adding manifests
884 adding manifests
877 adding file changes
885 adding file changes
878 added 1 changesets with 1 changes to 1 files (+1 heads)
886 added 1 changesets with 1 changes to 1 files (+1 heads)
879 new changesets 89420bf00fae (1 drafts)
887 new changesets 89420bf00fae (1 drafts)
880 (run 'hg heads .' to see heads, 'hg merge' to merge)
888 (run 'hg heads .' to see heads, 'hg merge' to merge)
881
889
882 #endif
890 #endif
883
891
884 #if unrelated
892 #if unrelated
885
893
886 $ hg -R ./server pull ./client-racy
894 $ hg -R ./server pull ./client-racy
887 pulling from ./client-racy
895 pulling from ./client-racy
888 searching for changes
896 searching for changes
889 no changes found
897 no changes found
890
898
891 #endif
899 #endif
892
900
893 $ hg -R ./client-other pull
901 $ hg -R ./client-other pull
894 pulling from ssh://user@dummy/server
902 pulling from ssh://user@dummy/server
895 searching for changes
903 searching for changes
896 adding changesets
904 adding changesets
897 adding manifests
905 adding manifests
898 adding file changes
906 adding file changes
899 added 1 changesets with 1 changes to 1 files (+1 heads)
907 added 1 changesets with 1 changes to 1 files (+1 heads)
900 new changesets 89420bf00fae (1 drafts)
908 new changesets 89420bf00fae (1 drafts)
901 (run 'hg heads' to see heads)
909 (run 'hg heads' to see heads)
902 $ hg -R ./client-racy pull
910 $ hg -R ./client-racy pull
903 pulling from ssh://user@dummy/server
911 pulling from ssh://user@dummy/server
904 searching for changes
912 searching for changes
905 adding changesets
913 adding changesets
906 adding manifests
914 adding manifests
907 adding file changes
915 adding file changes
908 added 1 changesets with 1 changes to 1 files (+1 heads)
916 added 1 changesets with 1 changes to 1 files (+1 heads)
909 new changesets b35ed749f288 (1 drafts)
917 new changesets b35ed749f288 (1 drafts)
910 (run 'hg heads .' to see heads, 'hg merge' to merge)
918 (run 'hg heads .' to see heads, 'hg merge' to merge)
911
919
912 $ hg -R server graph
920 $ hg -R server graph
913 o 89420bf00fae C-J (default)
921 o 89420bf00fae C-J (default)
914 |
922 |
915 | o b35ed749f288 C-I (my-second-test-branch)
923 | o b35ed749f288 C-I (my-second-test-branch)
916 |/
924 |/
917 o 75d69cba5402 C-G (default)
925 o 75d69cba5402 C-G (default)
918 |
926 |
919 | o 833be552cfe6 C-H (my-first-test-branch)
927 | o 833be552cfe6 C-H (my-first-test-branch)
920 |/
928 |/
921 o d9e379a8c432 C-F (default)
929 o d9e379a8c432 C-F (default)
922 |
930 |
923 o 51c544a58128 C-C (default)
931 o 51c544a58128 C-C (default)
924 |
932 |
925 | o d603e2c0cdd7 C-E (default)
933 | o d603e2c0cdd7 C-E (default)
926 |/
934 |/
927 o 98217d5a1659 C-A (default)
935 o 98217d5a1659 C-A (default)
928 |
936 |
929 | o 59e76faf78bd C-D (default)
937 | o 59e76faf78bd C-D (default)
930 | |
938 | |
931 | o a9149a1428e2 C-B (default)
939 | o a9149a1428e2 C-B (default)
932 |/
940 |/
933 @ 842e2fac6304 C-ROOT (default)
941 @ 842e2fac6304 C-ROOT (default)
934
942
935
943
936 Creating changesets
944 Creating changesets
937
945
938 (merges heads)
946 (merges heads)
939
947
940 $ hg -R client-other/ up 'desc("C-E")'
948 $ hg -R client-other/ up 'desc("C-E")'
941 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
949 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
942 $ hg -R client-other/ merge 'desc("C-D")'
950 $ hg -R client-other/ merge 'desc("C-D")'
943 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
951 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
944 (branch merge, don't forget to commit)
952 (branch merge, don't forget to commit)
945 $ hg -R client-other/ commit -m "C-K"
953 $ hg -R client-other/ commit -m "C-K"
946
954
947 (update one head)
955 (update one head)
948
956
949 $ hg -R client-racy/ up 'desc("C-D")'
957 $ hg -R client-racy/ up 'desc("C-D")'
950 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
958 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
951 $ echo bbb >> client-racy/b
959 $ echo bbb >> client-racy/b
952 $ hg -R client-racy/ commit -m "C-L"
960 $ hg -R client-racy/ commit -m "C-L"
953
961
954 Pushing
962 Pushing
955
963
956 $ hg -R client-racy push -r 'tip' > ./push-log 2>&1 &
964 $ hg -R client-racy push -r 'tip' > ./push-log 2>&1 &
957
965
958 $ waiton $TESTTMP/readyfile
966 $ waiton $TESTTMP/readyfile
959
967
960 $ hg -R client-other push -fr 'tip' --new-branch
968 $ hg -R client-other push -fr 'tip' --new-branch
961 pushing to ssh://user@dummy/server
969 pushing to ssh://user@dummy/server
962 searching for changes
970 searching for changes
963 remote: adding changesets
971 remote: adding changesets
964 remote: adding manifests
972 remote: adding manifests
965 remote: adding file changes
973 remote: adding file changes
966 remote: added 1 changesets with 0 changes to 0 files (-1 heads)
974 remote: added 1 changesets with 0 changes to 0 files (-1 heads)
967
975
968 $ release $TESTTMP/watchfile
976 $ release $TESTTMP/watchfile
969
977
970 Check the result of the push
978 Check the result of the push
971
979
972 $ cat ./push-log
980 $ cat ./push-log
973 pushing to ssh://user@dummy/server
981 pushing to ssh://user@dummy/server
974 searching for changes
982 searching for changes
975 wrote ready: $TESTTMP/readyfile
983 wrote ready: $TESTTMP/readyfile
976 waiting on: $TESTTMP/watchfile
984 waiting on: $TESTTMP/watchfile
977 abort: push failed:
985 abort: push failed:
978 'remote repository changed while pushing - please try again'
986 'remote repository changed while pushing - please try again'
979
987
980 $ hg -R server graph
988 $ hg -R server graph
981 o be705100c623 C-K (default)
989 o be705100c623 C-K (default)
982 |\
990 |\
983 | o d603e2c0cdd7 C-E (default)
991 | o d603e2c0cdd7 C-E (default)
984 | |
992 | |
985 o | 59e76faf78bd C-D (default)
993 o | 59e76faf78bd C-D (default)
986 | |
994 | |
987 | | o 89420bf00fae C-J (default)
995 | | o 89420bf00fae C-J (default)
988 | | |
996 | | |
989 | | | o b35ed749f288 C-I (my-second-test-branch)
997 | | | o b35ed749f288 C-I (my-second-test-branch)
990 | | |/
998 | | |/
991 | | o 75d69cba5402 C-G (default)
999 | | o 75d69cba5402 C-G (default)
992 | | |
1000 | | |
993 | | | o 833be552cfe6 C-H (my-first-test-branch)
1001 | | | o 833be552cfe6 C-H (my-first-test-branch)
994 | | |/
1002 | | |/
995 | | o d9e379a8c432 C-F (default)
1003 | | o d9e379a8c432 C-F (default)
996 | | |
1004 | | |
997 | | o 51c544a58128 C-C (default)
1005 | | o 51c544a58128 C-C (default)
998 | |/
1006 | |/
999 o | a9149a1428e2 C-B (default)
1007 o | a9149a1428e2 C-B (default)
1000 | |
1008 | |
1001 | o 98217d5a1659 C-A (default)
1009 | o 98217d5a1659 C-A (default)
1002 |/
1010 |/
1003 @ 842e2fac6304 C-ROOT (default)
1011 @ 842e2fac6304 C-ROOT (default)
1004
1012
1005
1013
1006 pushing raced push touch multiple heads
1014 pushing raced push touch multiple heads
1007 ---------------------------------------
1015 ---------------------------------------
1008
1016
1009 There are multiple heads, the raced push touch all of them
1017 There are multiple heads, the raced push touch all of them
1010
1018
1011 # b
1019 # b
1012 # | a (raced)
1020 # | a (raced)
1013 # |/|
1021 # |/|
1014 # * *
1022 # * *
1015 # |/
1023 # |/
1016 # *
1024 # *
1017
1025
1018 (resync-all)
1026 (resync-all)
1019
1027
1020 $ hg -R ./server pull ./client-racy
1028 $ hg -R ./server pull ./client-racy
1021 pulling from ./client-racy
1029 pulling from ./client-racy
1022 searching for changes
1030 searching for changes
1023 adding changesets
1031 adding changesets
1024 adding manifests
1032 adding manifests
1025 adding file changes
1033 adding file changes
1026 added 1 changesets with 1 changes to 1 files (+1 heads)
1034 added 1 changesets with 1 changes to 1 files (+1 heads)
1027 new changesets cac2cead0ff0 (1 drafts)
1035 new changesets cac2cead0ff0 (1 drafts)
1028 (run 'hg heads .' to see heads, 'hg merge' to merge)
1036 (run 'hg heads .' to see heads, 'hg merge' to merge)
1029 $ hg -R ./client-other pull
1037 $ hg -R ./client-other pull
1030 pulling from ssh://user@dummy/server
1038 pulling from ssh://user@dummy/server
1031 searching for changes
1039 searching for changes
1032 adding changesets
1040 adding changesets
1033 adding manifests
1041 adding manifests
1034 adding file changes
1042 adding file changes
1035 added 1 changesets with 1 changes to 1 files (+1 heads)
1043 added 1 changesets with 1 changes to 1 files (+1 heads)
1036 new changesets cac2cead0ff0 (1 drafts)
1044 new changesets cac2cead0ff0 (1 drafts)
1037 (run 'hg heads .' to see heads, 'hg merge' to merge)
1045 (run 'hg heads .' to see heads, 'hg merge' to merge)
1038 $ hg -R ./client-racy pull
1046 $ hg -R ./client-racy pull
1039 pulling from ssh://user@dummy/server
1047 pulling from ssh://user@dummy/server
1040 searching for changes
1048 searching for changes
1041 adding changesets
1049 adding changesets
1042 adding manifests
1050 adding manifests
1043 adding file changes
1051 adding file changes
1044 added 1 changesets with 0 changes to 0 files
1052 added 1 changesets with 0 changes to 0 files
1045 new changesets be705100c623 (1 drafts)
1053 new changesets be705100c623 (1 drafts)
1046 (run 'hg update' to get a working copy)
1054 (run 'hg update' to get a working copy)
1047
1055
1048 $ hg -R server graph
1056 $ hg -R server graph
1049 o cac2cead0ff0 C-L (default)
1057 o cac2cead0ff0 C-L (default)
1050 |
1058 |
1051 | o be705100c623 C-K (default)
1059 | o be705100c623 C-K (default)
1052 |/|
1060 |/|
1053 | o d603e2c0cdd7 C-E (default)
1061 | o d603e2c0cdd7 C-E (default)
1054 | |
1062 | |
1055 o | 59e76faf78bd C-D (default)
1063 o | 59e76faf78bd C-D (default)
1056 | |
1064 | |
1057 | | o 89420bf00fae C-J (default)
1065 | | o 89420bf00fae C-J (default)
1058 | | |
1066 | | |
1059 | | | o b35ed749f288 C-I (my-second-test-branch)
1067 | | | o b35ed749f288 C-I (my-second-test-branch)
1060 | | |/
1068 | | |/
1061 | | o 75d69cba5402 C-G (default)
1069 | | o 75d69cba5402 C-G (default)
1062 | | |
1070 | | |
1063 | | | o 833be552cfe6 C-H (my-first-test-branch)
1071 | | | o 833be552cfe6 C-H (my-first-test-branch)
1064 | | |/
1072 | | |/
1065 | | o d9e379a8c432 C-F (default)
1073 | | o d9e379a8c432 C-F (default)
1066 | | |
1074 | | |
1067 | | o 51c544a58128 C-C (default)
1075 | | o 51c544a58128 C-C (default)
1068 | |/
1076 | |/
1069 o | a9149a1428e2 C-B (default)
1077 o | a9149a1428e2 C-B (default)
1070 | |
1078 | |
1071 | o 98217d5a1659 C-A (default)
1079 | o 98217d5a1659 C-A (default)
1072 |/
1080 |/
1073 @ 842e2fac6304 C-ROOT (default)
1081 @ 842e2fac6304 C-ROOT (default)
1074
1082
1075
1083
1076 Creating changesets
1084 Creating changesets
1077
1085
1078 (update existing head)
1086 (update existing head)
1079
1087
1080 $ echo aaa >> client-other/a
1088 $ echo aaa >> client-other/a
1081 $ hg -R client-other/ commit -m "C-M"
1089 $ hg -R client-other/ commit -m "C-M"
1082
1090
1083 (merge heads)
1091 (merge heads)
1084
1092
1085 $ hg -R client-racy/ merge 'desc("C-K")'
1093 $ hg -R client-racy/ merge 'desc("C-K")'
1086 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1094 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1087 (branch merge, don't forget to commit)
1095 (branch merge, don't forget to commit)
1088 $ hg -R client-racy/ commit -m "C-N"
1096 $ hg -R client-racy/ commit -m "C-N"
1089
1097
1090 Pushing
1098 Pushing
1091
1099
1092 $ hg -R client-racy push -r 'tip' > ./push-log 2>&1 &
1100 $ hg -R client-racy push -r 'tip' > ./push-log 2>&1 &
1093
1101
1094 $ waiton $TESTTMP/readyfile
1102 $ waiton $TESTTMP/readyfile
1095
1103
1096 $ hg -R client-other push -fr 'tip' --new-branch
1104 $ hg -R client-other push -fr 'tip' --new-branch
1097 pushing to ssh://user@dummy/server
1105 pushing to ssh://user@dummy/server
1098 searching for changes
1106 searching for changes
1099 remote: adding changesets
1107 remote: adding changesets
1100 remote: adding manifests
1108 remote: adding manifests
1101 remote: adding file changes
1109 remote: adding file changes
1102 remote: added 1 changesets with 1 changes to 1 files
1110 remote: added 1 changesets with 1 changes to 1 files
1103
1111
1104 $ release $TESTTMP/watchfile
1112 $ release $TESTTMP/watchfile
1105
1113
1106 Check the result of the push
1114 Check the result of the push
1107
1115
1108 $ cat ./push-log
1116 $ cat ./push-log
1109 pushing to ssh://user@dummy/server
1117 pushing to ssh://user@dummy/server
1110 searching for changes
1118 searching for changes
1111 wrote ready: $TESTTMP/readyfile
1119 wrote ready: $TESTTMP/readyfile
1112 waiting on: $TESTTMP/watchfile
1120 waiting on: $TESTTMP/watchfile
1113 abort: push failed:
1121 abort: push failed:
1114 'remote repository changed while pushing - please try again'
1122 'remote repository changed while pushing - please try again'
1115
1123
1116 $ hg -R server graph
1124 $ hg -R server graph
1117 o 6fd3090135df C-M (default)
1125 o 6fd3090135df C-M (default)
1118 |
1126 |
1119 o be705100c623 C-K (default)
1127 o be705100c623 C-K (default)
1120 |\
1128 |\
1121 | o d603e2c0cdd7 C-E (default)
1129 | o d603e2c0cdd7 C-E (default)
1122 | |
1130 | |
1123 +---o cac2cead0ff0 C-L (default)
1131 +---o cac2cead0ff0 C-L (default)
1124 | |
1132 | |
1125 o | 59e76faf78bd C-D (default)
1133 o | 59e76faf78bd C-D (default)
1126 | |
1134 | |
1127 | | o 89420bf00fae C-J (default)
1135 | | o 89420bf00fae C-J (default)
1128 | | |
1136 | | |
1129 | | | o b35ed749f288 C-I (my-second-test-branch)
1137 | | | o b35ed749f288 C-I (my-second-test-branch)
1130 | | |/
1138 | | |/
1131 | | o 75d69cba5402 C-G (default)
1139 | | o 75d69cba5402 C-G (default)
1132 | | |
1140 | | |
1133 | | | o 833be552cfe6 C-H (my-first-test-branch)
1141 | | | o 833be552cfe6 C-H (my-first-test-branch)
1134 | | |/
1142 | | |/
1135 | | o d9e379a8c432 C-F (default)
1143 | | o d9e379a8c432 C-F (default)
1136 | | |
1144 | | |
1137 | | o 51c544a58128 C-C (default)
1145 | | o 51c544a58128 C-C (default)
1138 | |/
1146 | |/
1139 o | a9149a1428e2 C-B (default)
1147 o | a9149a1428e2 C-B (default)
1140 | |
1148 | |
1141 | o 98217d5a1659 C-A (default)
1149 | o 98217d5a1659 C-A (default)
1142 |/
1150 |/
1143 @ 842e2fac6304 C-ROOT (default)
1151 @ 842e2fac6304 C-ROOT (default)
1144
1152
1145
1153
1146 racing commit push a new head behind another named branch
1154 racing commit push a new head behind another named branch
1147 ---------------------------------------------------------
1155 ---------------------------------------------------------
1148
1156
1149 non-continuous branch are valid case, we tests for them.
1157 non-continuous branch are valid case, we tests for them.
1150
1158
1151 # b (branch default)
1159 # b (branch default)
1152 # |
1160 # |
1153 # o (branch foo)
1161 # o (branch foo)
1154 # |
1162 # |
1155 # | a (raced, branch default)
1163 # | a (raced, branch default)
1156 # |/
1164 # |/
1157 # * (branch foo)
1165 # * (branch foo)
1158 # |
1166 # |
1159 # * (branch default)
1167 # * (branch default)
1160
1168
1161 (resync-all + other branch)
1169 (resync-all + other branch)
1162
1170
1163 $ hg -R ./server pull ./client-racy
1171 $ hg -R ./server pull ./client-racy
1164 pulling from ./client-racy
1172 pulling from ./client-racy
1165 searching for changes
1173 searching for changes
1166 adding changesets
1174 adding changesets
1167 adding manifests
1175 adding manifests
1168 adding file changes
1176 adding file changes
1169 added 1 changesets with 0 changes to 0 files
1177 added 1 changesets with 0 changes to 0 files
1170 new changesets 866a66e18630 (1 drafts)
1178 new changesets 866a66e18630 (1 drafts)
1171 (run 'hg update' to get a working copy)
1179 (run 'hg update' to get a working copy)
1172
1180
1173 (creates named branch on head)
1181 (creates named branch on head)
1174
1182
1175 $ hg -R ./server/ up 'desc("C-N")'
1183 $ hg -R ./server/ up 'desc("C-N")'
1176 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
1184 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
1177 $ hg -R ./server/ branch other
1185 $ hg -R ./server/ branch other
1178 marked working directory as branch other
1186 marked working directory as branch other
1179 $ hg -R ./server/ ci -m "C-Z"
1187 $ hg -R ./server/ ci -m "C-Z"
1180 $ hg -R ./server/ up null
1188 $ hg -R ./server/ up null
1181 0 files updated, 0 files merged, 3 files removed, 0 files unresolved
1189 0 files updated, 0 files merged, 3 files removed, 0 files unresolved
1182
1190
1183 (sync client)
1191 (sync client)
1184
1192
1185 $ hg -R ./client-other pull
1193 $ hg -R ./client-other pull
1186 pulling from ssh://user@dummy/server
1194 pulling from ssh://user@dummy/server
1187 searching for changes
1195 searching for changes
1188 adding changesets
1196 adding changesets
1189 adding manifests
1197 adding manifests
1190 adding file changes
1198 adding file changes
1191 added 2 changesets with 0 changes to 0 files
1199 added 2 changesets with 0 changes to 0 files
1192 new changesets 866a66e18630:55a6f1c01b48 (2 drafts)
1200 new changesets 866a66e18630:55a6f1c01b48 (2 drafts)
1193 (run 'hg update' to get a working copy)
1201 (run 'hg update' to get a working copy)
1194 $ hg -R ./client-racy pull
1202 $ hg -R ./client-racy pull
1195 pulling from ssh://user@dummy/server
1203 pulling from ssh://user@dummy/server
1196 searching for changes
1204 searching for changes
1197 adding changesets
1205 adding changesets
1198 adding manifests
1206 adding manifests
1199 adding file changes
1207 adding file changes
1200 added 2 changesets with 1 changes to 1 files (+1 heads)
1208 added 2 changesets with 1 changes to 1 files (+1 heads)
1201 new changesets 6fd3090135df:55a6f1c01b48 (2 drafts)
1209 new changesets 6fd3090135df:55a6f1c01b48 (2 drafts)
1202 (run 'hg heads .' to see heads, 'hg merge' to merge)
1210 (run 'hg heads .' to see heads, 'hg merge' to merge)
1203
1211
1204 $ hg -R server graph
1212 $ hg -R server graph
1205 o 55a6f1c01b48 C-Z (other)
1213 o 55a6f1c01b48 C-Z (other)
1206 |
1214 |
1207 o 866a66e18630 C-N (default)
1215 o 866a66e18630 C-N (default)
1208 |\
1216 |\
1209 +---o 6fd3090135df C-M (default)
1217 +---o 6fd3090135df C-M (default)
1210 | |
1218 | |
1211 | o cac2cead0ff0 C-L (default)
1219 | o cac2cead0ff0 C-L (default)
1212 | |
1220 | |
1213 o | be705100c623 C-K (default)
1221 o | be705100c623 C-K (default)
1214 |\|
1222 |\|
1215 o | d603e2c0cdd7 C-E (default)
1223 o | d603e2c0cdd7 C-E (default)
1216 | |
1224 | |
1217 | o 59e76faf78bd C-D (default)
1225 | o 59e76faf78bd C-D (default)
1218 | |
1226 | |
1219 | | o 89420bf00fae C-J (default)
1227 | | o 89420bf00fae C-J (default)
1220 | | |
1228 | | |
1221 | | | o b35ed749f288 C-I (my-second-test-branch)
1229 | | | o b35ed749f288 C-I (my-second-test-branch)
1222 | | |/
1230 | | |/
1223 | | o 75d69cba5402 C-G (default)
1231 | | o 75d69cba5402 C-G (default)
1224 | | |
1232 | | |
1225 | | | o 833be552cfe6 C-H (my-first-test-branch)
1233 | | | o 833be552cfe6 C-H (my-first-test-branch)
1226 | | |/
1234 | | |/
1227 | | o d9e379a8c432 C-F (default)
1235 | | o d9e379a8c432 C-F (default)
1228 | | |
1236 | | |
1229 +---o 51c544a58128 C-C (default)
1237 +---o 51c544a58128 C-C (default)
1230 | |
1238 | |
1231 | o a9149a1428e2 C-B (default)
1239 | o a9149a1428e2 C-B (default)
1232 | |
1240 | |
1233 o | 98217d5a1659 C-A (default)
1241 o | 98217d5a1659 C-A (default)
1234 |/
1242 |/
1235 o 842e2fac6304 C-ROOT (default)
1243 o 842e2fac6304 C-ROOT (default)
1236
1244
1237
1245
1238 Creating changesets
1246 Creating changesets
1239
1247
1240 (update default head through another named branch one)
1248 (update default head through another named branch one)
1241
1249
1242 $ hg -R client-other/ up 'desc("C-Z")'
1250 $ hg -R client-other/ up 'desc("C-Z")'
1243 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
1251 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
1244 $ echo aaa >> client-other/a
1252 $ echo aaa >> client-other/a
1245 $ hg -R client-other/ commit -m "C-O"
1253 $ hg -R client-other/ commit -m "C-O"
1246 $ echo aaa >> client-other/a
1254 $ echo aaa >> client-other/a
1247 $ hg -R client-other/ branch --force default
1255 $ hg -R client-other/ branch --force default
1248 marked working directory as branch default
1256 marked working directory as branch default
1249 $ hg -R client-other/ commit -m "C-P"
1257 $ hg -R client-other/ commit -m "C-P"
1250 created new head
1258 created new head
1251
1259
1252 (update default head)
1260 (update default head)
1253
1261
1254 $ hg -R client-racy/ up 'desc("C-Z")'
1262 $ hg -R client-racy/ up 'desc("C-Z")'
1255 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
1263 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
1256 $ echo bbb >> client-other/a
1264 $ echo bbb >> client-other/a
1257 $ hg -R client-racy/ branch --force default
1265 $ hg -R client-racy/ branch --force default
1258 marked working directory as branch default
1266 marked working directory as branch default
1259 $ hg -R client-racy/ commit -m "C-Q"
1267 $ hg -R client-racy/ commit -m "C-Q"
1260 created new head
1268 created new head
1261
1269
1262 Pushing
1270 Pushing
1263
1271
1264 $ hg -R client-racy push -r 'tip' > ./push-log 2>&1 &
1272 $ hg -R client-racy push -r 'tip' > ./push-log 2>&1 &
1265
1273
1266 $ waiton $TESTTMP/readyfile
1274 $ waiton $TESTTMP/readyfile
1267
1275
1268 $ hg -R client-other push -fr 'tip' --new-branch
1276 $ hg -R client-other push -fr 'tip' --new-branch
1269 pushing to ssh://user@dummy/server
1277 pushing to ssh://user@dummy/server
1270 searching for changes
1278 searching for changes
1271 remote: adding changesets
1279 remote: adding changesets
1272 remote: adding manifests
1280 remote: adding manifests
1273 remote: adding file changes
1281 remote: adding file changes
1274 remote: added 2 changesets with 1 changes to 1 files
1282 remote: added 2 changesets with 1 changes to 1 files
1275
1283
1276 $ release $TESTTMP/watchfile
1284 $ release $TESTTMP/watchfile
1277
1285
1278 Check the result of the push
1286 Check the result of the push
1279
1287
1280 $ cat ./push-log
1288 $ cat ./push-log
1281 pushing to ssh://user@dummy/server
1289 pushing to ssh://user@dummy/server
1282 searching for changes
1290 searching for changes
1283 wrote ready: $TESTTMP/readyfile
1291 wrote ready: $TESTTMP/readyfile
1284 waiting on: $TESTTMP/watchfile
1292 waiting on: $TESTTMP/watchfile
1285 abort: push failed:
1293 abort: push failed:
1286 'remote repository changed while pushing - please try again'
1294 'remote repository changed while pushing - please try again'
1287
1295
1288 $ hg -R server graph
1296 $ hg -R server graph
1289 o 1b58ee3f79e5 C-P (default)
1297 o 1b58ee3f79e5 C-P (default)
1290 |
1298 |
1291 o d0a85b2252a9 C-O (other)
1299 o d0a85b2252a9 C-O (other)
1292 |
1300 |
1293 o 55a6f1c01b48 C-Z (other)
1301 o 55a6f1c01b48 C-Z (other)
1294 |
1302 |
1295 o 866a66e18630 C-N (default)
1303 o 866a66e18630 C-N (default)
1296 |\
1304 |\
1297 +---o 6fd3090135df C-M (default)
1305 +---o 6fd3090135df C-M (default)
1298 | |
1306 | |
1299 | o cac2cead0ff0 C-L (default)
1307 | o cac2cead0ff0 C-L (default)
1300 | |
1308 | |
1301 o | be705100c623 C-K (default)
1309 o | be705100c623 C-K (default)
1302 |\|
1310 |\|
1303 o | d603e2c0cdd7 C-E (default)
1311 o | d603e2c0cdd7 C-E (default)
1304 | |
1312 | |
1305 | o 59e76faf78bd C-D (default)
1313 | o 59e76faf78bd C-D (default)
1306 | |
1314 | |
1307 | | o 89420bf00fae C-J (default)
1315 | | o 89420bf00fae C-J (default)
1308 | | |
1316 | | |
1309 | | | o b35ed749f288 C-I (my-second-test-branch)
1317 | | | o b35ed749f288 C-I (my-second-test-branch)
1310 | | |/
1318 | | |/
1311 | | o 75d69cba5402 C-G (default)
1319 | | o 75d69cba5402 C-G (default)
1312 | | |
1320 | | |
1313 | | | o 833be552cfe6 C-H (my-first-test-branch)
1321 | | | o 833be552cfe6 C-H (my-first-test-branch)
1314 | | |/
1322 | | |/
1315 | | o d9e379a8c432 C-F (default)
1323 | | o d9e379a8c432 C-F (default)
1316 | | |
1324 | | |
1317 +---o 51c544a58128 C-C (default)
1325 +---o 51c544a58128 C-C (default)
1318 | |
1326 | |
1319 | o a9149a1428e2 C-B (default)
1327 | o a9149a1428e2 C-B (default)
1320 | |
1328 | |
1321 o | 98217d5a1659 C-A (default)
1329 o | 98217d5a1659 C-A (default)
1322 |/
1330 |/
1323 o 842e2fac6304 C-ROOT (default)
1331 o 842e2fac6304 C-ROOT (default)
1324
1332
1325
1333
1326 raced commit push a new head behind another named branch
1334 raced commit push a new head behind another named branch
1327 ---------------------------------------------------------
1335 ---------------------------------------------------------
1328
1336
1329 non-continuous branch are valid case, we tests for them.
1337 non-continuous branch are valid case, we tests for them.
1330
1338
1331 # b (raced branch default)
1339 # b (raced branch default)
1332 # |
1340 # |
1333 # o (branch foo)
1341 # o (branch foo)
1334 # |
1342 # |
1335 # | a (branch default)
1343 # | a (branch default)
1336 # |/
1344 # |/
1337 # * (branch foo)
1345 # * (branch foo)
1338 # |
1346 # |
1339 # * (branch default)
1347 # * (branch default)
1340
1348
1341 (resync-all)
1349 (resync-all)
1342
1350
1343 $ hg -R ./server pull ./client-racy
1351 $ hg -R ./server pull ./client-racy
1344 pulling from ./client-racy
1352 pulling from ./client-racy
1345 searching for changes
1353 searching for changes
1346 adding changesets
1354 adding changesets
1347 adding manifests
1355 adding manifests
1348 adding file changes
1356 adding file changes
1349 added 1 changesets with 0 changes to 0 files (+1 heads)
1357 added 1 changesets with 0 changes to 0 files (+1 heads)
1350 new changesets b0ee3d6f51bc (1 drafts)
1358 new changesets b0ee3d6f51bc (1 drafts)
1351 (run 'hg heads .' to see heads, 'hg merge' to merge)
1359 (run 'hg heads .' to see heads, 'hg merge' to merge)
1352 $ hg -R ./client-other pull
1360 $ hg -R ./client-other pull
1353 pulling from ssh://user@dummy/server
1361 pulling from ssh://user@dummy/server
1354 searching for changes
1362 searching for changes
1355 adding changesets
1363 adding changesets
1356 adding manifests
1364 adding manifests
1357 adding file changes
1365 adding file changes
1358 added 1 changesets with 0 changes to 0 files (+1 heads)
1366 added 1 changesets with 0 changes to 0 files (+1 heads)
1359 new changesets b0ee3d6f51bc (1 drafts)
1367 new changesets b0ee3d6f51bc (1 drafts)
1360 (run 'hg heads .' to see heads, 'hg merge' to merge)
1368 (run 'hg heads .' to see heads, 'hg merge' to merge)
1361 $ hg -R ./client-racy pull
1369 $ hg -R ./client-racy pull
1362 pulling from ssh://user@dummy/server
1370 pulling from ssh://user@dummy/server
1363 searching for changes
1371 searching for changes
1364 adding changesets
1372 adding changesets
1365 adding manifests
1373 adding manifests
1366 adding file changes
1374 adding file changes
1367 added 2 changesets with 1 changes to 1 files (+1 heads)
1375 added 2 changesets with 1 changes to 1 files (+1 heads)
1368 new changesets d0a85b2252a9:1b58ee3f79e5 (2 drafts)
1376 new changesets d0a85b2252a9:1b58ee3f79e5 (2 drafts)
1369 (run 'hg heads .' to see heads, 'hg merge' to merge)
1377 (run 'hg heads .' to see heads, 'hg merge' to merge)
1370
1378
1371 $ hg -R server graph
1379 $ hg -R server graph
1372 o b0ee3d6f51bc C-Q (default)
1380 o b0ee3d6f51bc C-Q (default)
1373 |
1381 |
1374 | o 1b58ee3f79e5 C-P (default)
1382 | o 1b58ee3f79e5 C-P (default)
1375 | |
1383 | |
1376 | o d0a85b2252a9 C-O (other)
1384 | o d0a85b2252a9 C-O (other)
1377 |/
1385 |/
1378 o 55a6f1c01b48 C-Z (other)
1386 o 55a6f1c01b48 C-Z (other)
1379 |
1387 |
1380 o 866a66e18630 C-N (default)
1388 o 866a66e18630 C-N (default)
1381 |\
1389 |\
1382 +---o 6fd3090135df C-M (default)
1390 +---o 6fd3090135df C-M (default)
1383 | |
1391 | |
1384 | o cac2cead0ff0 C-L (default)
1392 | o cac2cead0ff0 C-L (default)
1385 | |
1393 | |
1386 o | be705100c623 C-K (default)
1394 o | be705100c623 C-K (default)
1387 |\|
1395 |\|
1388 o | d603e2c0cdd7 C-E (default)
1396 o | d603e2c0cdd7 C-E (default)
1389 | |
1397 | |
1390 | o 59e76faf78bd C-D (default)
1398 | o 59e76faf78bd C-D (default)
1391 | |
1399 | |
1392 | | o 89420bf00fae C-J (default)
1400 | | o 89420bf00fae C-J (default)
1393 | | |
1401 | | |
1394 | | | o b35ed749f288 C-I (my-second-test-branch)
1402 | | | o b35ed749f288 C-I (my-second-test-branch)
1395 | | |/
1403 | | |/
1396 | | o 75d69cba5402 C-G (default)
1404 | | o 75d69cba5402 C-G (default)
1397 | | |
1405 | | |
1398 | | | o 833be552cfe6 C-H (my-first-test-branch)
1406 | | | o 833be552cfe6 C-H (my-first-test-branch)
1399 | | |/
1407 | | |/
1400 | | o d9e379a8c432 C-F (default)
1408 | | o d9e379a8c432 C-F (default)
1401 | | |
1409 | | |
1402 +---o 51c544a58128 C-C (default)
1410 +---o 51c544a58128 C-C (default)
1403 | |
1411 | |
1404 | o a9149a1428e2 C-B (default)
1412 | o a9149a1428e2 C-B (default)
1405 | |
1413 | |
1406 o | 98217d5a1659 C-A (default)
1414 o | 98217d5a1659 C-A (default)
1407 |/
1415 |/
1408 o 842e2fac6304 C-ROOT (default)
1416 o 842e2fac6304 C-ROOT (default)
1409
1417
1410
1418
1411 Creating changesets
1419 Creating changesets
1412
1420
1413 (update 'other' named branch head)
1421 (update 'other' named branch head)
1414
1422
1415 $ hg -R client-other/ up 'desc("C-P")'
1423 $ hg -R client-other/ up 'desc("C-P")'
1416 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
1424 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
1417 $ echo aaa >> client-other/a
1425 $ echo aaa >> client-other/a
1418 $ hg -R client-other/ branch --force other
1426 $ hg -R client-other/ branch --force other
1419 marked working directory as branch other
1427 marked working directory as branch other
1420 $ hg -R client-other/ commit -m "C-R"
1428 $ hg -R client-other/ commit -m "C-R"
1421 created new head
1429 created new head
1422
1430
1423 (update 'other named brnach through a 'default' changeset')
1431 (update 'other named brnach through a 'default' changeset')
1424
1432
1425 $ hg -R client-racy/ up 'desc("C-P")'
1433 $ hg -R client-racy/ up 'desc("C-P")'
1426 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1434 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1427 $ echo bbb >> client-racy/a
1435 $ echo bbb >> client-racy/a
1428 $ hg -R client-racy/ commit -m "C-S"
1436 $ hg -R client-racy/ commit -m "C-S"
1429 $ echo bbb >> client-racy/a
1437 $ echo bbb >> client-racy/a
1430 $ hg -R client-racy/ branch --force other
1438 $ hg -R client-racy/ branch --force other
1431 marked working directory as branch other
1439 marked working directory as branch other
1432 $ hg -R client-racy/ commit -m "C-T"
1440 $ hg -R client-racy/ commit -m "C-T"
1433 created new head
1441 created new head
1434
1442
1435 Pushing
1443 Pushing
1436
1444
1437 $ hg -R client-racy push -r 'tip' > ./push-log 2>&1 &
1445 $ hg -R client-racy push -r 'tip' > ./push-log 2>&1 &
1438
1446
1439 $ waiton $TESTTMP/readyfile
1447 $ waiton $TESTTMP/readyfile
1440
1448
1441 $ hg -R client-other push -fr 'tip' --new-branch
1449 $ hg -R client-other push -fr 'tip' --new-branch
1442 pushing to ssh://user@dummy/server
1450 pushing to ssh://user@dummy/server
1443 searching for changes
1451 searching for changes
1444 remote: adding changesets
1452 remote: adding changesets
1445 remote: adding manifests
1453 remote: adding manifests
1446 remote: adding file changes
1454 remote: adding file changes
1447 remote: added 1 changesets with 1 changes to 1 files
1455 remote: added 1 changesets with 1 changes to 1 files
1448
1456
1449 $ release $TESTTMP/watchfile
1457 $ release $TESTTMP/watchfile
1450
1458
1451 Check the result of the push
1459 Check the result of the push
1452
1460
1453 $ cat ./push-log
1461 $ cat ./push-log
1454 pushing to ssh://user@dummy/server
1462 pushing to ssh://user@dummy/server
1455 searching for changes
1463 searching for changes
1456 wrote ready: $TESTTMP/readyfile
1464 wrote ready: $TESTTMP/readyfile
1457 waiting on: $TESTTMP/watchfile
1465 waiting on: $TESTTMP/watchfile
1458 abort: push failed:
1466 abort: push failed:
1459 'remote repository changed while pushing - please try again'
1467 'remote repository changed while pushing - please try again'
1460
1468
1461 $ hg -R server graph
1469 $ hg -R server graph
1462 o de7b9e2ba3f6 C-R (other)
1470 o de7b9e2ba3f6 C-R (other)
1463 |
1471 |
1464 o 1b58ee3f79e5 C-P (default)
1472 o 1b58ee3f79e5 C-P (default)
1465 |
1473 |
1466 o d0a85b2252a9 C-O (other)
1474 o d0a85b2252a9 C-O (other)
1467 |
1475 |
1468 | o b0ee3d6f51bc C-Q (default)
1476 | o b0ee3d6f51bc C-Q (default)
1469 |/
1477 |/
1470 o 55a6f1c01b48 C-Z (other)
1478 o 55a6f1c01b48 C-Z (other)
1471 |
1479 |
1472 o 866a66e18630 C-N (default)
1480 o 866a66e18630 C-N (default)
1473 |\
1481 |\
1474 +---o 6fd3090135df C-M (default)
1482 +---o 6fd3090135df C-M (default)
1475 | |
1483 | |
1476 | o cac2cead0ff0 C-L (default)
1484 | o cac2cead0ff0 C-L (default)
1477 | |
1485 | |
1478 o | be705100c623 C-K (default)
1486 o | be705100c623 C-K (default)
1479 |\|
1487 |\|
1480 o | d603e2c0cdd7 C-E (default)
1488 o | d603e2c0cdd7 C-E (default)
1481 | |
1489 | |
1482 | o 59e76faf78bd C-D (default)
1490 | o 59e76faf78bd C-D (default)
1483 | |
1491 | |
1484 | | o 89420bf00fae C-J (default)
1492 | | o 89420bf00fae C-J (default)
1485 | | |
1493 | | |
1486 | | | o b35ed749f288 C-I (my-second-test-branch)
1494 | | | o b35ed749f288 C-I (my-second-test-branch)
1487 | | |/
1495 | | |/
1488 | | o 75d69cba5402 C-G (default)
1496 | | o 75d69cba5402 C-G (default)
1489 | | |
1497 | | |
1490 | | | o 833be552cfe6 C-H (my-first-test-branch)
1498 | | | o 833be552cfe6 C-H (my-first-test-branch)
1491 | | |/
1499 | | |/
1492 | | o d9e379a8c432 C-F (default)
1500 | | o d9e379a8c432 C-F (default)
1493 | | |
1501 | | |
1494 +---o 51c544a58128 C-C (default)
1502 +---o 51c544a58128 C-C (default)
1495 | |
1503 | |
1496 | o a9149a1428e2 C-B (default)
1504 | o a9149a1428e2 C-B (default)
1497 | |
1505 | |
1498 o | 98217d5a1659 C-A (default)
1506 o | 98217d5a1659 C-A (default)
1499 |/
1507 |/
1500 o 842e2fac6304 C-ROOT (default)
1508 o 842e2fac6304 C-ROOT (default)
1501
1509
1502
1510
1503 raced commit push a new head obsoleting the one touched by the racing push
1511 raced commit push a new head obsoleting the one touched by the racing push
1504 --------------------------------------------------------------------------
1512 --------------------------------------------------------------------------
1505
1513
1506 # b (racing)
1514 # b (racing)
1507 # |
1515 # |
1508 # ΓΈβ‡ β—” a (raced)
1516 # ΓΈβ‡ β—” a (raced)
1509 # |/
1517 # |/
1510 # *
1518 # *
1511
1519
1512 (resync-all)
1520 (resync-all)
1513
1521
1514 $ hg -R ./server pull ./client-racy
1522 $ hg -R ./server pull ./client-racy
1515 pulling from ./client-racy
1523 pulling from ./client-racy
1516 searching for changes
1524 searching for changes
1517 adding changesets
1525 adding changesets
1518 adding manifests
1526 adding manifests
1519 adding file changes
1527 adding file changes
1520 added 2 changesets with 2 changes to 1 files (+1 heads)
1528 added 2 changesets with 2 changes to 1 files (+1 heads)
1521 new changesets 2efd43f7b5ba:3d57ed3c1091 (2 drafts)
1529 new changesets 2efd43f7b5ba:3d57ed3c1091 (2 drafts)
1522 (run 'hg heads .' to see heads, 'hg merge' to merge)
1530 (run 'hg heads .' to see heads, 'hg merge' to merge)
1523 $ hg -R ./client-other pull
1531 $ hg -R ./client-other pull
1524 pulling from ssh://user@dummy/server
1532 pulling from ssh://user@dummy/server
1525 searching for changes
1533 searching for changes
1526 adding changesets
1534 adding changesets
1527 adding manifests
1535 adding manifests
1528 adding file changes
1536 adding file changes
1529 added 2 changesets with 2 changes to 1 files (+1 heads)
1537 added 2 changesets with 2 changes to 1 files (+1 heads)
1530 new changesets 2efd43f7b5ba:3d57ed3c1091 (2 drafts)
1538 new changesets 2efd43f7b5ba:3d57ed3c1091 (2 drafts)
1531 (run 'hg heads' to see heads, 'hg merge' to merge)
1539 (run 'hg heads' to see heads, 'hg merge' to merge)
1532 $ hg -R ./client-racy pull
1540 $ hg -R ./client-racy pull
1533 pulling from ssh://user@dummy/server
1541 pulling from ssh://user@dummy/server
1534 searching for changes
1542 searching for changes
1535 adding changesets
1543 adding changesets
1536 adding manifests
1544 adding manifests
1537 adding file changes
1545 adding file changes
1538 added 1 changesets with 1 changes to 1 files (+1 heads)
1546 added 1 changesets with 1 changes to 1 files (+1 heads)
1539 new changesets de7b9e2ba3f6 (1 drafts)
1547 new changesets de7b9e2ba3f6 (1 drafts)
1540 (run 'hg heads' to see heads, 'hg merge' to merge)
1548 (run 'hg heads' to see heads, 'hg merge' to merge)
1541
1549
1542 $ hg -R server graph
1550 $ hg -R server graph
1543 o 3d57ed3c1091 C-T (other)
1551 o 3d57ed3c1091 C-T (other)
1544 |
1552 |
1545 o 2efd43f7b5ba C-S (default)
1553 o 2efd43f7b5ba C-S (default)
1546 |
1554 |
1547 | o de7b9e2ba3f6 C-R (other)
1555 | o de7b9e2ba3f6 C-R (other)
1548 |/
1556 |/
1549 o 1b58ee3f79e5 C-P (default)
1557 o 1b58ee3f79e5 C-P (default)
1550 |
1558 |
1551 o d0a85b2252a9 C-O (other)
1559 o d0a85b2252a9 C-O (other)
1552 |
1560 |
1553 | o b0ee3d6f51bc C-Q (default)
1561 | o b0ee3d6f51bc C-Q (default)
1554 |/
1562 |/
1555 o 55a6f1c01b48 C-Z (other)
1563 o 55a6f1c01b48 C-Z (other)
1556 |
1564 |
1557 o 866a66e18630 C-N (default)
1565 o 866a66e18630 C-N (default)
1558 |\
1566 |\
1559 +---o 6fd3090135df C-M (default)
1567 +---o 6fd3090135df C-M (default)
1560 | |
1568 | |
1561 | o cac2cead0ff0 C-L (default)
1569 | o cac2cead0ff0 C-L (default)
1562 | |
1570 | |
1563 o | be705100c623 C-K (default)
1571 o | be705100c623 C-K (default)
1564 |\|
1572 |\|
1565 o | d603e2c0cdd7 C-E (default)
1573 o | d603e2c0cdd7 C-E (default)
1566 | |
1574 | |
1567 | o 59e76faf78bd C-D (default)
1575 | o 59e76faf78bd C-D (default)
1568 | |
1576 | |
1569 | | o 89420bf00fae C-J (default)
1577 | | o 89420bf00fae C-J (default)
1570 | | |
1578 | | |
1571 | | | o b35ed749f288 C-I (my-second-test-branch)
1579 | | | o b35ed749f288 C-I (my-second-test-branch)
1572 | | |/
1580 | | |/
1573 | | o 75d69cba5402 C-G (default)
1581 | | o 75d69cba5402 C-G (default)
1574 | | |
1582 | | |
1575 | | | o 833be552cfe6 C-H (my-first-test-branch)
1583 | | | o 833be552cfe6 C-H (my-first-test-branch)
1576 | | |/
1584 | | |/
1577 | | o d9e379a8c432 C-F (default)
1585 | | o d9e379a8c432 C-F (default)
1578 | | |
1586 | | |
1579 +---o 51c544a58128 C-C (default)
1587 +---o 51c544a58128 C-C (default)
1580 | |
1588 | |
1581 | o a9149a1428e2 C-B (default)
1589 | o a9149a1428e2 C-B (default)
1582 | |
1590 | |
1583 o | 98217d5a1659 C-A (default)
1591 o | 98217d5a1659 C-A (default)
1584 |/
1592 |/
1585 o 842e2fac6304 C-ROOT (default)
1593 o 842e2fac6304 C-ROOT (default)
1586
1594
1587
1595
1588 Creating changesets and markers
1596 Creating changesets and markers
1589
1597
1590 (continue existing head)
1598 (continue existing head)
1591
1599
1592 $ hg -R client-other/ up 'desc("C-Q")'
1600 $ hg -R client-other/ up 'desc("C-Q")'
1593 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1601 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1594 $ echo aaa >> client-other/a
1602 $ echo aaa >> client-other/a
1595 $ hg -R client-other/ commit -m "C-U"
1603 $ hg -R client-other/ commit -m "C-U"
1596
1604
1597 (new topo branch obsoleting that same head)
1605 (new topo branch obsoleting that same head)
1598
1606
1599 $ hg -R client-racy/ up 'desc("C-Z")'
1607 $ hg -R client-racy/ up 'desc("C-Z")'
1600 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1608 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1601 $ echo bbb >> client-racy/a
1609 $ echo bbb >> client-racy/a
1602 $ hg -R client-racy/ branch --force default
1610 $ hg -R client-racy/ branch --force default
1603 marked working directory as branch default
1611 marked working directory as branch default
1604 $ hg -R client-racy/ commit -m "C-V"
1612 $ hg -R client-racy/ commit -m "C-V"
1605 created new head
1613 created new head
1606 $ ID_Q=`hg -R client-racy log -T '{node}\n' -r 'desc("C-Q")'`
1614 $ ID_Q=`hg -R client-racy log -T '{node}\n' -r 'desc("C-Q")'`
1607 $ ID_V=`hg -R client-racy log -T '{node}\n' -r 'desc("C-V")'`
1615 $ ID_V=`hg -R client-racy log -T '{node}\n' -r 'desc("C-V")'`
1608 $ hg -R client-racy debugobsolete $ID_Q $ID_V
1616 $ hg -R client-racy debugobsolete $ID_Q $ID_V
1609 1 new obsolescence markers
1617 1 new obsolescence markers
1610 obsoleted 1 changesets
1618 obsoleted 1 changesets
1611
1619
1612 Pushing
1620 Pushing
1613
1621
1614 $ hg -R client-racy push -r 'tip' > ./push-log 2>&1 &
1622 $ hg -R client-racy push -r 'tip' > ./push-log 2>&1 &
1615
1623
1616 $ waiton $TESTTMP/readyfile
1624 $ waiton $TESTTMP/readyfile
1617
1625
1618 $ hg -R client-other push -fr 'tip' --new-branch
1626 $ hg -R client-other push -fr 'tip' --new-branch
1619 pushing to ssh://user@dummy/server
1627 pushing to ssh://user@dummy/server
1620 searching for changes
1628 searching for changes
1621 remote: adding changesets
1629 remote: adding changesets
1622 remote: adding manifests
1630 remote: adding manifests
1623 remote: adding file changes
1631 remote: adding file changes
1624 remote: added 1 changesets with 0 changes to 0 files
1632 remote: added 1 changesets with 0 changes to 0 files
1625
1633
1626 $ release $TESTTMP/watchfile
1634 $ release $TESTTMP/watchfile
1627
1635
1628 Check the result of the push
1636 Check the result of the push
1629
1637
1630 $ cat ./push-log
1638 $ cat ./push-log
1631 pushing to ssh://user@dummy/server
1639 pushing to ssh://user@dummy/server
1632 searching for changes
1640 searching for changes
1633 wrote ready: $TESTTMP/readyfile
1641 wrote ready: $TESTTMP/readyfile
1634 waiting on: $TESTTMP/watchfile
1642 waiting on: $TESTTMP/watchfile
1635 abort: push failed:
1643 abort: push failed:
1636 'remote repository changed while pushing - please try again'
1644 'remote repository changed while pushing - please try again'
1637
1645
1638 $ hg -R server debugobsolete
1646 $ hg -R server debugobsolete
1639 $ hg -R server graph
1647 $ hg -R server graph
1640 o a98a47d8b85b C-U (default)
1648 o a98a47d8b85b C-U (default)
1641 |
1649 |
1642 o b0ee3d6f51bc C-Q (default)
1650 o b0ee3d6f51bc C-Q (default)
1643 |
1651 |
1644 | o 3d57ed3c1091 C-T (other)
1652 | o 3d57ed3c1091 C-T (other)
1645 | |
1653 | |
1646 | o 2efd43f7b5ba C-S (default)
1654 | o 2efd43f7b5ba C-S (default)
1647 | |
1655 | |
1648 | | o de7b9e2ba3f6 C-R (other)
1656 | | o de7b9e2ba3f6 C-R (other)
1649 | |/
1657 | |/
1650 | o 1b58ee3f79e5 C-P (default)
1658 | o 1b58ee3f79e5 C-P (default)
1651 | |
1659 | |
1652 | o d0a85b2252a9 C-O (other)
1660 | o d0a85b2252a9 C-O (other)
1653 |/
1661 |/
1654 o 55a6f1c01b48 C-Z (other)
1662 o 55a6f1c01b48 C-Z (other)
1655 |
1663 |
1656 o 866a66e18630 C-N (default)
1664 o 866a66e18630 C-N (default)
1657 |\
1665 |\
1658 +---o 6fd3090135df C-M (default)
1666 +---o 6fd3090135df C-M (default)
1659 | |
1667 | |
1660 | o cac2cead0ff0 C-L (default)
1668 | o cac2cead0ff0 C-L (default)
1661 | |
1669 | |
1662 o | be705100c623 C-K (default)
1670 o | be705100c623 C-K (default)
1663 |\|
1671 |\|
1664 o | d603e2c0cdd7 C-E (default)
1672 o | d603e2c0cdd7 C-E (default)
1665 | |
1673 | |
1666 | o 59e76faf78bd C-D (default)
1674 | o 59e76faf78bd C-D (default)
1667 | |
1675 | |
1668 | | o 89420bf00fae C-J (default)
1676 | | o 89420bf00fae C-J (default)
1669 | | |
1677 | | |
1670 | | | o b35ed749f288 C-I (my-second-test-branch)
1678 | | | o b35ed749f288 C-I (my-second-test-branch)
1671 | | |/
1679 | | |/
1672 | | o 75d69cba5402 C-G (default)
1680 | | o 75d69cba5402 C-G (default)
1673 | | |
1681 | | |
1674 | | | o 833be552cfe6 C-H (my-first-test-branch)
1682 | | | o 833be552cfe6 C-H (my-first-test-branch)
1675 | | |/
1683 | | |/
1676 | | o d9e379a8c432 C-F (default)
1684 | | o d9e379a8c432 C-F (default)
1677 | | |
1685 | | |
1678 +---o 51c544a58128 C-C (default)
1686 +---o 51c544a58128 C-C (default)
1679 | |
1687 | |
1680 | o a9149a1428e2 C-B (default)
1688 | o a9149a1428e2 C-B (default)
1681 | |
1689 | |
1682 o | 98217d5a1659 C-A (default)
1690 o | 98217d5a1659 C-A (default)
1683 |/
1691 |/
1684 o 842e2fac6304 C-ROOT (default)
1692 o 842e2fac6304 C-ROOT (default)
1685
1693
1686
1694
1687 racing commit push a new head obsoleting the one touched by the raced push
1695 racing commit push a new head obsoleting the one touched by the raced push
1688 --------------------------------------------------------------------------
1696 --------------------------------------------------------------------------
1689
1697
1690 (mirror test case of the previous one
1698 (mirror test case of the previous one
1691
1699
1692 # a (raced branch default)
1700 # a (raced branch default)
1693 # |
1701 # |
1694 # ΓΈβ‡ β—” b (racing)
1702 # ΓΈβ‡ β—” b (racing)
1695 # |/
1703 # |/
1696 # *
1704 # *
1697
1705
1698 (resync-all)
1706 (resync-all)
1699
1707
1700 $ hg -R ./server pull ./client-racy
1708 $ hg -R ./server pull ./client-racy
1701 pulling from ./client-racy
1709 pulling from ./client-racy
1702 searching for changes
1710 searching for changes
1703 adding changesets
1711 adding changesets
1704 adding manifests
1712 adding manifests
1705 adding file changes
1713 adding file changes
1706 added 1 changesets with 1 changes to 1 files (+1 heads)
1714 added 1 changesets with 1 changes to 1 files (+1 heads)
1707 1 new obsolescence markers
1715 1 new obsolescence markers
1708 obsoleted 1 changesets
1716 obsoleted 1 changesets
1709 1 new orphan changesets
1717 1 new orphan changesets
1710 new changesets 720c5163ecf6 (1 drafts)
1718 new changesets 720c5163ecf6 (1 drafts)
1711 (run 'hg heads .' to see heads, 'hg merge' to merge)
1719 (run 'hg heads .' to see heads, 'hg merge' to merge)
1712 $ hg -R ./client-other pull
1720 $ hg -R ./client-other pull
1713 pulling from ssh://user@dummy/server
1721 pulling from ssh://user@dummy/server
1714 searching for changes
1722 searching for changes
1715 adding changesets
1723 adding changesets
1716 adding manifests
1724 adding manifests
1717 adding file changes
1725 adding file changes
1718 added 1 changesets with 1 changes to 1 files (+1 heads)
1726 added 1 changesets with 1 changes to 1 files (+1 heads)
1719 1 new obsolescence markers
1727 1 new obsolescence markers
1720 obsoleted 1 changesets
1728 obsoleted 1 changesets
1721 1 new orphan changesets
1729 1 new orphan changesets
1722 new changesets 720c5163ecf6 (1 drafts)
1730 new changesets 720c5163ecf6 (1 drafts)
1723 (run 'hg heads .' to see heads, 'hg merge' to merge)
1731 (run 'hg heads .' to see heads, 'hg merge' to merge)
1724 $ hg -R ./client-racy pull
1732 $ hg -R ./client-racy pull
1725 pulling from ssh://user@dummy/server
1733 pulling from ssh://user@dummy/server
1726 searching for changes
1734 searching for changes
1727 adding changesets
1735 adding changesets
1728 adding manifests
1736 adding manifests
1729 adding file changes
1737 adding file changes
1730 added 1 changesets with 0 changes to 0 files
1738 added 1 changesets with 0 changes to 0 files
1731 1 new orphan changesets
1739 1 new orphan changesets
1732 new changesets a98a47d8b85b (1 drafts)
1740 new changesets a98a47d8b85b (1 drafts)
1733 (run 'hg update' to get a working copy)
1741 (run 'hg update' to get a working copy)
1734
1742
1735 $ hg -R server debugobsolete
1743 $ hg -R server debugobsolete
1736 b0ee3d6f51bc4c0ca6d4f2907708027a6c376233 720c5163ecf64dcc6216bee2d62bf3edb1882499 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1744 b0ee3d6f51bc4c0ca6d4f2907708027a6c376233 720c5163ecf64dcc6216bee2d62bf3edb1882499 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1737 $ hg -R server graph
1745 $ hg -R server graph
1738 o 720c5163ecf6 C-V (default)
1746 o 720c5163ecf6 C-V (default)
1739 |
1747 |
1740 | * a98a47d8b85b C-U (default)
1748 | * a98a47d8b85b C-U (default)
1741 | |
1749 | |
1742 | x b0ee3d6f51bc C-Q (default)
1750 | x b0ee3d6f51bc C-Q (default)
1743 |/
1751 |/
1744 | o 3d57ed3c1091 C-T (other)
1752 | o 3d57ed3c1091 C-T (other)
1745 | |
1753 | |
1746 | o 2efd43f7b5ba C-S (default)
1754 | o 2efd43f7b5ba C-S (default)
1747 | |
1755 | |
1748 | | o de7b9e2ba3f6 C-R (other)
1756 | | o de7b9e2ba3f6 C-R (other)
1749 | |/
1757 | |/
1750 | o 1b58ee3f79e5 C-P (default)
1758 | o 1b58ee3f79e5 C-P (default)
1751 | |
1759 | |
1752 | o d0a85b2252a9 C-O (other)
1760 | o d0a85b2252a9 C-O (other)
1753 |/
1761 |/
1754 o 55a6f1c01b48 C-Z (other)
1762 o 55a6f1c01b48 C-Z (other)
1755 |
1763 |
1756 o 866a66e18630 C-N (default)
1764 o 866a66e18630 C-N (default)
1757 |\
1765 |\
1758 +---o 6fd3090135df C-M (default)
1766 +---o 6fd3090135df C-M (default)
1759 | |
1767 | |
1760 | o cac2cead0ff0 C-L (default)
1768 | o cac2cead0ff0 C-L (default)
1761 | |
1769 | |
1762 o | be705100c623 C-K (default)
1770 o | be705100c623 C-K (default)
1763 |\|
1771 |\|
1764 o | d603e2c0cdd7 C-E (default)
1772 o | d603e2c0cdd7 C-E (default)
1765 | |
1773 | |
1766 | o 59e76faf78bd C-D (default)
1774 | o 59e76faf78bd C-D (default)
1767 | |
1775 | |
1768 | | o 89420bf00fae C-J (default)
1776 | | o 89420bf00fae C-J (default)
1769 | | |
1777 | | |
1770 | | | o b35ed749f288 C-I (my-second-test-branch)
1778 | | | o b35ed749f288 C-I (my-second-test-branch)
1771 | | |/
1779 | | |/
1772 | | o 75d69cba5402 C-G (default)
1780 | | o 75d69cba5402 C-G (default)
1773 | | |
1781 | | |
1774 | | | o 833be552cfe6 C-H (my-first-test-branch)
1782 | | | o 833be552cfe6 C-H (my-first-test-branch)
1775 | | |/
1783 | | |/
1776 | | o d9e379a8c432 C-F (default)
1784 | | o d9e379a8c432 C-F (default)
1777 | | |
1785 | | |
1778 +---o 51c544a58128 C-C (default)
1786 +---o 51c544a58128 C-C (default)
1779 | |
1787 | |
1780 | o a9149a1428e2 C-B (default)
1788 | o a9149a1428e2 C-B (default)
1781 | |
1789 | |
1782 o | 98217d5a1659 C-A (default)
1790 o | 98217d5a1659 C-A (default)
1783 |/
1791 |/
1784 o 842e2fac6304 C-ROOT (default)
1792 o 842e2fac6304 C-ROOT (default)
1785
1793
1786
1794
1787 Creating changesets and markers
1795 Creating changesets and markers
1788
1796
1789 (new topo branch obsoleting that same head)
1797 (new topo branch obsoleting that same head)
1790
1798
1791 $ hg -R client-other/ up 'desc("C-Q")'
1799 $ hg -R client-other/ up 'desc("C-Q")'
1792 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1800 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1793 $ echo bbb >> client-other/a
1801 $ echo bbb >> client-other/a
1794 $ hg -R client-other/ branch --force default
1802 $ hg -R client-other/ branch --force default
1795 marked working directory as branch default
1803 marked working directory as branch default
1796 $ hg -R client-other/ commit -m "C-W"
1804 $ hg -R client-other/ commit -m "C-W"
1797 1 new orphan changesets
1805 1 new orphan changesets
1798 created new head
1806 created new head
1799 $ ID_V=`hg -R client-other log -T '{node}\n' -r 'desc("C-V")'`
1807 $ ID_V=`hg -R client-other log -T '{node}\n' -r 'desc("C-V")'`
1800 $ ID_W=`hg -R client-other log -T '{node}\n' -r 'desc("C-W")'`
1808 $ ID_W=`hg -R client-other log -T '{node}\n' -r 'desc("C-W")'`
1801 $ hg -R client-other debugobsolete $ID_V $ID_W
1809 $ hg -R client-other debugobsolete $ID_V $ID_W
1802 1 new obsolescence markers
1810 1 new obsolescence markers
1803 obsoleted 1 changesets
1811 obsoleted 1 changesets
1804
1812
1805 (continue the same head)
1813 (continue the same head)
1806
1814
1807 $ echo aaa >> client-racy/a
1815 $ echo aaa >> client-racy/a
1808 $ hg -R client-racy/ commit -m "C-X"
1816 $ hg -R client-racy/ commit -m "C-X"
1809
1817
1810 Pushing
1818 Pushing
1811
1819
1812 $ hg -R client-racy push -r 'tip' > ./push-log 2>&1 &
1820 $ hg -R client-racy push -r 'tip' > ./push-log 2>&1 &
1813
1821
1814 $ waiton $TESTTMP/readyfile
1822 $ waiton $TESTTMP/readyfile
1815
1823
1816 $ hg -R client-other push -fr 'tip' --new-branch
1824 $ hg -R client-other push -fr 'tip' --new-branch
1817 pushing to ssh://user@dummy/server
1825 pushing to ssh://user@dummy/server
1818 searching for changes
1826 searching for changes
1819 remote: adding changesets
1827 remote: adding changesets
1820 remote: adding manifests
1828 remote: adding manifests
1821 remote: adding file changes
1829 remote: adding file changes
1822 remote: added 1 changesets with 0 changes to 1 files (+1 heads)
1830 remote: added 1 changesets with 0 changes to 1 files (+1 heads)
1823 remote: 1 new obsolescence markers
1831 remote: 1 new obsolescence markers
1824 remote: obsoleted 1 changesets
1832 remote: obsoleted 1 changesets
1825 remote: 1 new orphan changesets
1833 remote: 1 new orphan changesets
1826
1834
1827 $ release $TESTTMP/watchfile
1835 $ release $TESTTMP/watchfile
1828
1836
1829 Check the result of the push
1837 Check the result of the push
1830
1838
1831 $ cat ./push-log
1839 $ cat ./push-log
1832 pushing to ssh://user@dummy/server
1840 pushing to ssh://user@dummy/server
1833 searching for changes
1841 searching for changes
1834 wrote ready: $TESTTMP/readyfile
1842 wrote ready: $TESTTMP/readyfile
1835 waiting on: $TESTTMP/watchfile
1843 waiting on: $TESTTMP/watchfile
1836 abort: push failed:
1844 abort: push failed:
1837 'remote repository changed while pushing - please try again'
1845 'remote repository changed while pushing - please try again'
1838
1846
1839 $ hg -R server debugobsolete
1847 $ hg -R server debugobsolete
1840 b0ee3d6f51bc4c0ca6d4f2907708027a6c376233 720c5163ecf64dcc6216bee2d62bf3edb1882499 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1848 b0ee3d6f51bc4c0ca6d4f2907708027a6c376233 720c5163ecf64dcc6216bee2d62bf3edb1882499 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1841 720c5163ecf64dcc6216bee2d62bf3edb1882499 39bc0598afe90ab18da460bafecc0fa953b77596 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1849 720c5163ecf64dcc6216bee2d62bf3edb1882499 39bc0598afe90ab18da460bafecc0fa953b77596 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1842 $ hg -R server graph --hidden
1850 $ hg -R server graph --hidden
1843 * 39bc0598afe9 C-W (default)
1851 * 39bc0598afe9 C-W (default)
1844 |
1852 |
1845 | * a98a47d8b85b C-U (default)
1853 | * a98a47d8b85b C-U (default)
1846 |/
1854 |/
1847 x b0ee3d6f51bc C-Q (default)
1855 x b0ee3d6f51bc C-Q (default)
1848 |
1856 |
1849 | o 3d57ed3c1091 C-T (other)
1857 | o 3d57ed3c1091 C-T (other)
1850 | |
1858 | |
1851 | o 2efd43f7b5ba C-S (default)
1859 | o 2efd43f7b5ba C-S (default)
1852 | |
1860 | |
1853 | | o de7b9e2ba3f6 C-R (other)
1861 | | o de7b9e2ba3f6 C-R (other)
1854 | |/
1862 | |/
1855 | o 1b58ee3f79e5 C-P (default)
1863 | o 1b58ee3f79e5 C-P (default)
1856 | |
1864 | |
1857 | o d0a85b2252a9 C-O (other)
1865 | o d0a85b2252a9 C-O (other)
1858 |/
1866 |/
1859 | x 720c5163ecf6 C-V (default)
1867 | x 720c5163ecf6 C-V (default)
1860 |/
1868 |/
1861 o 55a6f1c01b48 C-Z (other)
1869 o 55a6f1c01b48 C-Z (other)
1862 |
1870 |
1863 o 866a66e18630 C-N (default)
1871 o 866a66e18630 C-N (default)
1864 |\
1872 |\
1865 +---o 6fd3090135df C-M (default)
1873 +---o 6fd3090135df C-M (default)
1866 | |
1874 | |
1867 | o cac2cead0ff0 C-L (default)
1875 | o cac2cead0ff0 C-L (default)
1868 | |
1876 | |
1869 o | be705100c623 C-K (default)
1877 o | be705100c623 C-K (default)
1870 |\|
1878 |\|
1871 o | d603e2c0cdd7 C-E (default)
1879 o | d603e2c0cdd7 C-E (default)
1872 | |
1880 | |
1873 | o 59e76faf78bd C-D (default)
1881 | o 59e76faf78bd C-D (default)
1874 | |
1882 | |
1875 | | o 89420bf00fae C-J (default)
1883 | | o 89420bf00fae C-J (default)
1876 | | |
1884 | | |
1877 | | | o b35ed749f288 C-I (my-second-test-branch)
1885 | | | o b35ed749f288 C-I (my-second-test-branch)
1878 | | |/
1886 | | |/
1879 | | o 75d69cba5402 C-G (default)
1887 | | o 75d69cba5402 C-G (default)
1880 | | |
1888 | | |
1881 | | | o 833be552cfe6 C-H (my-first-test-branch)
1889 | | | o 833be552cfe6 C-H (my-first-test-branch)
1882 | | |/
1890 | | |/
1883 | | o d9e379a8c432 C-F (default)
1891 | | o d9e379a8c432 C-F (default)
1884 | | |
1892 | | |
1885 +---o 51c544a58128 C-C (default)
1893 +---o 51c544a58128 C-C (default)
1886 | |
1894 | |
1887 | o a9149a1428e2 C-B (default)
1895 | o a9149a1428e2 C-B (default)
1888 | |
1896 | |
1889 o | 98217d5a1659 C-A (default)
1897 o | 98217d5a1659 C-A (default)
1890 |/
1898 |/
1891 o 842e2fac6304 C-ROOT (default)
1899 o 842e2fac6304 C-ROOT (default)
1892
1900
General Comments 0
You need to be logged in to leave comments. Login now