comparison tests/test-sharing.t @ 3105:f5d472b7e800 mercurial-4.3

test-compat: revert output changes related to temporary amend commit This backed out changeset 06844693bb21 and other related changes.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Fri, 20 Oct 2017 19:32:18 +0200
parents ccfcacc5ee7c
children a867d59ea97a
comparison
equal deleted inserted replaced
3104:3dd5a6f83f8b 3105:f5d472b7e800
67 $ echo 'Fix fix fix.' > file1 67 $ echo 'Fix fix fix.' > file1
68 $ hg amend -m'fix bug 37' 68 $ hg amend -m'fix bug 37'
69 69
70 Figure SG02 70 Figure SG02
71 $ hg shortlog --hidden -G 71 $ hg shortlog --hidden -G
72 @ 2:60ffde5765c5 draft fix bug 37 72 @ 3:60ffde5765c5 draft fix bug 37
73 | 73 |
74 | x 2:2a039763c0f4 draft temporary amend commit for f6490818a721
75 | |
74 | x 1:f6490818a721 draft prelim change 76 | x 1:f6490818a721 draft prelim change
75 |/ 77 |/
76 o 0:0dc9c9f6ab91 public create new project 78 o 0:0dc9c9f6ab91 public create new project
77 79
78 Pull into dev-repo: obsolescence markers are transferred, but not 80 Pull into dev-repo: obsolescence markers are transferred, but not
83 searching for changes 85 searching for changes
84 adding changesets 86 adding changesets
85 adding manifests 87 adding manifests
86 adding file changes 88 adding file changes
87 added 1 changesets with 1 changes to 1 files (+1 heads) 89 added 1 changesets with 1 changes to 1 files (+1 heads)
88 1 new obsolescence markers 90 2 new obsolescence markers
89 obsoleted 1 changesets 91 obsoleted 1 changesets
90 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
91 updated to "60ffde5765c5: fix bug 37" 93 updated to "60ffde5765c5: fix bug 37"
92 1 other heads for branch "default" 94 1 other heads for branch "default"
93 95
104 $ hg amend 106 $ hg amend
105 $ hg push -q 107 $ hg push -q
106 108
107 Figure SG04 (dev-repo) 109 Figure SG04 (dev-repo)
108 $ hg shortlog --hidden -G 110 $ hg shortlog --hidden -G
109 @ 3:de6151c48e1c draft fix bug 37 111 @ 4:de6151c48e1c draft fix bug 37
110 | 112 |
113 | x 3:ad19d3570adb draft temporary amend commit for 60ffde5765c5
114 | |
111 | x 2:60ffde5765c5 draft fix bug 37 115 | x 2:60ffde5765c5 draft fix bug 37
112 |/ 116 |/
113 | x 1:f6490818a721 draft prelim change 117 | x 1:f6490818a721 draft prelim change
114 |/ 118 |/
115 o 0:0dc9c9f6ab91 public create new project 119 o 0:0dc9c9f6ab91 public create new project
119 $ hg update 123 $ hg update
120 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
121 updated to "de6151c48e1c: fix bug 37" 125 updated to "de6151c48e1c: fix bug 37"
122 1 other heads for branch "default" 126 1 other heads for branch "default"
123 $ hg shortlog --hidden -G 127 $ hg shortlog --hidden -G
124 @ 3:de6151c48e1c draft fix bug 37 128 @ 4:de6151c48e1c draft fix bug 37
125 | 129 |
126 | x 2:60ffde5765c5 draft fix bug 37 130 | x 3:60ffde5765c5 draft fix bug 37
127 |/ 131 |/
132 | x 2:2a039763c0f4 draft temporary amend commit for f6490818a721
133 | |
128 | x 1:f6490818a721 draft prelim change 134 | x 1:f6490818a721 draft prelim change
129 |/ 135 |/
130 o 0:0dc9c9f6ab91 public create new project 136 o 0:0dc9c9f6ab91 public create new project
131 137
132 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.
135 searching for changes 141 searching for changes
136 adding changesets 142 adding changesets
137 adding manifests 143 adding manifests
138 adding file changes 144 adding file changes
139 added 1 changesets with 1 changes to 1 files 145 added 1 changesets with 1 changes to 1 files
140 2 new obsolescence markers 146 4 new obsolescence markers
141 147
142 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.
143 $ hg amend -m 'fix bug 37' 149 $ hg amend -m 'fix bug 37'
144 abort: cannot amend public changesets: de6151c48e1c 150 abort: cannot amend public changesets: de6151c48e1c
145 (see 'hg help phases' for details) 151 (see 'hg help phases' for details)
151 | 157 |
152 o 0:0dc9c9f6ab91 public create new project 158 o 0:0dc9c9f6ab91 public create new project
153 159
154 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.
155 $ hg -R ../dev-repo shortlog -r 'draft()' 161 $ hg -R ../dev-repo shortlog -r 'draft()'
156 3:de6151c48e1c draft fix bug 37 162 4:de6151c48e1c draft fix bug 37
157 $ hg push ../dev-repo 163 $ hg push ../dev-repo
158 pushing to ../dev-repo 164 pushing to ../dev-repo
159 searching for changes 165 searching for changes
160 no changes found 166 no changes found
161 [1] 167 [1]
204 searching for changes 210 searching for changes
205 adding changesets 211 adding changesets
206 adding manifests 212 adding manifests
207 adding file changes 213 adding file changes
208 added 1 changesets with 1 changes to 1 files (+1 heads) 214 added 1 changesets with 1 changes to 1 files (+1 heads)
209 1 new obsolescence markers 215 2 new obsolescence markers
210 obsoleted 1 changesets 216 obsoleted 1 changesets
211 updating bookmark bug15 217 updating bookmark bug15
212 $ hg -R ../review bookmarks 218 $ hg -R ../review bookmarks
213 bug15 3:cbdfbd5a5db2 219 bug15 3:cbdfbd5a5db2
214 220
249 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
250 adding changesets 256 adding changesets
251 adding manifests 257 adding manifests
252 adding file changes 258 adding file changes
253 added 1 changesets with 1 changes to 1 files (+1 heads) 259 added 1 changesets with 1 changes to 1 files (+1 heads)
254 1 new obsolescence markers 260 2 new obsolescence markers
255 obsoleted 1 changesets 261 obsoleted 1 changesets
256 updating bookmark featureX 262 updating bookmark featureX
257 263
258 Bob receives second review, amends, and pushes to public: 264 Bob receives second review, amends, and pushes to public:
259 this time, he's sure he got it right! 265 this time, he's sure he got it right!
264 searching for changes 270 searching for changes
265 adding changesets 271 adding changesets
266 adding manifests 272 adding manifests
267 adding file changes 273 adding file changes
268 added 1 changesets with 1 changes to 1 files 274 added 1 changesets with 1 changes to 1 files
269 2 new obsolescence markers 275 4 new obsolescence markers
270 $ hg -R ../public bookmarks 276 $ hg -R ../public bookmarks
271 no bookmarks set 277 no bookmarks set
272 $ hg push ../review 278 $ hg push ../review
273 pushing to ../review 279 pushing to ../review
274 searching for changes 280 searching for changes
275 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
276 adding changesets 282 adding changesets
277 adding manifests 283 adding manifests
278 adding file changes 284 adding file changes
279 added 1 changesets with 1 changes to 1 files (+1 heads) 285 added 1 changesets with 1 changes to 1 files (+1 heads)
280 1 new obsolescence markers 286 2 new obsolescence markers
281 obsoleted 1 changesets 287 obsoleted 1 changesets
282 updating bookmark featureX 288 updating bookmark featureX
283 $ hg -R ../review bookmarks 289 $ hg -R ../review bookmarks
284 bug15 3:cbdfbd5a5db2 290 bug15 3:cbdfbd5a5db2
285 featureX 6:540ba8f317e6 291 featureX 6:540ba8f317e6
325 331
326 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
327 her change, so now she can publish it. 333 her change, so now she can publish it.
328 $ cd ../alice 334 $ cd ../alice
329 $ hg --hidden shortlog -G -r 1:: 335 $ hg --hidden shortlog -G -r 1::
330 @ 3:cbdfbd5a5db2 draft fix bug 15 (v2) 336 @ 4:cbdfbd5a5db2 draft fix bug 15 (v2)
331 | 337 |
338 | x 3:55dd95168a35 draft temporary amend commit for f91e97234c2b
339 | |
332 | x 2:f91e97234c2b draft fix bug 15 (v1) 340 | x 2:f91e97234c2b draft fix bug 15 (v1)
333 |/ 341 |/
334 o 1:de6151c48e1c public fix bug 37 342 o 1:de6151c48e1c public fix bug 37
335 | 343 |
336 ~ 344 ~
337 $ hg outgoing -q ../public 345 $ hg outgoing -q ../public
338 3:cbdfbd5a5db2 346 4:cbdfbd5a5db2
339 $ hg push ../public 347 $ hg push ../public
340 pushing to ../public 348 pushing to ../public
341 searching for changes 349 searching for changes
342 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
343 abort: push creates new remote head cbdfbd5a5db2 with bookmark 'bug15'! 351 abort: push creates new remote head cbdfbd5a5db2 with bookmark 'bug15'!
348 searching for changes 356 searching for changes
349 adding changesets 357 adding changesets
350 adding manifests 358 adding manifests
351 adding file changes 359 adding file changes
352 added 1 changesets with 1 changes to 1 files (+1 heads) 360 added 1 changesets with 1 changes to 1 files (+1 heads)
353 2 new obsolescence markers 361 4 new obsolescence markers
354 (run 'hg heads' to see heads, 'hg merge' to merge) 362 (run 'hg heads' to see heads, 'hg merge' to merge)
355 $ hg log -G -q -r 'head()' 363 $ hg log -G -q -r 'head()'
356 o 4:540ba8f317e6 364 o 5:540ba8f317e6
357 | 365 |
358 ~ 366 ~
359 @ 3:cbdfbd5a5db2 367 @ 4:cbdfbd5a5db2
360 | 368 |
361 ~ 369 ~
362 $ hg --hidden shortlog -G -r 1:: 370 $ hg --hidden shortlog -G -r 1::
363 o 4:540ba8f317e6 public implement feature X (v3) 371 o 5:540ba8f317e6 public implement feature X (v3)
364 | 372 |
365 | @ 3:cbdfbd5a5db2 draft fix bug 15 (v2) 373 | @ 4:cbdfbd5a5db2 draft fix bug 15 (v2)
366 |/ 374 |/
375 | x 3:55dd95168a35 draft temporary amend commit for f91e97234c2b
376 | |
367 | x 2:f91e97234c2b draft fix bug 15 (v1) 377 | x 2:f91e97234c2b draft fix bug 15 (v1)
368 |/ 378 |/
369 o 1:de6151c48e1c public fix bug 37 379 o 1:de6151c48e1c public fix bug 37
370 | 380 |
371 ~ 381 ~
372 382
373 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
374 publishes the result. 384 publishes the result.
375 $ hg rebase -d 5 385 $ hg rebase -d 5
376 rebasing 3:cbdfbd5a5db2 "fix bug 15 (v2)" (bug15) 386 rebasing 4:cbdfbd5a5db2 "fix bug 15 (v2)" (bug15)
377 $ hg push ../public 387 $ hg push ../public
378 pushing to ../public 388 pushing to ../public
379 searching for changes 389 searching for changes
380 adding changesets 390 adding changesets
381 adding manifests 391 adding manifests
382 adding file changes 392 adding file changes
383 added 1 changesets with 1 changes to 1 files 393 added 1 changesets with 1 changes to 1 files
384 2 new obsolescence markers 394 3 new obsolescence markers
385 $ hg push ../review 395 $ hg push ../review
386 pushing to ../review 396 pushing to ../review
387 searching for changes 397 searching for changes
388 adding changesets 398 adding changesets
389 adding manifests 399 adding manifests
462 472
463 $ cd ../bob 473 $ cd ../bob
464 $ echo 'better fix (bob)' >> file1 474 $ echo 'better fix (bob)' >> file1
465 $ hg amend -u bob -m 'fix bug 24 (v2 by bob)' 475 $ hg amend -u bob -m 'fix bug 24 (v2 by bob)'
466 $ hg --hidden shortlog -G -r 3:: 476 $ hg --hidden shortlog -G -r 3::
467 @ 5:a360947f6faf draft fix bug 24 (v2 by bob) 477 @ 6:a360947f6faf draft fix bug 24 (v2 by bob)
468 | 478 |
479 | x 5:3466c7f5a149 draft temporary amend commit for 2fe6c4bd32d0
480 | |
469 | x 4:2fe6c4bd32d0 draft fix bug 24 (v1) 481 | x 4:2fe6c4bd32d0 draft fix bug 24 (v1)
470 |/ 482 |/
471 o 3:a06ec1bf97bd public fix bug 15 (v2) 483 o 3:a06ec1bf97bd public fix bug 15 (v2)
472 | 484 |
473 ~ 485 ~
478 searching for changes 490 searching for changes
479 adding changesets 491 adding changesets
480 adding manifests 492 adding manifests
481 adding file changes 493 adding file changes
482 added 1 changesets with 1 changes to 1 files (+1 heads) 494 added 1 changesets with 1 changes to 1 files (+1 heads)
483 1 new obsolescence markers 495 2 new obsolescence markers
484 (run 'hg heads' to see heads, 'hg merge' to merge) 496 (run 'hg heads' to see heads, 'hg merge' to merge)
485 2 new content-divergent changesets 497 2 new content-divergent changesets
486 498
487 Figure SG09: multiple heads! divergence! oh my! 499 Figure SG09: multiple heads! divergence! oh my!
488 $ hg --hidden shortlog -G -r 3:: 500 $ hg --hidden shortlog -G -r 3::
489 o 6:e3f99ce9d9cd draft fix bug 24 (v2 by alice) 501 o 7:e3f99ce9d9cd draft fix bug 24 (v2 by alice)
490 | 502 |
491 | @ 5:a360947f6faf draft fix bug 24 (v2 by bob) 503 | @ 6:a360947f6faf draft fix bug 24 (v2 by bob)
492 |/ 504 |/
505 | x 5:3466c7f5a149 draft temporary amend commit for 2fe6c4bd32d0
506 | |
493 | x 4:2fe6c4bd32d0 draft fix bug 24 (v1) 507 | x 4:2fe6c4bd32d0 draft fix bug 24 (v1)
494 |/ 508 |/
495 o 3:a06ec1bf97bd public fix bug 15 (v2) 509 o 3:a06ec1bf97bd public fix bug 15 (v2)
496 | 510 |
497 ~ 511 ~
498 $ hg --hidden shortlog -r 'successors(2fe6)' 512 $ hg --hidden shortlog -r 'successors(2fe6)'
499 5:a360947f6faf draft fix bug 24 (v2 by bob) 513 6:a360947f6faf draft fix bug 24 (v2 by bob)
500 6:e3f99ce9d9cd draft fix bug 24 (v2 by alice) 514 7:e3f99ce9d9cd draft fix bug 24 (v2 by alice)
501 515
502 Use evolve to fix the divergence. 516 Use evolve to fix the divergence.
503 $ HGMERGE=internal:other hg evolve --contentdivergent 517 $ HGMERGE=internal:other hg evolve --contentdivergent
504 merge:[5] fix bug 24 (v2 by bob) 518 merge:[6] fix bug 24 (v2 by bob)
505 with: [6] fix bug 24 (v2 by alice) 519 with: [7] fix bug 24 (v2 by alice)
506 base: [4] fix bug 24 (v1) 520 base: [4] fix bug 24 (v1)
507 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
508 working directory is now at 5ad6037c046c 522 working directory is now at 5ad6037c046c
509 $ hg log -q -r 'contentdivergent()' 523 $ hg log -q -r 'contentdivergent()'
510 524
511 Figure SG10: Bob's repository after fixing divergence. 525 Figure SG10: Bob's repository after fixing divergence.
512 $ hg --hidden shortlog -G -r 3:: 526 $ hg --hidden shortlog -G -r 3::
513 @ 7:5ad6037c046c draft fix bug 24 (v2 by bob) 527 @ 9:5ad6037c046c draft fix bug 24 (v2 by bob)
514 | 528 |
515 | x 6:e3f99ce9d9cd draft fix bug 24 (v2 by alice) 529 | x 8:bcfc9a755ac3 draft temporary amend commit for a360947f6faf
516 |/ 530 | |
517 | x 5:a360947f6faf draft fix bug 24 (v2 by bob) 531 +---x 7:e3f99ce9d9cd draft fix bug 24 (v2 by alice)
518 |/ 532 | |
533 | x 6:a360947f6faf draft fix bug 24 (v2 by bob)
534 |/
535 | x 5:3466c7f5a149 draft temporary amend commit for 2fe6c4bd32d0
536 | |
519 | x 4:2fe6c4bd32d0 draft fix bug 24 (v1) 537 | x 4:2fe6c4bd32d0 draft fix bug 24 (v1)
520 |/ 538 |/
521 o 3:a06ec1bf97bd public fix bug 15 (v2) 539 o 3:a06ec1bf97bd public fix bug 15 (v2)
522 | 540 |
523 ~ 541 ~
524 $ hg --hidden shortlog -r 'precursors(5ad6037c046c)' 542 $ hg --hidden shortlog -r 'precursors(9)'
525 5:a360947f6faf draft fix bug 24 (v2 by bob) 543 6:a360947f6faf draft fix bug 24 (v2 by bob)
526 6:e3f99ce9d9cd draft fix bug 24 (v2 by alice) 544 7:e3f99ce9d9cd draft fix bug 24 (v2 by alice)
527 $ cat file1 545 $ cat file1
528 Do stuff. 546 Do stuff.
529 pretty good fix 547 pretty good fix
530 better fix (alice) 548 better fix (alice)