Show More
@@ -1,760 +1,897 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 | > [alias] |
|
97 | > [alias] | |
98 | > graph = log -G --rev 'sort(all(), "topo")' |
|
98 | > graph = log -G --rev 'sort(all(), "topo")' | |
99 | > EOF |
|
99 | > EOF | |
100 |
|
100 | |||
101 | Setup |
|
101 | Setup | |
102 | ----- |
|
102 | ----- | |
103 |
|
103 | |||
104 | create a repo with one root |
|
104 | create a repo with one root | |
105 |
|
105 | |||
106 | $ hg init server |
|
106 | $ hg init server | |
107 | $ cd server |
|
107 | $ cd server | |
108 | $ echo root > root |
|
108 | $ echo root > root | |
109 | $ hg ci -Am "C-ROOT" |
|
109 | $ hg ci -Am "C-ROOT" | |
110 | adding root |
|
110 | adding root | |
111 | $ cd .. |
|
111 | $ cd .. | |
112 |
|
112 | |||
113 | clone it in two clients |
|
113 | clone it in two clients | |
114 |
|
114 | |||
115 | $ hg clone ssh://user@dummy/server client-racy |
|
115 | $ hg clone ssh://user@dummy/server client-racy | |
116 | requesting all changes |
|
116 | requesting all changes | |
117 | adding changesets |
|
117 | adding changesets | |
118 | adding manifests |
|
118 | adding manifests | |
119 | adding file changes |
|
119 | adding file changes | |
120 | added 1 changesets with 1 changes to 1 files |
|
120 | added 1 changesets with 1 changes to 1 files | |
121 | updating to branch default |
|
121 | updating to branch default | |
122 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
122 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
123 | $ hg clone ssh://user@dummy/server client-other |
|
123 | $ hg clone ssh://user@dummy/server client-other | |
124 | requesting all changes |
|
124 | requesting all changes | |
125 | adding changesets |
|
125 | adding changesets | |
126 | adding manifests |
|
126 | adding manifests | |
127 | adding file changes |
|
127 | adding file changes | |
128 | added 1 changesets with 1 changes to 1 files |
|
128 | added 1 changesets with 1 changes to 1 files | |
129 | updating to branch default |
|
129 | updating to branch default | |
130 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
130 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
131 |
|
131 | |||
132 | setup one to allow race on push |
|
132 | setup one to allow race on push | |
133 |
|
133 | |||
134 | $ cat >> client-racy/.hg/hgrc << EOF |
|
134 | $ cat >> client-racy/.hg/hgrc << EOF | |
135 | > [extensions] |
|
135 | > [extensions] | |
136 | > delaypush = $TESTTMP/delaypush.py |
|
136 | > delaypush = $TESTTMP/delaypush.py | |
137 | > [delaypush] |
|
137 | > [delaypush] | |
138 | > ready-path = $TESTTMP/readyfile |
|
138 | > ready-path = $TESTTMP/readyfile | |
139 | > release-path = $TESTTMP/watchfile |
|
139 | > release-path = $TESTTMP/watchfile | |
140 | > EOF |
|
140 | > EOF | |
141 |
|
141 | |||
142 | Simple race, both try to push to the server at the same time |
|
142 | Simple race, both try to push to the server at the same time | |
143 | ------------------------------------------------------------ |
|
143 | ------------------------------------------------------------ | |
144 |
|
144 | |||
145 | Both try to replace the same head |
|
145 | Both try to replace the same head | |
146 |
|
146 | |||
147 | # a |
|
147 | # a | |
148 | # | b |
|
148 | # | b | |
149 | # |/ |
|
149 | # |/ | |
150 | # * |
|
150 | # * | |
151 |
|
151 | |||
152 | Creating changesets |
|
152 | Creating changesets | |
153 |
|
153 | |||
154 | $ echo b > client-other/a |
|
154 | $ echo b > client-other/a | |
155 | $ hg -R client-other/ add client-other/a |
|
155 | $ hg -R client-other/ add client-other/a | |
156 | $ hg -R client-other/ commit -m "C-A" |
|
156 | $ hg -R client-other/ commit -m "C-A" | |
157 | $ echo b > client-racy/b |
|
157 | $ echo b > client-racy/b | |
158 | $ hg -R client-racy/ add client-racy/b |
|
158 | $ hg -R client-racy/ add client-racy/b | |
159 | $ hg -R client-racy/ commit -m "C-B" |
|
159 | $ hg -R client-racy/ commit -m "C-B" | |
160 |
|
160 | |||
161 | Pushing |
|
161 | Pushing | |
162 |
|
162 | |||
163 | $ hg -R client-racy push -r 'tip' > ./push-log 2>&1 & |
|
163 | $ hg -R client-racy push -r 'tip' > ./push-log 2>&1 & | |
164 |
|
164 | |||
165 | $ waiton $TESTTMP/readyfile |
|
165 | $ waiton $TESTTMP/readyfile | |
166 |
|
166 | |||
167 | $ hg -R client-other push -r 'tip' |
|
167 | $ hg -R client-other push -r 'tip' | |
168 | pushing to ssh://user@dummy/server |
|
168 | pushing to ssh://user@dummy/server | |
169 | searching for changes |
|
169 | searching for changes | |
170 | remote: adding changesets |
|
170 | remote: adding changesets | |
171 | remote: adding manifests |
|
171 | remote: adding manifests | |
172 | remote: adding file changes |
|
172 | remote: adding file changes | |
173 | remote: added 1 changesets with 1 changes to 1 files |
|
173 | remote: added 1 changesets with 1 changes to 1 files | |
174 |
|
174 | |||
175 | $ release $TESTTMP/watchfile |
|
175 | $ release $TESTTMP/watchfile | |
176 |
|
176 | |||
177 | Check the result of the push |
|
177 | Check the result of the push | |
178 |
|
178 | |||
179 | $ cat ./push-log |
|
179 | $ cat ./push-log | |
180 | pushing to ssh://user@dummy/server |
|
180 | pushing to ssh://user@dummy/server | |
181 | searching for changes |
|
181 | searching for changes | |
182 | wrote ready: $TESTTMP/readyfile |
|
182 | wrote ready: $TESTTMP/readyfile | |
183 | waiting on: $TESTTMP/watchfile |
|
183 | waiting on: $TESTTMP/watchfile | |
184 | abort: push failed: |
|
184 | abort: push failed: | |
185 | 'repository changed while pushing - please try again' |
|
185 | 'repository changed while pushing - please try again' | |
186 |
|
186 | |||
187 | $ hg -R server graph |
|
187 | $ hg -R server graph | |
188 | o 98217d5a1659 C-A (default) |
|
188 | o 98217d5a1659 C-A (default) | |
189 | | |
|
189 | | | |
190 | @ 842e2fac6304 C-ROOT (default) |
|
190 | @ 842e2fac6304 C-ROOT (default) | |
191 |
|
191 | |||
192 |
|
192 | |||
193 | Pushing on two different heads |
|
193 | Pushing on two different heads | |
194 | ------------------------------ |
|
194 | ------------------------------ | |
195 |
|
195 | |||
196 | Both try to replace a different head |
|
196 | Both try to replace a different head | |
197 |
|
197 | |||
198 | # a b |
|
198 | # a b | |
199 | # | | |
|
199 | # | | | |
200 | # * * |
|
200 | # * * | |
201 | # |/ |
|
201 | # |/ | |
202 | # * |
|
202 | # * | |
203 |
|
203 | |||
204 | (resync-all) |
|
204 | (resync-all) | |
205 |
|
205 | |||
206 | $ hg -R ./server pull ./client-racy |
|
206 | $ hg -R ./server pull ./client-racy | |
207 | pulling from ./client-racy |
|
207 | pulling from ./client-racy | |
208 | searching for changes |
|
208 | searching for changes | |
209 | adding changesets |
|
209 | adding changesets | |
210 | adding manifests |
|
210 | adding manifests | |
211 | adding file changes |
|
211 | adding file changes | |
212 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
212 | added 1 changesets with 1 changes to 1 files (+1 heads) | |
213 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
213 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
214 | $ hg -R ./client-other pull |
|
214 | $ hg -R ./client-other pull | |
215 | pulling from ssh://user@dummy/server |
|
215 | pulling from ssh://user@dummy/server | |
216 | searching for changes |
|
216 | searching for changes | |
217 | adding changesets |
|
217 | adding changesets | |
218 | adding manifests |
|
218 | adding manifests | |
219 | adding file changes |
|
219 | adding file changes | |
220 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
220 | added 1 changesets with 1 changes to 1 files (+1 heads) | |
221 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
221 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
222 | $ hg -R ./client-racy pull |
|
222 | $ hg -R ./client-racy pull | |
223 | pulling from ssh://user@dummy/server |
|
223 | pulling from ssh://user@dummy/server | |
224 | searching for changes |
|
224 | searching for changes | |
225 | adding changesets |
|
225 | adding changesets | |
226 | adding manifests |
|
226 | adding manifests | |
227 | adding file changes |
|
227 | adding file changes | |
228 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
228 | added 1 changesets with 1 changes to 1 files (+1 heads) | |
229 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
229 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
230 |
|
230 | |||
231 | $ hg -R server graph |
|
231 | $ hg -R server graph | |
232 | o a9149a1428e2 C-B (default) |
|
232 | o a9149a1428e2 C-B (default) | |
233 | | |
|
233 | | | |
234 | | o 98217d5a1659 C-A (default) |
|
234 | | o 98217d5a1659 C-A (default) | |
235 | |/ |
|
235 | |/ | |
236 | @ 842e2fac6304 C-ROOT (default) |
|
236 | @ 842e2fac6304 C-ROOT (default) | |
237 |
|
237 | |||
238 |
|
238 | |||
239 | Creating changesets |
|
239 | Creating changesets | |
240 |
|
240 | |||
241 | $ echo aa >> client-other/a |
|
241 | $ echo aa >> client-other/a | |
242 | $ hg -R client-other/ commit -m "C-C" |
|
242 | $ hg -R client-other/ commit -m "C-C" | |
243 | $ echo bb >> client-racy/b |
|
243 | $ echo bb >> client-racy/b | |
244 | $ hg -R client-racy/ commit -m "C-D" |
|
244 | $ hg -R client-racy/ commit -m "C-D" | |
245 |
|
245 | |||
246 | Pushing |
|
246 | Pushing | |
247 |
|
247 | |||
248 | $ hg -R client-racy push -r 'tip' > ./push-log 2>&1 & |
|
248 | $ hg -R client-racy push -r 'tip' > ./push-log 2>&1 & | |
249 |
|
249 | |||
250 | $ waiton $TESTTMP/readyfile |
|
250 | $ waiton $TESTTMP/readyfile | |
251 |
|
251 | |||
252 | $ hg -R client-other push -r 'tip' |
|
252 | $ hg -R client-other push -r 'tip' | |
253 | pushing to ssh://user@dummy/server |
|
253 | pushing to ssh://user@dummy/server | |
254 | searching for changes |
|
254 | searching for changes | |
255 | remote: adding changesets |
|
255 | remote: adding changesets | |
256 | remote: adding manifests |
|
256 | remote: adding manifests | |
257 | remote: adding file changes |
|
257 | remote: adding file changes | |
258 | remote: added 1 changesets with 1 changes to 1 files |
|
258 | remote: added 1 changesets with 1 changes to 1 files | |
259 |
|
259 | |||
260 | $ release $TESTTMP/watchfile |
|
260 | $ release $TESTTMP/watchfile | |
261 |
|
261 | |||
262 | Check the result of the push |
|
262 | Check the result of the push | |
263 |
|
263 | |||
264 | $ cat ./push-log |
|
264 | $ cat ./push-log | |
265 | pushing to ssh://user@dummy/server |
|
265 | pushing to ssh://user@dummy/server | |
266 | searching for changes |
|
266 | searching for changes | |
267 | wrote ready: $TESTTMP/readyfile |
|
267 | wrote ready: $TESTTMP/readyfile | |
268 | waiting on: $TESTTMP/watchfile |
|
268 | waiting on: $TESTTMP/watchfile | |
269 | abort: push failed: |
|
269 | abort: push failed: | |
270 | 'repository changed while pushing - please try again' |
|
270 | 'repository changed while pushing - please try again' | |
271 |
|
271 | |||
272 | $ hg -R server graph |
|
272 | $ hg -R server graph | |
273 | o 51c544a58128 C-C (default) |
|
273 | o 51c544a58128 C-C (default) | |
274 | | |
|
274 | | | |
275 | o 98217d5a1659 C-A (default) |
|
275 | o 98217d5a1659 C-A (default) | |
276 | | |
|
276 | | | |
277 | | o a9149a1428e2 C-B (default) |
|
277 | | o a9149a1428e2 C-B (default) | |
278 | |/ |
|
278 | |/ | |
279 | @ 842e2fac6304 C-ROOT (default) |
|
279 | @ 842e2fac6304 C-ROOT (default) | |
280 |
|
280 | |||
281 | Pushing while someone creates a new head |
|
281 | Pushing while someone creates a new head | |
282 | ----------------------------------------- |
|
282 | ----------------------------------------- | |
283 |
|
283 | |||
284 | Pushing a new changeset while someone creates a new branch. |
|
284 | Pushing a new changeset while someone creates a new branch. | |
285 |
|
285 | |||
286 | # a (raced) |
|
286 | # a (raced) | |
287 | # | |
|
287 | # | | |
288 | # * b |
|
288 | # * b | |
289 | # |/ |
|
289 | # |/ | |
290 | # * |
|
290 | # * | |
291 |
|
291 | |||
292 | (resync-all) |
|
292 | (resync-all) | |
293 |
|
293 | |||
294 | $ hg -R ./server pull ./client-racy |
|
294 | $ hg -R ./server pull ./client-racy | |
295 | pulling from ./client-racy |
|
295 | pulling from ./client-racy | |
296 | searching for changes |
|
296 | searching for changes | |
297 | adding changesets |
|
297 | adding changesets | |
298 | adding manifests |
|
298 | adding manifests | |
299 | adding file changes |
|
299 | adding file changes | |
300 | added 1 changesets with 1 changes to 1 files |
|
300 | added 1 changesets with 1 changes to 1 files | |
301 | (run 'hg update' to get a working copy) |
|
301 | (run 'hg update' to get a working copy) | |
302 | $ hg -R ./client-other pull |
|
302 | $ hg -R ./client-other pull | |
303 | pulling from ssh://user@dummy/server |
|
303 | pulling from ssh://user@dummy/server | |
304 | searching for changes |
|
304 | searching for changes | |
305 | adding changesets |
|
305 | adding changesets | |
306 | adding manifests |
|
306 | adding manifests | |
307 | adding file changes |
|
307 | adding file changes | |
308 | added 1 changesets with 1 changes to 1 files |
|
308 | added 1 changesets with 1 changes to 1 files | |
309 | (run 'hg update' to get a working copy) |
|
309 | (run 'hg update' to get a working copy) | |
310 | $ hg -R ./client-racy pull |
|
310 | $ hg -R ./client-racy pull | |
311 | pulling from ssh://user@dummy/server |
|
311 | pulling from ssh://user@dummy/server | |
312 | searching for changes |
|
312 | searching for changes | |
313 | adding changesets |
|
313 | adding changesets | |
314 | adding manifests |
|
314 | adding manifests | |
315 | adding file changes |
|
315 | adding file changes | |
316 | added 1 changesets with 1 changes to 1 files |
|
316 | added 1 changesets with 1 changes to 1 files | |
317 | (run 'hg update' to get a working copy) |
|
317 | (run 'hg update' to get a working copy) | |
318 |
|
318 | |||
319 | $ hg -R server graph |
|
319 | $ hg -R server graph | |
320 | o 59e76faf78bd C-D (default) |
|
320 | o 59e76faf78bd C-D (default) | |
321 | | |
|
321 | | | |
322 | o a9149a1428e2 C-B (default) |
|
322 | o a9149a1428e2 C-B (default) | |
323 | | |
|
323 | | | |
324 | | o 51c544a58128 C-C (default) |
|
324 | | o 51c544a58128 C-C (default) | |
325 | | | |
|
325 | | | | |
326 | | o 98217d5a1659 C-A (default) |
|
326 | | o 98217d5a1659 C-A (default) | |
327 | |/ |
|
327 | |/ | |
328 | @ 842e2fac6304 C-ROOT (default) |
|
328 | @ 842e2fac6304 C-ROOT (default) | |
329 |
|
329 | |||
330 |
|
330 | |||
331 | Creating changesets |
|
331 | Creating changesets | |
332 |
|
332 | |||
333 | (new head) |
|
333 | (new head) | |
334 |
|
334 | |||
335 | $ hg -R client-other/ up 'desc("C-A")' |
|
335 | $ hg -R client-other/ up 'desc("C-A")' | |
336 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
336 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
337 | $ echo aaa >> client-other/a |
|
337 | $ echo aaa >> client-other/a | |
338 | $ hg -R client-other/ commit -m "C-E" |
|
338 | $ hg -R client-other/ commit -m "C-E" | |
339 | created new head |
|
339 | created new head | |
340 |
|
340 | |||
341 | (children of existing head) |
|
341 | (children of existing head) | |
342 |
|
342 | |||
343 | $ hg -R client-racy/ up 'desc("C-C")' |
|
343 | $ hg -R client-racy/ up 'desc("C-C")' | |
344 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
344 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
345 | $ echo bbb >> client-racy/a |
|
345 | $ echo bbb >> client-racy/a | |
346 | $ hg -R client-racy/ commit -m "C-F" |
|
346 | $ hg -R client-racy/ commit -m "C-F" | |
347 |
|
347 | |||
348 | Pushing |
|
348 | Pushing | |
349 |
|
349 | |||
350 | $ hg -R client-racy push -r 'tip' > ./push-log 2>&1 & |
|
350 | $ hg -R client-racy push -r 'tip' > ./push-log 2>&1 & | |
351 |
|
351 | |||
352 | $ waiton $TESTTMP/readyfile |
|
352 | $ waiton $TESTTMP/readyfile | |
353 |
|
353 | |||
354 | $ hg -R client-other push -fr 'tip' |
|
354 | $ hg -R client-other push -fr 'tip' | |
355 | pushing to ssh://user@dummy/server |
|
355 | pushing to ssh://user@dummy/server | |
356 | searching for changes |
|
356 | searching for changes | |
357 | remote: adding changesets |
|
357 | remote: adding changesets | |
358 | remote: adding manifests |
|
358 | remote: adding manifests | |
359 | remote: adding file changes |
|
359 | remote: adding file changes | |
360 | remote: added 1 changesets with 1 changes to 1 files (+1 heads) |
|
360 | remote: added 1 changesets with 1 changes to 1 files (+1 heads) | |
361 |
|
361 | |||
362 | $ release $TESTTMP/watchfile |
|
362 | $ release $TESTTMP/watchfile | |
363 |
|
363 | |||
364 | Check the result of the push |
|
364 | Check the result of the push | |
365 |
|
365 | |||
366 | $ cat ./push-log |
|
366 | $ cat ./push-log | |
367 | pushing to ssh://user@dummy/server |
|
367 | pushing to ssh://user@dummy/server | |
368 | searching for changes |
|
368 | searching for changes | |
369 | wrote ready: $TESTTMP/readyfile |
|
369 | wrote ready: $TESTTMP/readyfile | |
370 | waiting on: $TESTTMP/watchfile |
|
370 | waiting on: $TESTTMP/watchfile | |
371 | abort: push failed: |
|
371 | abort: push failed: | |
372 | 'repository changed while pushing - please try again' |
|
372 | 'repository changed while pushing - please try again' | |
373 |
|
373 | |||
374 | $ hg -R server graph |
|
374 | $ hg -R server graph | |
375 | o d603e2c0cdd7 C-E (default) |
|
375 | o d603e2c0cdd7 C-E (default) | |
376 | | |
|
376 | | | |
377 | | o 51c544a58128 C-C (default) |
|
377 | | o 51c544a58128 C-C (default) | |
378 | |/ |
|
378 | |/ | |
379 | o 98217d5a1659 C-A (default) |
|
379 | o 98217d5a1659 C-A (default) | |
380 | | |
|
380 | | | |
381 | | o 59e76faf78bd C-D (default) |
|
381 | | o 59e76faf78bd C-D (default) | |
382 | | | |
|
382 | | | | |
383 | | o a9149a1428e2 C-B (default) |
|
383 | | o a9149a1428e2 C-B (default) | |
384 | |/ |
|
384 | |/ | |
385 | @ 842e2fac6304 C-ROOT (default) |
|
385 | @ 842e2fac6304 C-ROOT (default) | |
386 |
|
386 | |||
387 |
|
387 | |||
388 | Pushing touching different named branch (same topo): new branch raced |
|
388 | Pushing touching different named branch (same topo): new branch raced | |
389 | --------------------------------------------------------------------- |
|
389 | --------------------------------------------------------------------- | |
390 |
|
390 | |||
391 | Pushing two children on the same head, one is a different named branch |
|
391 | Pushing two children on the same head, one is a different named branch | |
392 |
|
392 | |||
393 | # a (raced, branch-a) |
|
393 | # a (raced, branch-a) | |
394 | # | |
|
394 | # | | |
395 | # | b (default branch) |
|
395 | # | b (default branch) | |
396 | # |/ |
|
396 | # |/ | |
397 | # * |
|
397 | # * | |
398 |
|
398 | |||
399 | (resync-all) |
|
399 | (resync-all) | |
400 |
|
400 | |||
401 | $ hg -R ./server pull ./client-racy |
|
401 | $ hg -R ./server pull ./client-racy | |
402 | pulling from ./client-racy |
|
402 | pulling from ./client-racy | |
403 | searching for changes |
|
403 | searching for changes | |
404 | adding changesets |
|
404 | adding changesets | |
405 | adding manifests |
|
405 | adding manifests | |
406 | adding file changes |
|
406 | adding file changes | |
407 | added 1 changesets with 1 changes to 1 files |
|
407 | added 1 changesets with 1 changes to 1 files | |
408 | (run 'hg update' to get a working copy) |
|
408 | (run 'hg update' to get a working copy) | |
409 | $ hg -R ./client-other pull |
|
409 | $ hg -R ./client-other pull | |
410 | pulling from ssh://user@dummy/server |
|
410 | pulling from ssh://user@dummy/server | |
411 | searching for changes |
|
411 | searching for changes | |
412 | adding changesets |
|
412 | adding changesets | |
413 | adding manifests |
|
413 | adding manifests | |
414 | adding file changes |
|
414 | adding file changes | |
415 | added 1 changesets with 1 changes to 1 files |
|
415 | added 1 changesets with 1 changes to 1 files | |
416 | (run 'hg update' to get a working copy) |
|
416 | (run 'hg update' to get a working copy) | |
417 | $ hg -R ./client-racy pull |
|
417 | $ hg -R ./client-racy pull | |
418 | pulling from ssh://user@dummy/server |
|
418 | pulling from ssh://user@dummy/server | |
419 | searching for changes |
|
419 | searching for changes | |
420 | adding changesets |
|
420 | adding changesets | |
421 | adding manifests |
|
421 | adding manifests | |
422 | adding file changes |
|
422 | adding file changes | |
423 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
423 | added 1 changesets with 1 changes to 1 files (+1 heads) | |
424 | (run 'hg heads .' to see heads, 'hg merge' to merge) |
|
424 | (run 'hg heads .' to see heads, 'hg merge' to merge) | |
425 |
|
425 | |||
426 | $ hg -R server graph |
|
426 | $ hg -R server graph | |
427 | o d9e379a8c432 C-F (default) |
|
427 | o d9e379a8c432 C-F (default) | |
428 | | |
|
428 | | | |
429 | o 51c544a58128 C-C (default) |
|
429 | o 51c544a58128 C-C (default) | |
430 | | |
|
430 | | | |
431 | | o d603e2c0cdd7 C-E (default) |
|
431 | | o d603e2c0cdd7 C-E (default) | |
432 | |/ |
|
432 | |/ | |
433 | o 98217d5a1659 C-A (default) |
|
433 | o 98217d5a1659 C-A (default) | |
434 | | |
|
434 | | | |
435 | | o 59e76faf78bd C-D (default) |
|
435 | | o 59e76faf78bd C-D (default) | |
436 | | | |
|
436 | | | | |
437 | | o a9149a1428e2 C-B (default) |
|
437 | | o a9149a1428e2 C-B (default) | |
438 | |/ |
|
438 | |/ | |
439 | @ 842e2fac6304 C-ROOT (default) |
|
439 | @ 842e2fac6304 C-ROOT (default) | |
440 |
|
440 | |||
441 |
|
441 | |||
442 | Creating changesets |
|
442 | Creating changesets | |
443 |
|
443 | |||
444 | (update existing head) |
|
444 | (update existing head) | |
445 |
|
445 | |||
446 | $ hg -R client-other/ up 'desc("C-F")' |
|
446 | $ hg -R client-other/ up 'desc("C-F")' | |
447 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
447 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
448 | $ echo aaa >> client-other/a |
|
448 | $ echo aaa >> client-other/a | |
449 | $ hg -R client-other/ commit -m "C-G" |
|
449 | $ hg -R client-other/ commit -m "C-G" | |
450 |
|
450 | |||
451 | (new named branch from that existing head) |
|
451 | (new named branch from that existing head) | |
452 |
|
452 | |||
453 | $ hg -R client-racy/ up 'desc("C-F")' |
|
453 | $ hg -R client-racy/ up 'desc("C-F")' | |
454 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
454 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
455 | $ echo bbb >> client-racy/a |
|
455 | $ echo bbb >> client-racy/a | |
456 | $ hg -R client-racy/ branch my-first-test-branch |
|
456 | $ hg -R client-racy/ branch my-first-test-branch | |
457 | marked working directory as branch my-first-test-branch |
|
457 | marked working directory as branch my-first-test-branch | |
458 | (branches are permanent and global, did you want a bookmark?) |
|
458 | (branches are permanent and global, did you want a bookmark?) | |
459 | $ hg -R client-racy/ commit -m "C-H" |
|
459 | $ hg -R client-racy/ commit -m "C-H" | |
460 |
|
460 | |||
461 | Pushing |
|
461 | Pushing | |
462 |
|
462 | |||
463 | $ hg -R client-racy push -r 'tip' --new-branch > ./push-log 2>&1 & |
|
463 | $ hg -R client-racy push -r 'tip' --new-branch > ./push-log 2>&1 & | |
464 |
|
464 | |||
465 | $ waiton $TESTTMP/readyfile |
|
465 | $ waiton $TESTTMP/readyfile | |
466 |
|
466 | |||
467 | $ hg -R client-other push -fr 'tip' |
|
467 | $ hg -R client-other push -fr 'tip' | |
468 | pushing to ssh://user@dummy/server |
|
468 | pushing to ssh://user@dummy/server | |
469 | searching for changes |
|
469 | searching for changes | |
470 | remote: adding changesets |
|
470 | remote: adding changesets | |
471 | remote: adding manifests |
|
471 | remote: adding manifests | |
472 | remote: adding file changes |
|
472 | remote: adding file changes | |
473 | remote: added 1 changesets with 1 changes to 1 files |
|
473 | remote: added 1 changesets with 1 changes to 1 files | |
474 |
|
474 | |||
475 | $ release $TESTTMP/watchfile |
|
475 | $ release $TESTTMP/watchfile | |
476 |
|
476 | |||
477 | Check the result of the push |
|
477 | Check the result of the push | |
478 |
|
478 | |||
479 | $ cat ./push-log |
|
479 | $ cat ./push-log | |
480 | pushing to ssh://user@dummy/server |
|
480 | pushing to ssh://user@dummy/server | |
481 | searching for changes |
|
481 | searching for changes | |
482 | wrote ready: $TESTTMP/readyfile |
|
482 | wrote ready: $TESTTMP/readyfile | |
483 | waiting on: $TESTTMP/watchfile |
|
483 | waiting on: $TESTTMP/watchfile | |
484 | abort: push failed: |
|
484 | abort: push failed: | |
485 | 'repository changed while pushing - please try again' |
|
485 | 'repository changed while pushing - please try again' | |
486 |
|
486 | |||
487 | $ hg -R server graph |
|
487 | $ hg -R server graph | |
488 | o 75d69cba5402 C-G (default) |
|
488 | o 75d69cba5402 C-G (default) | |
489 | | |
|
489 | | | |
490 | o d9e379a8c432 C-F (default) |
|
490 | o d9e379a8c432 C-F (default) | |
491 | | |
|
491 | | | |
492 | o 51c544a58128 C-C (default) |
|
492 | o 51c544a58128 C-C (default) | |
493 | | |
|
493 | | | |
494 | | o d603e2c0cdd7 C-E (default) |
|
494 | | o d603e2c0cdd7 C-E (default) | |
495 | |/ |
|
495 | |/ | |
496 | o 98217d5a1659 C-A (default) |
|
496 | o 98217d5a1659 C-A (default) | |
497 | | |
|
497 | | | |
498 | | o 59e76faf78bd C-D (default) |
|
498 | | o 59e76faf78bd C-D (default) | |
499 | | | |
|
499 | | | | |
500 | | o a9149a1428e2 C-B (default) |
|
500 | | o a9149a1428e2 C-B (default) | |
501 | |/ |
|
501 | |/ | |
502 | @ 842e2fac6304 C-ROOT (default) |
|
502 | @ 842e2fac6304 C-ROOT (default) | |
503 |
|
503 | |||
504 |
|
504 | |||
505 | pushing touching different named branch (same topo): old branch raced |
|
505 | pushing touching different named branch (same topo): old branch raced | |
506 | --------------------------------------------------------------------- |
|
506 | --------------------------------------------------------------------- | |
507 |
|
507 | |||
508 | Pushing two children on the same head, one is a different named branch |
|
508 | Pushing two children on the same head, one is a different named branch | |
509 |
|
509 | |||
510 | # a (raced, default-branch) |
|
510 | # a (raced, default-branch) | |
511 | # | |
|
511 | # | | |
512 | # | b (new branch) |
|
512 | # | b (new branch) | |
513 | # |/ |
|
513 | # |/ | |
514 | # * (default-branch) |
|
514 | # * (default-branch) | |
515 |
|
515 | |||
516 | (resync-all) |
|
516 | (resync-all) | |
517 |
|
517 | |||
518 | $ hg -R ./server pull ./client-racy |
|
518 | $ hg -R ./server pull ./client-racy | |
519 | pulling from ./client-racy |
|
519 | pulling from ./client-racy | |
520 | searching for changes |
|
520 | searching for changes | |
521 | adding changesets |
|
521 | adding changesets | |
522 | adding manifests |
|
522 | adding manifests | |
523 | adding file changes |
|
523 | adding file changes | |
524 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
524 | added 1 changesets with 1 changes to 1 files (+1 heads) | |
525 | (run 'hg heads .' to see heads, 'hg merge' to merge) |
|
525 | (run 'hg heads .' to see heads, 'hg merge' to merge) | |
526 | $ hg -R ./client-other pull |
|
526 | $ hg -R ./client-other pull | |
527 | pulling from ssh://user@dummy/server |
|
527 | pulling from ssh://user@dummy/server | |
528 | searching for changes |
|
528 | searching for changes | |
529 | adding changesets |
|
529 | adding changesets | |
530 | adding manifests |
|
530 | adding manifests | |
531 | adding file changes |
|
531 | adding file changes | |
532 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
532 | added 1 changesets with 1 changes to 1 files (+1 heads) | |
533 | (run 'hg heads .' to see heads, 'hg merge' to merge) |
|
533 | (run 'hg heads .' to see heads, 'hg merge' to merge) | |
534 | $ hg -R ./client-racy pull |
|
534 | $ hg -R ./client-racy pull | |
535 | pulling from ssh://user@dummy/server |
|
535 | pulling from ssh://user@dummy/server | |
536 | searching for changes |
|
536 | searching for changes | |
537 | adding changesets |
|
537 | adding changesets | |
538 | adding manifests |
|
538 | adding manifests | |
539 | adding file changes |
|
539 | adding file changes | |
540 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
540 | added 1 changesets with 1 changes to 1 files (+1 heads) | |
541 | (run 'hg heads' to see heads) |
|
541 | (run 'hg heads' to see heads) | |
542 |
|
542 | |||
543 | $ hg -R server graph |
|
543 | $ hg -R server graph | |
544 | o 833be552cfe6 C-H (my-first-test-branch) |
|
544 | o 833be552cfe6 C-H (my-first-test-branch) | |
545 | | |
|
545 | | | |
546 | | o 75d69cba5402 C-G (default) |
|
546 | | o 75d69cba5402 C-G (default) | |
547 | |/ |
|
547 | |/ | |
548 | o d9e379a8c432 C-F (default) |
|
548 | o d9e379a8c432 C-F (default) | |
549 | | |
|
549 | | | |
550 | o 51c544a58128 C-C (default) |
|
550 | o 51c544a58128 C-C (default) | |
551 | | |
|
551 | | | |
552 | | o d603e2c0cdd7 C-E (default) |
|
552 | | o d603e2c0cdd7 C-E (default) | |
553 | |/ |
|
553 | |/ | |
554 | o 98217d5a1659 C-A (default) |
|
554 | o 98217d5a1659 C-A (default) | |
555 | | |
|
555 | | | |
556 | | o 59e76faf78bd C-D (default) |
|
556 | | o 59e76faf78bd C-D (default) | |
557 | | | |
|
557 | | | | |
558 | | o a9149a1428e2 C-B (default) |
|
558 | | o a9149a1428e2 C-B (default) | |
559 | |/ |
|
559 | |/ | |
560 | @ 842e2fac6304 C-ROOT (default) |
|
560 | @ 842e2fac6304 C-ROOT (default) | |
561 |
|
561 | |||
562 |
|
562 | |||
563 | Creating changesets |
|
563 | Creating changesets | |
564 |
|
564 | |||
565 | (new named branch from one head) |
|
565 | (new named branch from one head) | |
566 |
|
566 | |||
567 | $ hg -R client-other/ up 'desc("C-G")' |
|
567 | $ hg -R client-other/ up 'desc("C-G")' | |
568 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
568 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
569 | $ echo aaa >> client-other/a |
|
569 | $ echo aaa >> client-other/a | |
570 | $ hg -R client-other/ branch my-second-test-branch |
|
570 | $ hg -R client-other/ branch my-second-test-branch | |
571 | marked working directory as branch my-second-test-branch |
|
571 | marked working directory as branch my-second-test-branch | |
572 | $ hg -R client-other/ commit -m "C-I" |
|
572 | $ hg -R client-other/ commit -m "C-I" | |
573 |
|
573 | |||
574 | (children "updating" that same head) |
|
574 | (children "updating" that same head) | |
575 |
|
575 | |||
576 | $ hg -R client-racy/ up 'desc("C-G")' |
|
576 | $ hg -R client-racy/ up 'desc("C-G")' | |
577 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
577 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
578 | $ echo bbb >> client-racy/a |
|
578 | $ echo bbb >> client-racy/a | |
579 | $ hg -R client-racy/ commit -m "C-J" |
|
579 | $ hg -R client-racy/ commit -m "C-J" | |
580 |
|
580 | |||
581 | Pushing |
|
581 | Pushing | |
582 |
|
582 | |||
583 | $ hg -R client-racy push -r 'tip' > ./push-log 2>&1 & |
|
583 | $ hg -R client-racy push -r 'tip' > ./push-log 2>&1 & | |
584 |
|
584 | |||
585 | $ waiton $TESTTMP/readyfile |
|
585 | $ waiton $TESTTMP/readyfile | |
586 |
|
586 | |||
587 | $ hg -R client-other push -fr 'tip' --new-branch |
|
587 | $ hg -R client-other push -fr 'tip' --new-branch | |
588 | pushing to ssh://user@dummy/server |
|
588 | pushing to ssh://user@dummy/server | |
589 | searching for changes |
|
589 | searching for changes | |
590 | remote: adding changesets |
|
590 | remote: adding changesets | |
591 | remote: adding manifests |
|
591 | remote: adding manifests | |
592 | remote: adding file changes |
|
592 | remote: adding file changes | |
593 | remote: added 1 changesets with 1 changes to 1 files |
|
593 | remote: added 1 changesets with 1 changes to 1 files | |
594 |
|
594 | |||
595 | $ release $TESTTMP/watchfile |
|
595 | $ release $TESTTMP/watchfile | |
596 |
|
596 | |||
597 | Check the result of the push |
|
597 | Check the result of the push | |
598 |
|
598 | |||
599 | $ cat ./push-log |
|
599 | $ cat ./push-log | |
600 | pushing to ssh://user@dummy/server |
|
600 | pushing to ssh://user@dummy/server | |
601 | searching for changes |
|
601 | searching for changes | |
602 | wrote ready: $TESTTMP/readyfile |
|
602 | wrote ready: $TESTTMP/readyfile | |
603 | waiting on: $TESTTMP/watchfile |
|
603 | waiting on: $TESTTMP/watchfile | |
604 | abort: push failed: |
|
604 | abort: push failed: | |
605 | 'repository changed while pushing - please try again' |
|
605 | 'repository changed while pushing - please try again' | |
606 |
|
606 | |||
607 | $ hg -R server graph |
|
607 | $ hg -R server graph | |
608 | o b35ed749f288 C-I (my-second-test-branch) |
|
608 | o b35ed749f288 C-I (my-second-test-branch) | |
609 | | |
|
609 | | | |
610 | o 75d69cba5402 C-G (default) |
|
610 | o 75d69cba5402 C-G (default) | |
611 | | |
|
611 | | | |
612 | | o 833be552cfe6 C-H (my-first-test-branch) |
|
612 | | o 833be552cfe6 C-H (my-first-test-branch) | |
613 | |/ |
|
613 | |/ | |
614 | o d9e379a8c432 C-F (default) |
|
614 | o d9e379a8c432 C-F (default) | |
615 | | |
|
615 | | | |
616 | o 51c544a58128 C-C (default) |
|
616 | o 51c544a58128 C-C (default) | |
617 | | |
|
617 | | | |
618 | | o d603e2c0cdd7 C-E (default) |
|
618 | | o d603e2c0cdd7 C-E (default) | |
619 | |/ |
|
619 | |/ | |
620 | o 98217d5a1659 C-A (default) |
|
620 | o 98217d5a1659 C-A (default) | |
621 | | |
|
621 | | | |
622 | | o 59e76faf78bd C-D (default) |
|
622 | | o 59e76faf78bd C-D (default) | |
623 | | | |
|
623 | | | | |
624 | | o a9149a1428e2 C-B (default) |
|
624 | | o a9149a1428e2 C-B (default) | |
625 | |/ |
|
625 | |/ | |
626 | @ 842e2fac6304 C-ROOT (default) |
|
626 | @ 842e2fac6304 C-ROOT (default) | |
627 |
|
627 | |||
628 |
|
628 | |||
629 | pushing racing push touch multiple heads |
|
629 | pushing racing push touch multiple heads | |
630 | ---------------------------------------- |
|
630 | ---------------------------------------- | |
631 |
|
631 | |||
632 | There are multiple heads, but the racing push touch all of them |
|
632 | There are multiple heads, but the racing push touch all of them | |
633 |
|
633 | |||
634 | # a (raced) |
|
634 | # a (raced) | |
635 | # | b |
|
635 | # | b | |
636 | # |/| |
|
636 | # |/| | |
637 | # * * |
|
637 | # * * | |
638 | # |/ |
|
638 | # |/ | |
639 | # * |
|
639 | # * | |
640 |
|
640 | |||
641 | (resync-all) |
|
641 | (resync-all) | |
642 |
|
642 | |||
643 | $ hg -R ./server pull ./client-racy |
|
643 | $ hg -R ./server pull ./client-racy | |
644 | pulling from ./client-racy |
|
644 | pulling from ./client-racy | |
645 | searching for changes |
|
645 | searching for changes | |
646 | adding changesets |
|
646 | adding changesets | |
647 | adding manifests |
|
647 | adding manifests | |
648 | adding file changes |
|
648 | adding file changes | |
649 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
649 | added 1 changesets with 1 changes to 1 files (+1 heads) | |
650 | (run 'hg heads .' to see heads, 'hg merge' to merge) |
|
650 | (run 'hg heads .' to see heads, 'hg merge' to merge) | |
651 | $ hg -R ./client-other pull |
|
651 | $ hg -R ./client-other pull | |
652 | pulling from ssh://user@dummy/server |
|
652 | pulling from ssh://user@dummy/server | |
653 | searching for changes |
|
653 | searching for changes | |
654 | adding changesets |
|
654 | adding changesets | |
655 | adding manifests |
|
655 | adding manifests | |
656 | adding file changes |
|
656 | adding file changes | |
657 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
657 | added 1 changesets with 1 changes to 1 files (+1 heads) | |
658 | (run 'hg heads' to see heads) |
|
658 | (run 'hg heads' to see heads) | |
659 | $ hg -R ./client-racy pull |
|
659 | $ hg -R ./client-racy pull | |
660 | pulling from ssh://user@dummy/server |
|
660 | pulling from ssh://user@dummy/server | |
661 | searching for changes |
|
661 | searching for changes | |
662 | adding changesets |
|
662 | adding changesets | |
663 | adding manifests |
|
663 | adding manifests | |
664 | adding file changes |
|
664 | adding file changes | |
665 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
665 | added 1 changesets with 1 changes to 1 files (+1 heads) | |
666 | (run 'hg heads .' to see heads, 'hg merge' to merge) |
|
666 | (run 'hg heads .' to see heads, 'hg merge' to merge) | |
667 |
|
667 | |||
668 | $ hg -R server graph |
|
668 | $ hg -R server graph | |
669 | o 89420bf00fae C-J (default) |
|
669 | o 89420bf00fae C-J (default) | |
670 | | |
|
670 | | | |
671 | | o b35ed749f288 C-I (my-second-test-branch) |
|
671 | | o b35ed749f288 C-I (my-second-test-branch) | |
672 | |/ |
|
672 | |/ | |
673 | o 75d69cba5402 C-G (default) |
|
673 | o 75d69cba5402 C-G (default) | |
674 | | |
|
674 | | | |
675 | | o 833be552cfe6 C-H (my-first-test-branch) |
|
675 | | o 833be552cfe6 C-H (my-first-test-branch) | |
676 | |/ |
|
676 | |/ | |
677 | o d9e379a8c432 C-F (default) |
|
677 | o d9e379a8c432 C-F (default) | |
678 | | |
|
678 | | | |
679 | o 51c544a58128 C-C (default) |
|
679 | o 51c544a58128 C-C (default) | |
680 | | |
|
680 | | | |
681 | | o d603e2c0cdd7 C-E (default) |
|
681 | | o d603e2c0cdd7 C-E (default) | |
682 | |/ |
|
682 | |/ | |
683 | o 98217d5a1659 C-A (default) |
|
683 | o 98217d5a1659 C-A (default) | |
684 | | |
|
684 | | | |
685 | | o 59e76faf78bd C-D (default) |
|
685 | | o 59e76faf78bd C-D (default) | |
686 | | | |
|
686 | | | | |
687 | | o a9149a1428e2 C-B (default) |
|
687 | | o a9149a1428e2 C-B (default) | |
688 | |/ |
|
688 | |/ | |
689 | @ 842e2fac6304 C-ROOT (default) |
|
689 | @ 842e2fac6304 C-ROOT (default) | |
690 |
|
690 | |||
691 |
|
691 | |||
692 | Creating changesets |
|
692 | Creating changesets | |
693 |
|
693 | |||
694 | (merges heads) |
|
694 | (merges heads) | |
695 |
|
695 | |||
696 | $ hg -R client-other/ up 'desc("C-E")' |
|
696 | $ hg -R client-other/ up 'desc("C-E")' | |
697 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
697 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
698 | $ hg -R client-other/ merge 'desc("C-D")' |
|
698 | $ hg -R client-other/ merge 'desc("C-D")' | |
699 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
699 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
700 | (branch merge, don't forget to commit) |
|
700 | (branch merge, don't forget to commit) | |
701 | $ hg -R client-other/ commit -m "C-K" |
|
701 | $ hg -R client-other/ commit -m "C-K" | |
702 |
|
702 | |||
703 | (update one head) |
|
703 | (update one head) | |
704 |
|
704 | |||
705 | $ hg -R client-racy/ up 'desc("C-D")' |
|
705 | $ hg -R client-racy/ up 'desc("C-D")' | |
706 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
706 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
707 | $ echo bbb >> client-racy/b |
|
707 | $ echo bbb >> client-racy/b | |
708 | $ hg -R client-racy/ commit -m "C-L" |
|
708 | $ hg -R client-racy/ commit -m "C-L" | |
709 |
|
709 | |||
710 | Pushing |
|
710 | Pushing | |
711 |
|
711 | |||
712 | $ hg -R client-racy push -r 'tip' > ./push-log 2>&1 & |
|
712 | $ hg -R client-racy push -r 'tip' > ./push-log 2>&1 & | |
713 |
|
713 | |||
714 | $ waiton $TESTTMP/readyfile |
|
714 | $ waiton $TESTTMP/readyfile | |
715 |
|
715 | |||
716 | $ hg -R client-other push -fr 'tip' --new-branch |
|
716 | $ hg -R client-other push -fr 'tip' --new-branch | |
717 | pushing to ssh://user@dummy/server |
|
717 | pushing to ssh://user@dummy/server | |
718 | searching for changes |
|
718 | searching for changes | |
719 | remote: adding changesets |
|
719 | remote: adding changesets | |
720 | remote: adding manifests |
|
720 | remote: adding manifests | |
721 | remote: adding file changes |
|
721 | remote: adding file changes | |
722 | remote: added 1 changesets with 0 changes to 0 files (-1 heads) |
|
722 | remote: added 1 changesets with 0 changes to 0 files (-1 heads) | |
723 |
|
723 | |||
724 | $ release $TESTTMP/watchfile |
|
724 | $ release $TESTTMP/watchfile | |
725 |
|
725 | |||
726 | Check the result of the push |
|
726 | Check the result of the push | |
727 |
|
727 | |||
728 | $ cat ./push-log |
|
728 | $ cat ./push-log | |
729 | pushing to ssh://user@dummy/server |
|
729 | pushing to ssh://user@dummy/server | |
730 | searching for changes |
|
730 | searching for changes | |
731 | wrote ready: $TESTTMP/readyfile |
|
731 | wrote ready: $TESTTMP/readyfile | |
732 | waiting on: $TESTTMP/watchfile |
|
732 | waiting on: $TESTTMP/watchfile | |
733 | abort: push failed: |
|
733 | abort: push failed: | |
734 | 'repository changed while pushing - please try again' |
|
734 | 'repository changed while pushing - please try again' | |
735 |
|
735 | |||
736 | $ hg -R server graph |
|
736 | $ hg -R server graph | |
737 | o be705100c623 C-K (default) |
|
737 | o be705100c623 C-K (default) | |
738 | |\ |
|
738 | |\ | |
739 | | o d603e2c0cdd7 C-E (default) |
|
739 | | o d603e2c0cdd7 C-E (default) | |
740 | | | |
|
740 | | | | |
741 | o | 59e76faf78bd C-D (default) |
|
741 | o | 59e76faf78bd C-D (default) | |
742 | | | |
|
742 | | | | |
743 | | | o 89420bf00fae C-J (default) |
|
743 | | | o 89420bf00fae C-J (default) | |
744 | | | | |
|
744 | | | | | |
745 | | | | o b35ed749f288 C-I (my-second-test-branch) |
|
745 | | | | o b35ed749f288 C-I (my-second-test-branch) | |
746 | | | |/ |
|
746 | | | |/ | |
747 | | | o 75d69cba5402 C-G (default) |
|
747 | | | o 75d69cba5402 C-G (default) | |
748 | | | | |
|
748 | | | | | |
749 | | | | o 833be552cfe6 C-H (my-first-test-branch) |
|
749 | | | | o 833be552cfe6 C-H (my-first-test-branch) | |
750 | | | |/ |
|
750 | | | |/ | |
751 | | | o d9e379a8c432 C-F (default) |
|
751 | | | o d9e379a8c432 C-F (default) | |
752 | | | | |
|
752 | | | | | |
753 | | | o 51c544a58128 C-C (default) |
|
753 | | | o 51c544a58128 C-C (default) | |
754 | | |/ |
|
754 | | |/ | |
755 | o | a9149a1428e2 C-B (default) |
|
755 | o | a9149a1428e2 C-B (default) | |
756 | | | |
|
756 | | | | |
757 | | o 98217d5a1659 C-A (default) |
|
757 | | o 98217d5a1659 C-A (default) | |
758 | |/ |
|
758 | |/ | |
759 | @ 842e2fac6304 C-ROOT (default) |
|
759 | @ 842e2fac6304 C-ROOT (default) | |
760 |
|
760 | |||
|
761 | ||||
|
762 | pushing raced push touch multiple heads | |||
|
763 | --------------------------------------- | |||
|
764 | ||||
|
765 | There are multiple heads, the raced push touch all of them | |||
|
766 | ||||
|
767 | # b | |||
|
768 | # | a (raced) | |||
|
769 | # |/| | |||
|
770 | # * * | |||
|
771 | # |/ | |||
|
772 | # * | |||
|
773 | ||||
|
774 | (resync-all) | |||
|
775 | ||||
|
776 | $ hg -R ./server pull ./client-racy | |||
|
777 | pulling from ./client-racy | |||
|
778 | searching for changes | |||
|
779 | adding changesets | |||
|
780 | adding manifests | |||
|
781 | adding file changes | |||
|
782 | added 1 changesets with 1 changes to 1 files (+1 heads) | |||
|
783 | (run 'hg heads .' to see heads, 'hg merge' to merge) | |||
|
784 | $ hg -R ./client-other pull | |||
|
785 | pulling from ssh://user@dummy/server | |||
|
786 | searching for changes | |||
|
787 | adding changesets | |||
|
788 | adding manifests | |||
|
789 | adding file changes | |||
|
790 | added 1 changesets with 1 changes to 1 files (+1 heads) | |||
|
791 | (run 'hg heads .' to see heads, 'hg merge' to merge) | |||
|
792 | $ hg -R ./client-racy pull | |||
|
793 | pulling from ssh://user@dummy/server | |||
|
794 | searching for changes | |||
|
795 | adding changesets | |||
|
796 | adding manifests | |||
|
797 | adding file changes | |||
|
798 | added 1 changesets with 0 changes to 0 files | |||
|
799 | (run 'hg update' to get a working copy) | |||
|
800 | ||||
|
801 | $ hg -R server graph | |||
|
802 | o cac2cead0ff0 C-L (default) | |||
|
803 | | | |||
|
804 | | o be705100c623 C-K (default) | |||
|
805 | |/| | |||
|
806 | | o d603e2c0cdd7 C-E (default) | |||
|
807 | | | | |||
|
808 | o | 59e76faf78bd C-D (default) | |||
|
809 | | | | |||
|
810 | | | o 89420bf00fae C-J (default) | |||
|
811 | | | | | |||
|
812 | | | | o b35ed749f288 C-I (my-second-test-branch) | |||
|
813 | | | |/ | |||
|
814 | | | o 75d69cba5402 C-G (default) | |||
|
815 | | | | | |||
|
816 | | | | o 833be552cfe6 C-H (my-first-test-branch) | |||
|
817 | | | |/ | |||
|
818 | | | o d9e379a8c432 C-F (default) | |||
|
819 | | | | | |||
|
820 | | | o 51c544a58128 C-C (default) | |||
|
821 | | |/ | |||
|
822 | o | a9149a1428e2 C-B (default) | |||
|
823 | | | | |||
|
824 | | o 98217d5a1659 C-A (default) | |||
|
825 | |/ | |||
|
826 | @ 842e2fac6304 C-ROOT (default) | |||
|
827 | ||||
|
828 | ||||
|
829 | Creating changesets | |||
|
830 | ||||
|
831 | (update existing head) | |||
|
832 | ||||
|
833 | $ echo aaa >> client-other/a | |||
|
834 | $ hg -R client-other/ commit -m "C-M" | |||
|
835 | ||||
|
836 | (merge heads) | |||
|
837 | ||||
|
838 | $ hg -R client-racy/ merge 'desc("C-K")' | |||
|
839 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |||
|
840 | (branch merge, don't forget to commit) | |||
|
841 | $ hg -R client-racy/ commit -m "C-N" | |||
|
842 | ||||
|
843 | Pushing | |||
|
844 | ||||
|
845 | $ hg -R client-racy push -r 'tip' > ./push-log 2>&1 & | |||
|
846 | ||||
|
847 | $ waiton $TESTTMP/readyfile | |||
|
848 | ||||
|
849 | $ hg -R client-other push -fr 'tip' --new-branch | |||
|
850 | pushing to ssh://user@dummy/server | |||
|
851 | searching for changes | |||
|
852 | remote: adding changesets | |||
|
853 | remote: adding manifests | |||
|
854 | remote: adding file changes | |||
|
855 | remote: added 1 changesets with 1 changes to 1 files | |||
|
856 | ||||
|
857 | $ release $TESTTMP/watchfile | |||
|
858 | ||||
|
859 | Check the result of the push | |||
|
860 | ||||
|
861 | $ cat ./push-log | |||
|
862 | pushing to ssh://user@dummy/server | |||
|
863 | searching for changes | |||
|
864 | wrote ready: $TESTTMP/readyfile | |||
|
865 | waiting on: $TESTTMP/watchfile | |||
|
866 | abort: push failed: | |||
|
867 | 'repository changed while pushing - please try again' | |||
|
868 | ||||
|
869 | $ hg -R server graph | |||
|
870 | o 6fd3090135df C-M (default) | |||
|
871 | | | |||
|
872 | o be705100c623 C-K (default) | |||
|
873 | |\ | |||
|
874 | | o d603e2c0cdd7 C-E (default) | |||
|
875 | | | | |||
|
876 | +---o cac2cead0ff0 C-L (default) | |||
|
877 | | | | |||
|
878 | o | 59e76faf78bd C-D (default) | |||
|
879 | | | | |||
|
880 | | | o 89420bf00fae C-J (default) | |||
|
881 | | | | | |||
|
882 | | | | o b35ed749f288 C-I (my-second-test-branch) | |||
|
883 | | | |/ | |||
|
884 | | | o 75d69cba5402 C-G (default) | |||
|
885 | | | | | |||
|
886 | | | | o 833be552cfe6 C-H (my-first-test-branch) | |||
|
887 | | | |/ | |||
|
888 | | | o d9e379a8c432 C-F (default) | |||
|
889 | | | | | |||
|
890 | | | o 51c544a58128 C-C (default) | |||
|
891 | | |/ | |||
|
892 | o | a9149a1428e2 C-B (default) | |||
|
893 | | | | |||
|
894 | | o 98217d5a1659 C-A (default) | |||
|
895 | |/ | |||
|
896 | @ 842e2fac6304 C-ROOT (default) | |||
|
897 |
General Comments 0
You need to be logged in to leave comments.
Login now