68 $ echo 'Fix fix fix.' > file1 |
67 $ echo 'Fix fix fix.' > file1 |
69 $ hg amend -m'fix bug 37' |
68 $ hg amend -m'fix bug 37' |
70 |
69 |
71 Figure SG02 |
70 Figure SG02 |
72 $ hg shortlog --hidden -G |
71 $ hg shortlog --hidden -G |
73 @ 2:60ffde5765c5 draft fix bug 37 |
72 @ 3:60ffde5765c5 draft fix bug 37 |
74 | |
73 | |
|
74 | x 2:2a039763c0f4 draft temporary amend commit for f6490818a721 |
|
75 | | |
75 | x 1:f6490818a721 draft prelim change |
76 | x 1:f6490818a721 draft prelim change |
76 |/ |
77 |/ |
77 o 0:0dc9c9f6ab91 public create new project |
78 o 0:0dc9c9f6ab91 public create new project |
78 |
79 |
79 Pull into dev-repo: obsolescence markers are transferred, but not |
80 Pull into dev-repo: obsolescence markers are transferred, but not |
84 searching for changes |
85 searching for changes |
85 adding changesets |
86 adding changesets |
86 adding manifests |
87 adding manifests |
87 adding file changes |
88 adding file changes |
88 added 1 changesets with 1 changes to 1 files (+1 heads) |
89 added 1 changesets with 1 changes to 1 files (+1 heads) |
89 1 new obsolescence markers |
90 2 new obsolescence markers |
90 obsoleted 1 changesets |
91 obsoleted 1 changesets |
91 new changesets 60ffde5765c5 |
|
92 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
92 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
93 updated to "60ffde5765c5: fix bug 37" |
93 updated to "60ffde5765c5: fix bug 37" |
94 1 other heads for branch "default" |
94 1 other heads for branch "default" |
95 |
95 |
96 Figure SG03 |
96 Figure SG03 |
121 $ hg update |
123 $ hg update |
122 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
124 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
123 updated to "de6151c48e1c: fix bug 37" |
125 updated to "de6151c48e1c: fix bug 37" |
124 1 other heads for branch "default" |
126 1 other heads for branch "default" |
125 $ hg shortlog --hidden -G |
127 $ hg shortlog --hidden -G |
126 @ 3:de6151c48e1c draft fix bug 37 |
128 @ 4:de6151c48e1c draft fix bug 37 |
127 | |
129 | |
128 | x 2:60ffde5765c5 draft fix bug 37 |
130 | x 3:60ffde5765c5 draft fix bug 37 |
129 |/ |
131 |/ |
|
132 | x 2:2a039763c0f4 draft temporary amend commit for f6490818a721 |
|
133 | | |
130 | x 1:f6490818a721 draft prelim change |
134 | x 1:f6490818a721 draft prelim change |
131 |/ |
135 |/ |
132 o 0:0dc9c9f6ab91 public create new project |
136 o 0:0dc9c9f6ab91 public create new project |
133 |
137 |
134 This bug fix is finished. We can push it to the public repository. |
138 This bug fix is finished. We can push it to the public repository. |
137 searching for changes |
141 searching for changes |
138 adding changesets |
142 adding changesets |
139 adding manifests |
143 adding manifests |
140 adding file changes |
144 adding file changes |
141 added 1 changesets with 1 changes to 1 files |
145 added 1 changesets with 1 changes to 1 files |
142 2 new obsolescence markers |
146 4 new obsolescence markers |
143 |
147 |
144 Now that the fix is public, we cannot amend it any more. |
148 Now that the fix is public, we cannot amend it any more. |
145 $ hg amend -m 'fix bug 37' |
149 $ hg amend -m 'fix bug 37' |
146 abort: cannot amend public changesets: de6151c48e1c |
150 abort: cannot amend public changesets: de6151c48e1c |
147 (see 'hg help phases' for details) |
151 (see 'hg help phases' for details) |
153 | |
157 | |
154 o 0:0dc9c9f6ab91 public create new project |
158 o 0:0dc9c9f6ab91 public create new project |
155 |
159 |
156 Oops, still have draft changesets in dev-repo: push the phase change there. |
160 Oops, still have draft changesets in dev-repo: push the phase change there. |
157 $ hg -R ../dev-repo shortlog -r 'draft()' |
161 $ hg -R ../dev-repo shortlog -r 'draft()' |
158 3:de6151c48e1c draft fix bug 37 |
162 4:de6151c48e1c draft fix bug 37 |
159 $ hg push ../dev-repo |
163 $ hg push ../dev-repo |
160 pushing to ../dev-repo |
164 pushing to ../dev-repo |
161 searching for changes |
165 searching for changes |
162 no changes found |
166 no changes found |
163 [1] |
167 [1] |
251 remote has heads on branch 'default' that are not known locally: cbdfbd5a5db2 |
255 remote has heads on branch 'default' that are not known locally: cbdfbd5a5db2 |
252 adding changesets |
256 adding changesets |
253 adding manifests |
257 adding manifests |
254 adding file changes |
258 adding file changes |
255 added 1 changesets with 1 changes to 1 files (+1 heads) |
259 added 1 changesets with 1 changes to 1 files (+1 heads) |
256 1 new obsolescence markers |
260 2 new obsolescence markers |
257 obsoleted 1 changesets |
261 obsoleted 1 changesets |
258 updating bookmark featureX |
262 updating bookmark featureX |
259 |
263 |
260 Bob receives second review, amends, and pushes to public: |
264 Bob receives second review, amends, and pushes to public: |
261 this time, he's sure he got it right! |
265 this time, he's sure he got it right! |
266 searching for changes |
270 searching for changes |
267 adding changesets |
271 adding changesets |
268 adding manifests |
272 adding manifests |
269 adding file changes |
273 adding file changes |
270 added 1 changesets with 1 changes to 1 files |
274 added 1 changesets with 1 changes to 1 files |
271 2 new obsolescence markers |
275 4 new obsolescence markers |
272 $ hg -R ../public bookmarks |
276 $ hg -R ../public bookmarks |
273 no bookmarks set |
277 no bookmarks set |
274 $ hg push ../review |
278 $ hg push ../review |
275 pushing to ../review |
279 pushing to ../review |
276 searching for changes |
280 searching for changes |
277 remote has heads on branch 'default' that are not known locally: cbdfbd5a5db2 |
281 remote has heads on branch 'default' that are not known locally: cbdfbd5a5db2 |
278 adding changesets |
282 adding changesets |
279 adding manifests |
283 adding manifests |
280 adding file changes |
284 adding file changes |
281 added 1 changesets with 1 changes to 1 files (+1 heads) |
285 added 1 changesets with 1 changes to 1 files (+1 heads) |
282 1 new obsolescence markers |
286 2 new obsolescence markers |
283 obsoleted 1 changesets |
287 obsoleted 1 changesets |
284 updating bookmark featureX |
288 updating bookmark featureX |
285 $ hg -R ../review bookmarks |
289 $ hg -R ../review bookmarks |
286 bug15 3:cbdfbd5a5db2 |
290 bug15 3:cbdfbd5a5db2 |
287 featureX 6:540ba8f317e6 |
291 featureX 6:540ba8f317e6 |
327 |
331 |
328 Meantime, Alice is back from lunch. While she was away, Bob approved |
332 Meantime, Alice is back from lunch. While she was away, Bob approved |
329 her change, so now she can publish it. |
333 her change, so now she can publish it. |
330 $ cd ../alice |
334 $ cd ../alice |
331 $ hg --hidden shortlog -G -r 1:: |
335 $ hg --hidden shortlog -G -r 1:: |
332 @ 3:cbdfbd5a5db2 draft fix bug 15 (v2) |
336 @ 4:cbdfbd5a5db2 draft fix bug 15 (v2) |
333 | |
337 | |
|
338 | x 3:55dd95168a35 draft temporary amend commit for f91e97234c2b |
|
339 | | |
334 | x 2:f91e97234c2b draft fix bug 15 (v1) |
340 | x 2:f91e97234c2b draft fix bug 15 (v1) |
335 |/ |
341 |/ |
336 o 1:de6151c48e1c public fix bug 37 |
342 o 1:de6151c48e1c public fix bug 37 |
337 | |
343 | |
338 ~ |
344 ~ |
339 $ hg outgoing -q ../public |
345 $ hg outgoing -q ../public |
340 3:cbdfbd5a5db2 |
346 4:cbdfbd5a5db2 |
341 $ hg push ../public |
347 $ hg push ../public |
342 pushing to ../public |
348 pushing to ../public |
343 searching for changes |
349 searching for changes |
344 remote has heads on branch 'default' that are not known locally: 540ba8f317e6 |
350 remote has heads on branch 'default' that are not known locally: 540ba8f317e6 |
345 abort: push creates new remote head cbdfbd5a5db2 with bookmark 'bug15'! |
351 abort: push creates new remote head cbdfbd5a5db2 with bookmark 'bug15'! |
350 searching for changes |
356 searching for changes |
351 adding changesets |
357 adding changesets |
352 adding manifests |
358 adding manifests |
353 adding file changes |
359 adding file changes |
354 added 1 changesets with 1 changes to 1 files (+1 heads) |
360 added 1 changesets with 1 changes to 1 files (+1 heads) |
355 2 new obsolescence markers |
361 4 new obsolescence markers |
356 new changesets 540ba8f317e6 |
|
357 (run 'hg heads' to see heads, 'hg merge' to merge) |
362 (run 'hg heads' to see heads, 'hg merge' to merge) |
358 $ hg log -G -q -r 'head()' |
363 $ hg log -G -q -r 'head()' |
359 o 4:540ba8f317e6 |
364 o 5:540ba8f317e6 |
360 | |
365 | |
361 ~ |
366 ~ |
362 @ 3:cbdfbd5a5db2 |
367 @ 4:cbdfbd5a5db2 |
363 | |
368 | |
364 ~ |
369 ~ |
365 $ hg --hidden shortlog -G -r 1:: |
370 $ hg --hidden shortlog -G -r 1:: |
366 o 4:540ba8f317e6 public implement feature X (v3) |
371 o 5:540ba8f317e6 public implement feature X (v3) |
367 | |
372 | |
368 | @ 3:cbdfbd5a5db2 draft fix bug 15 (v2) |
373 | @ 4:cbdfbd5a5db2 draft fix bug 15 (v2) |
369 |/ |
374 |/ |
|
375 | x 3:55dd95168a35 draft temporary amend commit for f91e97234c2b |
|
376 | | |
370 | x 2:f91e97234c2b draft fix bug 15 (v1) |
377 | x 2:f91e97234c2b draft fix bug 15 (v1) |
371 |/ |
378 |/ |
372 o 1:de6151c48e1c public fix bug 37 |
379 o 1:de6151c48e1c public fix bug 37 |
373 | |
380 | |
374 ~ |
381 ~ |
375 |
382 |
376 Alice rebases her draft changeset on top of Bob's public changeset and |
383 Alice rebases her draft changeset on top of Bob's public changeset and |
377 publishes the result. |
384 publishes the result. |
378 $ hg rebase -d 5 |
385 $ hg rebase -d 5 |
379 rebasing 3:cbdfbd5a5db2 "fix bug 15 (v2)" (bug15) |
386 rebasing 4:cbdfbd5a5db2 "fix bug 15 (v2)" (bug15) |
380 $ hg push ../public |
387 $ hg push ../public |
381 pushing to ../public |
388 pushing to ../public |
382 searching for changes |
389 searching for changes |
383 adding changesets |
390 adding changesets |
384 adding manifests |
391 adding manifests |
385 adding file changes |
392 adding file changes |
386 added 1 changesets with 1 changes to 1 files |
393 added 1 changesets with 1 changes to 1 files |
387 2 new obsolescence markers |
394 3 new obsolescence markers |
388 $ hg push ../review |
395 $ hg push ../review |
389 pushing to ../review |
396 pushing to ../review |
390 searching for changes |
397 searching for changes |
391 adding changesets |
398 adding changesets |
392 adding manifests |
399 adding manifests |
455 searching for changes |
462 searching for changes |
456 adding changesets |
463 adding changesets |
457 adding manifests |
464 adding manifests |
458 adding file changes |
465 adding file changes |
459 added 1 changesets with 1 changes to 1 files |
466 added 1 changesets with 1 changes to 1 files |
460 new changesets 2fe6c4bd32d0 |
|
461 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
467 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
462 $ echo 'better fix (alice)' >> file1 |
468 $ echo 'better fix (alice)' >> file1 |
463 $ hg amend -u alice -m 'fix bug 24 (v2 by alice)' |
469 $ hg amend -u alice -m 'fix bug 24 (v2 by alice)' |
464 |
470 |
465 Bob implements a better fix of his own:: |
471 Bob implements a better fix of his own:: |
466 |
472 |
467 $ cd ../bob |
473 $ cd ../bob |
468 $ echo 'better fix (bob)' >> file1 |
474 $ echo 'better fix (bob)' >> file1 |
469 $ hg amend -u bob -m 'fix bug 24 (v2 by bob)' |
475 $ hg amend -u bob -m 'fix bug 24 (v2 by bob)' |
470 $ hg --hidden shortlog -G -r 3:: |
476 $ hg --hidden shortlog -G -r 3:: |
471 @ 5:a360947f6faf draft fix bug 24 (v2 by bob) |
477 @ 6:a360947f6faf draft fix bug 24 (v2 by bob) |
472 | |
478 | |
|
479 | x 5:3466c7f5a149 draft temporary amend commit for 2fe6c4bd32d0 |
|
480 | | |
473 | x 4:2fe6c4bd32d0 draft fix bug 24 (v1) |
481 | x 4:2fe6c4bd32d0 draft fix bug 24 (v1) |
474 |/ |
482 |/ |
475 o 3:a06ec1bf97bd public fix bug 15 (v2) |
483 o 3:a06ec1bf97bd public fix bug 15 (v2) |
476 | |
484 | |
477 ~ |
485 ~ |
482 searching for changes |
490 searching for changes |
483 adding changesets |
491 adding changesets |
484 adding manifests |
492 adding manifests |
485 adding file changes |
493 adding file changes |
486 added 1 changesets with 1 changes to 1 files (+1 heads) |
494 added 1 changesets with 1 changes to 1 files (+1 heads) |
487 1 new obsolescence markers |
495 2 new obsolescence markers |
488 new changesets e3f99ce9d9cd |
|
489 (run 'hg heads' to see heads, 'hg merge' to merge) |
496 (run 'hg heads' to see heads, 'hg merge' to merge) |
490 2 new content-divergent changesets |
497 2 new divergent changesets |
491 |
498 |
492 Figure SG09: multiple heads! divergence! oh my! |
499 Figure SG09: multiple heads! divergence! oh my! |
493 $ hg --hidden shortlog -G -r 3:: |
500 $ hg --hidden shortlog -G -r 3:: |
494 o 6:e3f99ce9d9cd draft fix bug 24 (v2 by alice) |
501 o 7:e3f99ce9d9cd draft fix bug 24 (v2 by alice) |
495 | |
502 | |
496 | @ 5:a360947f6faf draft fix bug 24 (v2 by bob) |
503 | @ 6:a360947f6faf draft fix bug 24 (v2 by bob) |
497 |/ |
504 |/ |
|
505 | x 5:3466c7f5a149 draft temporary amend commit for 2fe6c4bd32d0 |
|
506 | | |
498 | x 4:2fe6c4bd32d0 draft fix bug 24 (v1) |
507 | x 4:2fe6c4bd32d0 draft fix bug 24 (v1) |
499 |/ |
508 |/ |
500 o 3:a06ec1bf97bd public fix bug 15 (v2) |
509 o 3:a06ec1bf97bd public fix bug 15 (v2) |
501 | |
510 | |
502 ~ |
511 ~ |
503 $ hg --hidden shortlog -r 'successors(2fe6)' |
512 $ hg --hidden shortlog -r 'successors(2fe6)' |
504 5:a360947f6faf draft fix bug 24 (v2 by bob) |
513 6:a360947f6faf draft fix bug 24 (v2 by bob) |
505 6:e3f99ce9d9cd draft fix bug 24 (v2 by alice) |
514 7:e3f99ce9d9cd draft fix bug 24 (v2 by alice) |
506 |
515 |
507 Use evolve to fix the divergence. |
516 Use evolve to fix the divergence. |
508 $ HGMERGE=internal:other hg evolve --content-divergent |
517 $ HGMERGE=internal:other hg evolve --content-divergent |
509 merge:[5] fix bug 24 (v2 by bob) |
518 merge:[6] fix bug 24 (v2 by bob) |
510 with: [6] fix bug 24 (v2 by alice) |
519 with: [7] fix bug 24 (v2 by alice) |
511 base: [4] fix bug 24 (v1) |
520 base: [4] fix bug 24 (v1) |
512 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
521 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
513 working directory is now at 5ad6037c046c |
522 working directory is now at 5ad6037c046c |
514 $ hg log -q -r 'contentdivergent()' |
523 $ hg log -q -r 'contentdivergent()' |
515 |
524 |
516 Figure SG10: Bob's repository after fixing divergence. |
525 Figure SG10: Bob's repository after fixing divergence. |
517 $ hg --hidden shortlog -G -r 3:: |
526 $ hg --hidden shortlog -G -r 3:: |
518 @ 7:5ad6037c046c draft fix bug 24 (v2 by bob) |
527 @ 9:5ad6037c046c draft fix bug 24 (v2 by bob) |
519 | |
528 | |
520 | x 6:e3f99ce9d9cd draft fix bug 24 (v2 by alice) |
529 | x 8:bcfc9a755ac3 draft temporary amend commit for a360947f6faf |
521 |/ |
530 | | |
522 | x 5:a360947f6faf draft fix bug 24 (v2 by bob) |
531 +---x 7:e3f99ce9d9cd draft fix bug 24 (v2 by alice) |
523 |/ |
532 | | |
|
533 | x 6:a360947f6faf draft fix bug 24 (v2 by bob) |
|
534 |/ |
|
535 | x 5:3466c7f5a149 draft temporary amend commit for 2fe6c4bd32d0 |
|
536 | | |
524 | x 4:2fe6c4bd32d0 draft fix bug 24 (v1) |
537 | x 4:2fe6c4bd32d0 draft fix bug 24 (v1) |
525 |/ |
538 |/ |
526 o 3:a06ec1bf97bd public fix bug 15 (v2) |
539 o 3:a06ec1bf97bd public fix bug 15 (v2) |
527 | |
540 | |
528 ~ |
541 ~ |
529 $ hg --hidden shortlog -r 'precursors(5ad6037c046c)' |
542 $ hg --hidden shortlog -r 'precursors(9)' |
530 5:a360947f6faf draft fix bug 24 (v2 by bob) |
543 6:a360947f6faf draft fix bug 24 (v2 by bob) |
531 6:e3f99ce9d9cd draft fix bug 24 (v2 by alice) |
544 7:e3f99ce9d9cd draft fix bug 24 (v2 by alice) |
532 $ cat file1 |
545 $ cat file1 |
533 Do stuff. |
546 Do stuff. |
534 pretty good fix |
547 pretty good fix |
535 better fix (alice) |
548 better fix (alice) |