comparison tests/test-sharing.t @ 2929:06844693bb21

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