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