Show More
@@ -1,782 +1,788 b'' | |||
|
1 | $ cat << EOF >> $HGRCPATH | |
|
2 | > [experimental] | |
|
3 | > # drop me once bundle2 is the default, | |
|
4 | > # added to get test change early. | |
|
5 | > bundle2-exp = True | |
|
6 | > EOF | |
|
1 | 7 |
$ |
|
2 | 8 | $ cd a |
|
3 | 9 | $ echo foo > t1 |
|
4 | 10 | $ hg add t1 |
|
5 | 11 | $ hg commit -m "1" |
|
6 | 12 | |
|
7 | 13 | $ cd .. |
|
8 | 14 | $ hg clone a b |
|
9 | 15 | updating to branch default |
|
10 | 16 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
11 | 17 | |
|
12 | 18 | $ cd a |
|
13 | 19 | $ echo foo > t2 |
|
14 | 20 | $ hg add t2 |
|
15 | 21 | $ hg commit -m "2" |
|
16 | 22 | |
|
17 | 23 | $ cd ../b |
|
18 | 24 | $ echo foo > t3 |
|
19 | 25 | $ hg add t3 |
|
20 | 26 | $ hg commit -m "3" |
|
21 | 27 | |
|
22 | 28 | Specifying a revset that evaluates to null will abort |
|
23 | 29 | |
|
24 | 30 | $ hg push -r '0 & 1' ../a |
|
25 | 31 | pushing to ../a |
|
26 | 32 | abort: specified revisions evaluate to an empty set |
|
27 | 33 | (use different revision arguments) |
|
28 | 34 | [255] |
|
29 | 35 | |
|
30 | 36 | $ hg push ../a |
|
31 | 37 | pushing to ../a |
|
32 | 38 | searching for changes |
|
33 | 39 | remote has heads on branch 'default' that are not known locally: 1c9246a22a0a |
|
34 | 40 | abort: push creates new remote head 1e108cc5548c! |
|
35 | 41 | (pull and merge or see "hg help push" for details about pushing new heads) |
|
36 | 42 | [255] |
|
37 | 43 | |
|
38 | 44 | $ hg push --debug ../a |
|
39 | 45 | pushing to ../a |
|
40 | 46 | query 1; heads |
|
41 | 47 | searching for changes |
|
42 | 48 | taking quick initial sample |
|
43 | 49 | query 2; still undecided: 1, sample size is: 1 |
|
44 | 50 | 2 total queries |
|
45 | 51 | listing keys for "phases" |
|
46 | 52 | checking for updated bookmarks |
|
47 | 53 | listing keys for "bookmarks" |
|
48 | 54 | listing keys for "bookmarks" |
|
49 | 55 | remote has heads on branch 'default' that are not known locally: 1c9246a22a0a |
|
50 | 56 | new remote heads on branch 'default': |
|
51 | 57 | 1e108cc5548c |
|
52 | 58 | abort: push creates new remote head 1e108cc5548c! |
|
53 | 59 | (pull and merge or see "hg help push" for details about pushing new heads) |
|
54 | 60 | [255] |
|
55 | 61 | |
|
56 | 62 | $ hg pull ../a |
|
57 | 63 | pulling from ../a |
|
58 | 64 | searching for changes |
|
59 | 65 | adding changesets |
|
60 | 66 | adding manifests |
|
61 | 67 | adding file changes |
|
62 | 68 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
63 | 69 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
64 | 70 | |
|
65 | 71 | $ hg push ../a |
|
66 | 72 | pushing to ../a |
|
67 | 73 | searching for changes |
|
68 | 74 | abort: push creates new remote head 1e108cc5548c! |
|
69 | 75 | (merge or see "hg help push" for details about pushing new heads) |
|
70 | 76 | [255] |
|
71 | 77 | |
|
72 | 78 | $ hg merge |
|
73 | 79 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
74 | 80 | (branch merge, don't forget to commit) |
|
75 | 81 | |
|
76 | 82 | $ hg commit -m "4" |
|
77 | 83 | $ hg push ../a |
|
78 | 84 | pushing to ../a |
|
79 | 85 | searching for changes |
|
80 | 86 | adding changesets |
|
81 | 87 | adding manifests |
|
82 | 88 | adding file changes |
|
83 | 89 | added 2 changesets with 1 changes to 1 files |
|
84 | 90 | |
|
85 | 91 | $ cd .. |
|
86 | 92 | |
|
87 | 93 | $ hg init c |
|
88 | 94 | $ cd c |
|
89 | 95 | $ for i in 0 1 2; do |
|
90 | 96 | > echo $i >> foo |
|
91 | 97 | > hg ci -Am $i |
|
92 | 98 | > done |
|
93 | 99 | adding foo |
|
94 | 100 | $ cd .. |
|
95 | 101 | |
|
96 | 102 | $ hg clone c d |
|
97 | 103 | updating to branch default |
|
98 | 104 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
99 | 105 | |
|
100 | 106 | $ cd d |
|
101 | 107 | $ for i in 0 1; do |
|
102 | 108 | > hg co -C $i |
|
103 | 109 | > echo d-$i >> foo |
|
104 | 110 | > hg ci -m d-$i |
|
105 | 111 | > done |
|
106 | 112 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
107 | 113 | created new head |
|
108 | 114 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
109 | 115 | created new head |
|
110 | 116 | |
|
111 | 117 | $ HGMERGE=true hg merge 3 |
|
112 | 118 | merging foo |
|
113 | 119 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
114 | 120 | (branch merge, don't forget to commit) |
|
115 | 121 | |
|
116 | 122 | $ hg ci -m c-d |
|
117 | 123 | |
|
118 | 124 | $ hg push ../c |
|
119 | 125 | pushing to ../c |
|
120 | 126 | searching for changes |
|
121 | 127 | abort: push creates new remote head 6346d66eb9f5! |
|
122 | 128 | (merge or see "hg help push" for details about pushing new heads) |
|
123 | 129 | [255] |
|
124 | 130 | |
|
125 | 131 | $ hg push -r 2 ../c |
|
126 | 132 | pushing to ../c |
|
127 | 133 | searching for changes |
|
128 | 134 | no changes found |
|
129 | 135 | [1] |
|
130 | 136 | |
|
131 | 137 | $ hg push -r 3 ../c |
|
132 | 138 | pushing to ../c |
|
133 | 139 | searching for changes |
|
134 | 140 | abort: push creates new remote head a5dda829a167! |
|
135 | 141 | (merge or see "hg help push" for details about pushing new heads) |
|
136 | 142 | [255] |
|
137 | 143 | |
|
138 | 144 | $ hg push -v -r 3 -r 4 ../c |
|
139 | 145 | pushing to ../c |
|
140 | 146 | searching for changes |
|
141 | 147 | new remote heads on branch 'default': |
|
142 | 148 | a5dda829a167 |
|
143 | 149 | ee8fbc7a0295 |
|
144 | 150 | abort: push creates new remote head a5dda829a167! |
|
145 | 151 | (merge or see "hg help push" for details about pushing new heads) |
|
146 | 152 | [255] |
|
147 | 153 | |
|
148 | 154 | $ hg push -v -f -r 3 -r 4 ../c |
|
149 | 155 | pushing to ../c |
|
150 | 156 | searching for changes |
|
151 | 157 | 2 changesets found |
|
152 | 158 | uncompressed size of bundle content: |
|
153 |
3 |
|
|
154 |
2 |
|
|
155 |
2 |
|
|
159 | 348 (changelog) | |
|
160 | 326 (manifests) | |
|
161 | 253 foo | |
|
156 | 162 | adding changesets |
|
157 | 163 | adding manifests |
|
158 | 164 | adding file changes |
|
159 | 165 | added 2 changesets with 2 changes to 1 files (+2 heads) |
|
160 | 166 | |
|
161 | 167 | $ hg push -r 5 ../c |
|
162 | 168 | pushing to ../c |
|
163 | 169 | searching for changes |
|
164 | 170 | adding changesets |
|
165 | 171 | adding manifests |
|
166 | 172 | adding file changes |
|
167 | 173 | added 1 changesets with 1 changes to 1 files (-1 heads) |
|
168 | 174 | |
|
169 | 175 | $ hg in ../c |
|
170 | 176 | comparing with ../c |
|
171 | 177 | searching for changes |
|
172 | 178 | no changes found |
|
173 | 179 | [1] |
|
174 | 180 | |
|
175 | 181 | |
|
176 | 182 | Issue450: push -r warns about remote head creation even if no heads |
|
177 | 183 | will be created |
|
178 | 184 | |
|
179 | 185 | $ hg init ../e |
|
180 | 186 | $ hg push -r 0 ../e |
|
181 | 187 | pushing to ../e |
|
182 | 188 | searching for changes |
|
183 | 189 | adding changesets |
|
184 | 190 | adding manifests |
|
185 | 191 | adding file changes |
|
186 | 192 | added 1 changesets with 1 changes to 1 files |
|
187 | 193 | |
|
188 | 194 | $ hg push -r 1 ../e |
|
189 | 195 | pushing to ../e |
|
190 | 196 | searching for changes |
|
191 | 197 | adding changesets |
|
192 | 198 | adding manifests |
|
193 | 199 | adding file changes |
|
194 | 200 | added 1 changesets with 1 changes to 1 files |
|
195 | 201 | |
|
196 | 202 | $ cd .. |
|
197 | 203 | |
|
198 | 204 | |
|
199 | 205 | Issue736: named branches are not considered for detection of |
|
200 | 206 | unmerged heads in "hg push" |
|
201 | 207 | |
|
202 | 208 | $ hg init f |
|
203 | 209 | $ cd f |
|
204 | 210 | $ hg -q branch a |
|
205 | 211 | $ echo 0 > foo |
|
206 | 212 | $ hg -q ci -Am 0 |
|
207 | 213 | $ echo 1 > foo |
|
208 | 214 | $ hg -q ci -m 1 |
|
209 | 215 | $ hg -q up 0 |
|
210 | 216 | $ echo 2 > foo |
|
211 | 217 | $ hg -q ci -m 2 |
|
212 | 218 | $ hg -q up 0 |
|
213 | 219 | $ hg -q branch b |
|
214 | 220 | $ echo 3 > foo |
|
215 | 221 | $ hg -q ci -m 3 |
|
216 | 222 | $ cd .. |
|
217 | 223 | |
|
218 | 224 | $ hg -q clone f g |
|
219 | 225 | $ cd g |
|
220 | 226 | |
|
221 | 227 | Push on existing branch and new branch: |
|
222 | 228 | |
|
223 | 229 | $ hg -q up 1 |
|
224 | 230 | $ echo 4 > foo |
|
225 | 231 | $ hg -q ci -m 4 |
|
226 | 232 | $ hg -q up 0 |
|
227 | 233 | $ echo 5 > foo |
|
228 | 234 | $ hg -q branch c |
|
229 | 235 | $ hg -q ci -m 5 |
|
230 | 236 | |
|
231 | 237 | $ hg push ../f |
|
232 | 238 | pushing to ../f |
|
233 | 239 | searching for changes |
|
234 | 240 | abort: push creates new remote branches: c! |
|
235 | 241 | (use 'hg push --new-branch' to create new remote branches) |
|
236 | 242 | [255] |
|
237 | 243 | |
|
238 | 244 | $ hg push -r 4 -r 5 ../f |
|
239 | 245 | pushing to ../f |
|
240 | 246 | searching for changes |
|
241 | 247 | abort: push creates new remote branches: c! |
|
242 | 248 | (use 'hg push --new-branch' to create new remote branches) |
|
243 | 249 | [255] |
|
244 | 250 | |
|
245 | 251 | |
|
246 | 252 | Multiple new branches: |
|
247 | 253 | |
|
248 | 254 | $ hg -q branch d |
|
249 | 255 | $ echo 6 > foo |
|
250 | 256 | $ hg -q ci -m 6 |
|
251 | 257 | |
|
252 | 258 | $ hg push ../f |
|
253 | 259 | pushing to ../f |
|
254 | 260 | searching for changes |
|
255 | 261 | abort: push creates new remote branches: c, d! |
|
256 | 262 | (use 'hg push --new-branch' to create new remote branches) |
|
257 | 263 | [255] |
|
258 | 264 | |
|
259 | 265 | $ hg push -r 4 -r 6 ../f |
|
260 | 266 | pushing to ../f |
|
261 | 267 | searching for changes |
|
262 | 268 | abort: push creates new remote branches: c, d! |
|
263 | 269 | (use 'hg push --new-branch' to create new remote branches) |
|
264 | 270 | [255] |
|
265 | 271 | |
|
266 | 272 | $ cd ../g |
|
267 | 273 | |
|
268 | 274 | |
|
269 | 275 | Fail on multiple head push: |
|
270 | 276 | |
|
271 | 277 | $ hg -q up 1 |
|
272 | 278 | $ echo 7 > foo |
|
273 | 279 | $ hg -q ci -m 7 |
|
274 | 280 | |
|
275 | 281 | $ hg push -r 4 -r 7 ../f |
|
276 | 282 | pushing to ../f |
|
277 | 283 | searching for changes |
|
278 | 284 | abort: push creates new remote head 0b715ef6ff8f on branch 'a'! |
|
279 | 285 | (merge or see "hg help push" for details about pushing new heads) |
|
280 | 286 | [255] |
|
281 | 287 | |
|
282 | 288 | Push replacement head on existing branches: |
|
283 | 289 | |
|
284 | 290 | $ hg -q up 3 |
|
285 | 291 | $ echo 8 > foo |
|
286 | 292 | $ hg -q ci -m 8 |
|
287 | 293 | |
|
288 | 294 | $ hg push -r 7 -r 8 ../f |
|
289 | 295 | pushing to ../f |
|
290 | 296 | searching for changes |
|
291 | 297 | adding changesets |
|
292 | 298 | adding manifests |
|
293 | 299 | adding file changes |
|
294 | 300 | added 2 changesets with 2 changes to 1 files |
|
295 | 301 | |
|
296 | 302 | |
|
297 | 303 | Merge of branch a to other branch b followed by unrelated push |
|
298 | 304 | on branch a: |
|
299 | 305 | |
|
300 | 306 | $ hg -q up 7 |
|
301 | 307 | $ HGMERGE=true hg -q merge 8 |
|
302 | 308 | $ hg -q ci -m 9 |
|
303 | 309 | $ hg -q up 8 |
|
304 | 310 | $ echo 10 > foo |
|
305 | 311 | $ hg -q ci -m 10 |
|
306 | 312 | |
|
307 | 313 | $ hg push -r 9 ../f |
|
308 | 314 | pushing to ../f |
|
309 | 315 | searching for changes |
|
310 | 316 | adding changesets |
|
311 | 317 | adding manifests |
|
312 | 318 | adding file changes |
|
313 | 319 | added 1 changesets with 1 changes to 1 files (-1 heads) |
|
314 | 320 | |
|
315 | 321 | $ hg push -r 10 ../f |
|
316 | 322 | pushing to ../f |
|
317 | 323 | searching for changes |
|
318 | 324 | adding changesets |
|
319 | 325 | adding manifests |
|
320 | 326 | adding file changes |
|
321 | 327 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
322 | 328 | |
|
323 | 329 | |
|
324 | 330 | Cheating the counting algorithm: |
|
325 | 331 | |
|
326 | 332 | $ hg -q up 9 |
|
327 | 333 | $ HGMERGE=true hg -q merge 2 |
|
328 | 334 | $ hg -q ci -m 11 |
|
329 | 335 | $ hg -q up 1 |
|
330 | 336 | $ echo 12 > foo |
|
331 | 337 | $ hg -q ci -m 12 |
|
332 | 338 | |
|
333 | 339 | $ hg push -r 11 -r 12 ../f |
|
334 | 340 | pushing to ../f |
|
335 | 341 | searching for changes |
|
336 | 342 | adding changesets |
|
337 | 343 | adding manifests |
|
338 | 344 | adding file changes |
|
339 | 345 | added 2 changesets with 2 changes to 1 files |
|
340 | 346 | |
|
341 | 347 | |
|
342 | 348 | Failed push of new named branch: |
|
343 | 349 | |
|
344 | 350 | $ echo 12 > foo |
|
345 | 351 | $ hg -q ci -m 12a |
|
346 | 352 | [1] |
|
347 | 353 | $ hg -q up 11 |
|
348 | 354 | $ echo 13 > foo |
|
349 | 355 | $ hg -q branch e |
|
350 | 356 | $ hg -q ci -m 13d |
|
351 | 357 | |
|
352 | 358 | $ hg push -r 12 -r 13 ../f |
|
353 | 359 | pushing to ../f |
|
354 | 360 | searching for changes |
|
355 | 361 | abort: push creates new remote branches: e! |
|
356 | 362 | (use 'hg push --new-branch' to create new remote branches) |
|
357 | 363 | [255] |
|
358 | 364 | |
|
359 | 365 | |
|
360 | 366 | Using --new-branch to push new named branch: |
|
361 | 367 | |
|
362 | 368 | $ hg push --new-branch -r 12 -r 13 ../f |
|
363 | 369 | pushing to ../f |
|
364 | 370 | searching for changes |
|
365 | 371 | adding changesets |
|
366 | 372 | adding manifests |
|
367 | 373 | adding file changes |
|
368 | 374 | added 1 changesets with 1 changes to 1 files |
|
369 | 375 | |
|
370 | 376 | Pushing multi headed new branch: |
|
371 | 377 | |
|
372 | 378 | $ echo 14 > foo |
|
373 | 379 | $ hg -q branch f |
|
374 | 380 | $ hg -q ci -m 14 |
|
375 | 381 | $ echo 15 > foo |
|
376 | 382 | $ hg -q ci -m 15 |
|
377 | 383 | $ hg -q up 14 |
|
378 | 384 | $ echo 16 > foo |
|
379 | 385 | $ hg -q ci -m 16 |
|
380 | 386 | $ hg push --branch f --new-branch ../f |
|
381 | 387 | pushing to ../f |
|
382 | 388 | searching for changes |
|
383 | 389 | abort: push creates new branch 'f' with multiple heads |
|
384 | 390 | (merge or see "hg help push" for details about pushing new heads) |
|
385 | 391 | [255] |
|
386 | 392 | $ hg push --branch f --new-branch --force ../f |
|
387 | 393 | pushing to ../f |
|
388 | 394 | searching for changes |
|
389 | 395 | adding changesets |
|
390 | 396 | adding manifests |
|
391 | 397 | adding file changes |
|
392 | 398 | added 3 changesets with 3 changes to 1 files (+1 heads) |
|
393 | 399 | |
|
394 | 400 | Checking prepush logic does not allow silently pushing |
|
395 | 401 | multiple new heads but also doesn't report too many heads: |
|
396 | 402 | |
|
397 | 403 | $ cd .. |
|
398 | 404 | $ hg init h |
|
399 | 405 | $ echo init > h/init |
|
400 | 406 | $ hg -R h ci -Am init |
|
401 | 407 | adding init |
|
402 | 408 | $ echo a > h/a |
|
403 | 409 | $ hg -R h ci -Am a |
|
404 | 410 | adding a |
|
405 | 411 | $ hg clone h i |
|
406 | 412 | updating to branch default |
|
407 | 413 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
408 | 414 | $ hg -R h up 0 |
|
409 | 415 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
410 | 416 | $ echo b > h/b |
|
411 | 417 | $ hg -R h ci -Am b |
|
412 | 418 | adding b |
|
413 | 419 | created new head |
|
414 | 420 | $ hg -R i up 0 |
|
415 | 421 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
416 | 422 | $ echo c > i/c |
|
417 | 423 | $ hg -R i ci -Am c |
|
418 | 424 | adding c |
|
419 | 425 | created new head |
|
420 | 426 | |
|
421 | 427 | $ for i in `python $TESTDIR/seq.py 3`; do hg -R h up -q 0; echo $i > h/b; hg -R h ci -qAm$i; done |
|
422 | 428 | |
|
423 | 429 | $ hg -R i push h |
|
424 | 430 | pushing to h |
|
425 | 431 | searching for changes |
|
426 | 432 | remote has heads on branch 'default' that are not known locally: 534543e22c29 764f8ec07b96 afe7cc7679f5 ce4212fc8847 |
|
427 | 433 | abort: push creates new remote head 97bd0c84d346! |
|
428 | 434 | (pull and merge or see "hg help push" for details about pushing new heads) |
|
429 | 435 | [255] |
|
430 | 436 | $ hg -R h up -q 0; echo x > h/b; hg -R h ci -qAmx |
|
431 | 437 | $ hg -R i push h |
|
432 | 438 | pushing to h |
|
433 | 439 | searching for changes |
|
434 | 440 | remote has heads on branch 'default' that are not known locally: 18ddb72c4590 534543e22c29 764f8ec07b96 afe7cc7679f5 and 1 others |
|
435 | 441 | abort: push creates new remote head 97bd0c84d346! |
|
436 | 442 | (pull and merge or see "hg help push" for details about pushing new heads) |
|
437 | 443 | [255] |
|
438 | 444 | $ hg -R i push h -v |
|
439 | 445 | pushing to h |
|
440 | 446 | searching for changes |
|
441 | 447 | remote has heads on branch 'default' that are not known locally: 18ddb72c4590 534543e22c29 764f8ec07b96 afe7cc7679f5 ce4212fc8847 |
|
442 | 448 | new remote heads on branch 'default': |
|
443 | 449 | 97bd0c84d346 |
|
444 | 450 | abort: push creates new remote head 97bd0c84d346! |
|
445 | 451 | (pull and merge or see "hg help push" for details about pushing new heads) |
|
446 | 452 | [255] |
|
447 | 453 | |
|
448 | 454 | |
|
449 | 455 | Check prepush logic with merged branches: |
|
450 | 456 | |
|
451 | 457 | $ hg init j |
|
452 | 458 | $ hg -R j branch a |
|
453 | 459 | marked working directory as branch a |
|
454 | 460 | (branches are permanent and global, did you want a bookmark?) |
|
455 | 461 | $ echo init > j/foo |
|
456 | 462 | $ hg -R j ci -Am init |
|
457 | 463 | adding foo |
|
458 | 464 | $ hg clone j k |
|
459 | 465 | updating to branch a |
|
460 | 466 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
461 | 467 | $ echo a1 > j/foo |
|
462 | 468 | $ hg -R j ci -m a1 |
|
463 | 469 | $ hg -R k branch b |
|
464 | 470 | marked working directory as branch b |
|
465 | 471 | $ echo b > k/foo |
|
466 | 472 | $ hg -R k ci -m b |
|
467 | 473 | $ hg -R k up 0 |
|
468 | 474 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
469 | 475 | |
|
470 | 476 | $ hg -R k merge b |
|
471 | 477 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
472 | 478 | (branch merge, don't forget to commit) |
|
473 | 479 | |
|
474 | 480 | $ hg -R k ci -m merge |
|
475 | 481 | |
|
476 | 482 | $ hg -R k push -r a j |
|
477 | 483 | pushing to j |
|
478 | 484 | searching for changes |
|
479 | 485 | abort: push creates new remote branches: b! |
|
480 | 486 | (use 'hg push --new-branch' to create new remote branches) |
|
481 | 487 | [255] |
|
482 | 488 | |
|
483 | 489 | |
|
484 | 490 | Prepush -r should not allow you to sneak in new heads: |
|
485 | 491 | |
|
486 | 492 | $ hg init l |
|
487 | 493 | $ cd l |
|
488 | 494 | $ echo a >> foo |
|
489 | 495 | $ hg -q add foo |
|
490 | 496 | $ hg -q branch a |
|
491 | 497 | $ hg -q ci -ma |
|
492 | 498 | $ hg -q up null |
|
493 | 499 | $ echo a >> foo |
|
494 | 500 | $ hg -q add foo |
|
495 | 501 | $ hg -q branch b |
|
496 | 502 | $ hg -q ci -mb |
|
497 | 503 | $ cd .. |
|
498 | 504 | $ hg -q clone l m -u a |
|
499 | 505 | $ cd m |
|
500 | 506 | $ hg -q merge b |
|
501 | 507 | $ hg -q ci -mmb |
|
502 | 508 | $ hg -q up 0 |
|
503 | 509 | $ echo a >> foo |
|
504 | 510 | $ hg -q ci -ma2 |
|
505 | 511 | $ hg -q up 2 |
|
506 | 512 | $ echo a >> foo |
|
507 | 513 | $ hg -q branch -f b |
|
508 | 514 | $ hg -q ci -mb2 |
|
509 | 515 | $ hg -q merge 3 |
|
510 | 516 | $ hg -q ci -mma |
|
511 | 517 | |
|
512 | 518 | $ hg push ../l -b b |
|
513 | 519 | pushing to ../l |
|
514 | 520 | searching for changes |
|
515 | 521 | abort: push creates new remote head 451211cc22b0 on branch 'a'! |
|
516 | 522 | (merge or see "hg help push" for details about pushing new heads) |
|
517 | 523 | [255] |
|
518 | 524 | |
|
519 | 525 | $ cd .. |
|
520 | 526 | |
|
521 | 527 | |
|
522 | 528 | Check prepush with new branch head on former topo non-head: |
|
523 | 529 | |
|
524 | 530 | $ hg init n |
|
525 | 531 | $ cd n |
|
526 | 532 | $ hg branch A |
|
527 | 533 | marked working directory as branch A |
|
528 | 534 | (branches are permanent and global, did you want a bookmark?) |
|
529 | 535 | $ echo a >a |
|
530 | 536 | $ hg ci -Ama |
|
531 | 537 | adding a |
|
532 | 538 | $ hg branch B |
|
533 | 539 | marked working directory as branch B |
|
534 | 540 | $ echo b >b |
|
535 | 541 | $ hg ci -Amb |
|
536 | 542 | adding b |
|
537 | 543 | |
|
538 | 544 | b is now branch head of B, and a topological head |
|
539 | 545 | a is now branch head of A, but not a topological head |
|
540 | 546 | |
|
541 | 547 | $ hg clone . inner |
|
542 | 548 | updating to branch B |
|
543 | 549 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
544 | 550 | $ cd inner |
|
545 | 551 | $ hg up B |
|
546 | 552 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
547 | 553 | $ echo b1 >b1 |
|
548 | 554 | $ hg ci -Amb1 |
|
549 | 555 | adding b1 |
|
550 | 556 | |
|
551 | 557 | in the clone b1 is now the head of B |
|
552 | 558 | |
|
553 | 559 | $ cd .. |
|
554 | 560 | $ hg up 0 |
|
555 | 561 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
556 | 562 | $ echo a2 >a2 |
|
557 | 563 | $ hg ci -Ama2 |
|
558 | 564 | adding a2 |
|
559 | 565 | |
|
560 | 566 | a2 is now the new branch head of A, and a new topological head |
|
561 | 567 | it replaces a former inner branch head, so it should at most warn about |
|
562 | 568 | A, not B |
|
563 | 569 | |
|
564 | 570 | glog of local: |
|
565 | 571 | |
|
566 | 572 | $ hg log -G --template "{rev}: {branches} {desc}\n" |
|
567 | 573 | @ 2: A a2 |
|
568 | 574 | | |
|
569 | 575 | | o 1: B b |
|
570 | 576 | |/ |
|
571 | 577 | o 0: A a |
|
572 | 578 | |
|
573 | 579 | glog of remote: |
|
574 | 580 | |
|
575 | 581 | $ hg log -G -R inner --template "{rev}: {branches} {desc}\n" |
|
576 | 582 | @ 2: B b1 |
|
577 | 583 | | |
|
578 | 584 | o 1: B b |
|
579 | 585 | | |
|
580 | 586 | o 0: A a |
|
581 | 587 | |
|
582 | 588 | outgoing: |
|
583 | 589 | |
|
584 | 590 | $ hg out inner --template "{rev}: {branches} {desc}\n" |
|
585 | 591 | comparing with inner |
|
586 | 592 | searching for changes |
|
587 | 593 | 2: A a2 |
|
588 | 594 | |
|
589 | 595 | $ hg push inner |
|
590 | 596 | pushing to inner |
|
591 | 597 | searching for changes |
|
592 | 598 | adding changesets |
|
593 | 599 | adding manifests |
|
594 | 600 | adding file changes |
|
595 | 601 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
596 | 602 | |
|
597 | 603 | $ cd .. |
|
598 | 604 | |
|
599 | 605 | |
|
600 | 606 | Check prepush with new branch head on former topo head: |
|
601 | 607 | |
|
602 | 608 | $ hg init o |
|
603 | 609 | $ cd o |
|
604 | 610 | $ hg branch A |
|
605 | 611 | marked working directory as branch A |
|
606 | 612 | (branches are permanent and global, did you want a bookmark?) |
|
607 | 613 | $ echo a >a |
|
608 | 614 | $ hg ci -Ama |
|
609 | 615 | adding a |
|
610 | 616 | $ hg branch B |
|
611 | 617 | marked working directory as branch B |
|
612 | 618 | $ echo b >b |
|
613 | 619 | $ hg ci -Amb |
|
614 | 620 | adding b |
|
615 | 621 | |
|
616 | 622 | b is now branch head of B, and a topological head |
|
617 | 623 | |
|
618 | 624 | $ hg up 0 |
|
619 | 625 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
620 | 626 | $ echo a1 >a1 |
|
621 | 627 | $ hg ci -Ama1 |
|
622 | 628 | adding a1 |
|
623 | 629 | |
|
624 | 630 | a1 is now branch head of A, and a topological head |
|
625 | 631 | |
|
626 | 632 | $ hg clone . inner |
|
627 | 633 | updating to branch A |
|
628 | 634 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
629 | 635 | $ cd inner |
|
630 | 636 | $ hg up B |
|
631 | 637 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
632 | 638 | $ echo b1 >b1 |
|
633 | 639 | $ hg ci -Amb1 |
|
634 | 640 | adding b1 |
|
635 | 641 | |
|
636 | 642 | in the clone b1 is now the head of B |
|
637 | 643 | |
|
638 | 644 | $ cd .. |
|
639 | 645 | $ echo a2 >a2 |
|
640 | 646 | $ hg ci -Ama2 |
|
641 | 647 | adding a2 |
|
642 | 648 | |
|
643 | 649 | a2 is now the new branch head of A, and a topological head |
|
644 | 650 | it replaces a former topological and branch head, so this should not warn |
|
645 | 651 | |
|
646 | 652 | glog of local: |
|
647 | 653 | |
|
648 | 654 | $ hg log -G --template "{rev}: {branches} {desc}\n" |
|
649 | 655 | @ 3: A a2 |
|
650 | 656 | | |
|
651 | 657 | o 2: A a1 |
|
652 | 658 | | |
|
653 | 659 | | o 1: B b |
|
654 | 660 | |/ |
|
655 | 661 | o 0: A a |
|
656 | 662 | |
|
657 | 663 | glog of remote: |
|
658 | 664 | |
|
659 | 665 | $ hg log -G -R inner --template "{rev}: {branches} {desc}\n" |
|
660 | 666 | @ 3: B b1 |
|
661 | 667 | | |
|
662 | 668 | | o 2: A a1 |
|
663 | 669 | | | |
|
664 | 670 | o | 1: B b |
|
665 | 671 | |/ |
|
666 | 672 | o 0: A a |
|
667 | 673 | |
|
668 | 674 | outgoing: |
|
669 | 675 | |
|
670 | 676 | $ hg out inner --template "{rev}: {branches} {desc}\n" |
|
671 | 677 | comparing with inner |
|
672 | 678 | searching for changes |
|
673 | 679 | 3: A a2 |
|
674 | 680 | |
|
675 | 681 | $ hg push inner |
|
676 | 682 | pushing to inner |
|
677 | 683 | searching for changes |
|
678 | 684 | adding changesets |
|
679 | 685 | adding manifests |
|
680 | 686 | adding file changes |
|
681 | 687 | added 1 changesets with 1 changes to 1 files |
|
682 | 688 | |
|
683 | 689 | $ cd .. |
|
684 | 690 | |
|
685 | 691 | |
|
686 | 692 | Check prepush with new branch head and new child of former branch head |
|
687 | 693 | but child is on different branch: |
|
688 | 694 | |
|
689 | 695 | $ hg init p |
|
690 | 696 | $ cd p |
|
691 | 697 | $ hg branch A |
|
692 | 698 | marked working directory as branch A |
|
693 | 699 | (branches are permanent and global, did you want a bookmark?) |
|
694 | 700 | $ echo a0 >a |
|
695 | 701 | $ hg ci -Ama0 |
|
696 | 702 | adding a |
|
697 | 703 | $ echo a1 >a |
|
698 | 704 | $ hg ci -ma1 |
|
699 | 705 | $ hg up null |
|
700 | 706 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
701 | 707 | $ hg branch B |
|
702 | 708 | marked working directory as branch B |
|
703 | 709 | $ echo b0 >b |
|
704 | 710 | $ hg ci -Amb0 |
|
705 | 711 | adding b |
|
706 | 712 | $ echo b1 >b |
|
707 | 713 | $ hg ci -mb1 |
|
708 | 714 | |
|
709 | 715 | $ hg clone . inner |
|
710 | 716 | updating to branch B |
|
711 | 717 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
712 | 718 | |
|
713 | 719 | $ hg up A |
|
714 | 720 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
715 | 721 | $ hg branch -f B |
|
716 | 722 | marked working directory as branch B |
|
717 | 723 | $ echo a3 >a |
|
718 | 724 | $ hg ci -ma3 |
|
719 | 725 | created new head |
|
720 | 726 | $ hg up 3 |
|
721 | 727 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
722 | 728 | $ hg branch -f A |
|
723 | 729 | marked working directory as branch A |
|
724 | 730 | $ echo b3 >b |
|
725 | 731 | $ hg ci -mb3 |
|
726 | 732 | created new head |
|
727 | 733 | |
|
728 | 734 | glog of local: |
|
729 | 735 | |
|
730 | 736 | $ hg log -G --template "{rev}: {branches} {desc}\n" |
|
731 | 737 | @ 5: A b3 |
|
732 | 738 | | |
|
733 | 739 | | o 4: B a3 |
|
734 | 740 | | | |
|
735 | 741 | o | 3: B b1 |
|
736 | 742 | | | |
|
737 | 743 | o | 2: B b0 |
|
738 | 744 | / |
|
739 | 745 | o 1: A a1 |
|
740 | 746 | | |
|
741 | 747 | o 0: A a0 |
|
742 | 748 | |
|
743 | 749 | glog of remote: |
|
744 | 750 | |
|
745 | 751 | $ hg log -G -R inner --template "{rev}: {branches} {desc}\n" |
|
746 | 752 | @ 3: B b1 |
|
747 | 753 | | |
|
748 | 754 | o 2: B b0 |
|
749 | 755 | |
|
750 | 756 | o 1: A a1 |
|
751 | 757 | | |
|
752 | 758 | o 0: A a0 |
|
753 | 759 | |
|
754 | 760 | outgoing: |
|
755 | 761 | |
|
756 | 762 | $ hg out inner --template "{rev}: {branches} {desc}\n" |
|
757 | 763 | comparing with inner |
|
758 | 764 | searching for changes |
|
759 | 765 | 4: B a3 |
|
760 | 766 | 5: A b3 |
|
761 | 767 | |
|
762 | 768 | $ hg push inner |
|
763 | 769 | pushing to inner |
|
764 | 770 | searching for changes |
|
765 | 771 | abort: push creates new remote head 7d0f4fb6cf04 on branch 'A'! |
|
766 | 772 | (merge or see "hg help push" for details about pushing new heads) |
|
767 | 773 | [255] |
|
768 | 774 | |
|
769 | 775 | $ hg push inner -r4 -r5 |
|
770 | 776 | pushing to inner |
|
771 | 777 | searching for changes |
|
772 | 778 | abort: push creates new remote head 7d0f4fb6cf04 on branch 'A'! |
|
773 | 779 | (merge or see "hg help push" for details about pushing new heads) |
|
774 | 780 | [255] |
|
775 | 781 | |
|
776 | 782 | $ hg in inner |
|
777 | 783 | comparing with inner |
|
778 | 784 | searching for changes |
|
779 | 785 | no changes found |
|
780 | 786 | [1] |
|
781 | 787 | |
|
782 | 788 | $ cd .. |
General Comments 0
You need to be logged in to leave comments.
Login now