comparison tests/test-sharing.t @ 4935:3874bc10d4a7 stable

docs: add two more amend commits to simulate temporary amend commits sharing.rst made reference to temporary amend commits and used them to demonstrate that hidden commits are not exchanged. Nowadays, evolve doesn't create such commits, but it still makes sense to show how they are handled during the exchange process. So let's add two more amend commits, one for each repo. This way the guide doesn't have to be updated too much, but doesn't lose this important detail of working with evolve. Unfortunately, this means that tons of hashes change, but it's better than to have figure 4 demonstrate absolutely nothing. Temporary amend commits were removed from test-sharing.t in 06844693bb21, but sharing.rst continued using them for demonstration purposes. It might've been better to replace at least some of the temporary amend commits by extra amends back then, but oh well.
author Anton Shestakov <av6@dwimlabs.net>
date Mon, 11 Nov 2019 02:42:37 +0700
parents 3e748357a055
children 9f69164cdc16 304de9a04172
comparison
equal deleted inserted replaced
4934:1765fd925fc1 4935:3874bc10d4a7
68 @ 0:0dc9 public create new project 68 @ 0:0dc9 public create new project
69 69
70 Now let's switch to test-repo to test our change and amend:: 70 Now let's switch to test-repo to test our change and amend::
71 $ cd ../test-repo 71 $ cd ../test-repo
72 $ hg update -q 72 $ hg update -q
73 $ echo 'Fix fix fix' > file1
74 $ hg amend -m'fix bug 37'
73 $ echo 'Fix fix fix.' > file1 75 $ echo 'Fix fix fix.' > file1
74 $ hg amend -m'fix bug 37' 76 $ hg amend -m'fix bug 37'
75 77
76 Figure SG02 78 Figure SG02
77 $ hg -R ../dev-repo shortlog --hidden -G 79 $ hg -R ../dev-repo shortlog --hidden -G
78 @ 1:f649 draft prelim change 80 @ 1:f649 draft prelim change
79 | 81 |
80 o 0:0dc9 public create new project 82 o 0:0dc9 public create new project
81 83
82 $ hg -R ../test-repo shortlog --hidden -G 84 $ hg -R ../test-repo shortlog --hidden -G
83 @ 2:60ff draft fix bug 37 85 @ 3:522d draft fix bug 37
84 | 86 |
87 | x 2:96d8 draft fix bug 37
88 |/
85 | x 1:f649 draft prelim change 89 | x 1:f649 draft prelim change
86 |/ 90 |/
87 o 0:0dc9 public create new project 91 o 0:0dc9 public create new project
88 92
89 Pull into dev-repo: obsolescence markers are transferred, but not 93 Pull into dev-repo: obsolescence markers are transferred, but not
94 searching for changes 98 searching for changes
95 adding changesets 99 adding changesets
96 adding manifests 100 adding manifests
97 adding file changes 101 adding file changes
98 added 1 changesets with 1 changes to 1 files (+1 heads) 102 added 1 changesets with 1 changes to 1 files (+1 heads)
99 1 new obsolescence markers 103 2 new obsolescence markers
100 obsoleted 1 changesets 104 obsoleted 1 changesets
101 new changesets 60ffde5765c5 (1 drafts) 105 new changesets 522d503432a2 (1 drafts)
102 1 files updated, 0 files merged, 0 files removed, 0 files unresolved 106 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
103 updated to "60ffde5765c5: fix bug 37" 107 updated to "522d503432a2: fix bug 37"
104 1 other heads for branch "default" 108 1 other heads for branch "default"
105 109
106 Figure SG03 110 Figure SG03
107 $ hg -R ../dev-repo shortlog --hidden -G 111 $ hg -R ../dev-repo shortlog --hidden -G
108 @ 2:60ff draft fix bug 37 112 @ 2:522d draft fix bug 37
109 | 113 |
110 | x 1:f649 draft prelim change 114 | x 1:f649 draft prelim change
111 |/ 115 |/
112 o 0:0dc9 public create new project 116 o 0:0dc9 public create new project
113 117
114 Amend again in dev-repo 118 Amend again in dev-repo
119 $ echo 'Fix, fix, and fix' > file1
120 $ hg amend
115 $ echo 'Fix, fix, and fix.' > file1 121 $ echo 'Fix, fix, and fix.' > file1
116 $ hg amend 122 $ hg amend
117 $ hg push -q 123 $ hg push -q
118 124
119 Figure SG04 (dev-repo) 125 Figure SG04 (dev-repo)
120 $ hg shortlog --hidden -G 126 $ hg shortlog --hidden -G
121 @ 3:de61 draft fix bug 37 127 @ 4:7b49 draft fix bug 37
122 | 128 |
123 | x 2:60ff draft fix bug 37 129 | x 3:e42b draft fix bug 37
130 |/
131 | x 2:522d draft fix bug 37
124 |/ 132 |/
125 | x 1:f649 draft prelim change 133 | x 1:f649 draft prelim change
126 |/ 134 |/
127 o 0:0dc9 public create new project 135 o 0:0dc9 public create new project
128 136
129 Figure SG04 (test-repo) 137 Figure SG04 (test-repo)
130 $ cd ../test-repo 138 $ cd ../test-repo
131 $ hg update 139 $ hg update
132 1 files updated, 0 files merged, 0 files removed, 0 files unresolved 140 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
133 updated to "de6151c48e1c: fix bug 37" 141 updated to "7b49f864d655: fix bug 37"
134 1 other heads for branch "default" 142 1 other heads for branch "default"
135 $ hg shortlog --hidden -G 143 $ hg shortlog --hidden -G
136 @ 3:de61 draft fix bug 37 144 @ 4:7b49 draft fix bug 37
137 | 145 |
138 | x 2:60ff draft fix bug 37 146 | x 3:522d draft fix bug 37
147 |/
148 | x 2:96d8 draft fix bug 37
139 |/ 149 |/
140 | x 1:f649 draft prelim change 150 | x 1:f649 draft prelim change
141 |/ 151 |/
142 o 0:0dc9 public create new project 152 o 0:0dc9 public create new project
143 153
147 searching for changes 157 searching for changes
148 adding changesets 158 adding changesets
149 adding manifests 159 adding manifests
150 adding file changes 160 adding file changes
151 added 1 changesets with 1 changes to 1 files 161 added 1 changesets with 1 changes to 1 files
152 2 new obsolescence markers 162 4 new obsolescence markers
153 163
154 Now that the fix is public, we cannot amend it any more. 164 Now that the fix is public, we cannot amend it any more.
155 $ hg amend -m 'fix bug 37' 165 $ hg amend -m 'fix bug 37'
156 abort: cannot amend public changesets: de6151c48e1c 166 abort: cannot amend public changesets: 7b49f864d655
157 (see 'hg help phases' for details) 167 (see 'hg help phases' for details)
158 [255] 168 [255]
159 169
160 Figure SG05 170 Figure SG05
161 $ hg -R ../public shortlog -G 171 $ hg -R ../public shortlog -G
162 o 1:de61 public fix bug 37 172 o 1:7b49 public fix bug 37
163 | 173 |
164 o 0:0dc9 public create new project 174 o 0:0dc9 public create new project
165 175
166 Oops, still have draft changesets in dev-repo: push the phase change there. 176 Oops, still have draft changesets in dev-repo: push the phase change there.
167 $ hg -R ../dev-repo shortlog -r 'draft()' 177 $ hg -R ../dev-repo shortlog -r 'draft()'
168 3:de61 draft fix bug 37 178 4:7b49 draft fix bug 37
169 $ hg push ../dev-repo 179 $ hg push ../dev-repo
170 pushing to ../dev-repo 180 pushing to ../dev-repo
171 searching for changes 181 searching for changes
172 no changes found 182 no changes found
173 [1] 183 [1]
203 adding manifests 213 adding manifests
204 adding file changes 214 adding file changes
205 added 1 changesets with 1 changes to 1 files 215 added 1 changesets with 1 changes to 1 files
206 exporting bookmark bug15 216 exporting bookmark bug15
207 $ hg -R ../review bookmarks 217 $ hg -R ../review bookmarks
208 bug15 2:f91e97234c2b 218 bug15 2:4e965c66c983
209 219
210 Alice receives code review, amends her fix, and goes out to lunch to 220 Alice receives code review, amends her fix, and goes out to lunch to
211 await second review. 221 await second review.
212 $ echo 'Fix.' > file2 222 $ echo 'Fix.' > file2
213 $ hg amend -m 'fix bug 15 (v2)' 223 $ hg amend -m 'fix bug 15 (v2)'
220 added 1 changesets with 1 changes to 1 files (+1 heads) 230 added 1 changesets with 1 changes to 1 files (+1 heads)
221 1 new obsolescence markers 231 1 new obsolescence markers
222 obsoleted 1 changesets 232 obsoleted 1 changesets
223 updating bookmark bug15 233 updating bookmark bug15
224 $ hg -R ../review bookmarks 234 $ hg -R ../review bookmarks
225 bug15 3:cbdfbd5a5db2 235 bug15 3:3363442626b3
226 236
227 Figure SG06: review repository after Alice pushes her amended changeset. 237 Figure SG06: review repository after Alice pushes her amended changeset.
228 $ hg --hidden -R ../review shortlog -G -r 1:: 238 $ hg --hidden -R ../review shortlog -G -r 1::
229 o 3:cbdf draft fix bug 15 (v2) 239 o 3:3363 draft fix bug 15 (v2)
230 | 240 |
231 | x 2:f91e draft fix bug 15 (v1) 241 | x 2:4e96 draft fix bug 15 (v1)
232 |/ 242 |/
233 @ 1:de61 public fix bug 37 243 @ 1:7b49 public fix bug 37
234 | 244 |
235 ~ 245 ~
236 246
237 Bob commits a draft changeset, pushes to review repo. 247 Bob commits a draft changeset, pushes to review repo.
238 $ cd ../bob 248 $ cd ../bob
240 $ hg bookmark featureX 250 $ hg bookmark featureX
241 $ hg commit -u bob -m 'implement feature X (v1)' 251 $ hg commit -u bob -m 'implement feature X (v1)'
242 $ hg push -B featureX 252 $ hg push -B featureX
243 pushing to $TESTTMP/review (glob) 253 pushing to $TESTTMP/review (glob)
244 searching for changes 254 searching for changes
245 remote has heads on branch 'default' that are not known locally: cbdfbd5a5db2 255 remote has heads on branch 'default' that are not known locally: 3363442626b3
246 adding changesets 256 adding changesets
247 adding manifests 257 adding manifests
248 adding file changes 258 adding file changes
249 added 1 changesets with 1 changes to 1 files (+1 heads) 259 added 1 changesets with 1 changes to 1 files (+1 heads)
250 exporting bookmark featureX 260 exporting bookmark featureX
251 $ hg -R ../review bookmarks 261 $ hg -R ../review bookmarks
252 bug15 3:cbdfbd5a5db2 262 bug15 3:3363442626b3
253 featureX 4:193657d1e852 263 featureX 4:c7ff98c7916f
254 264
255 Bob receives first review, amends and pushes. 265 Bob receives first review, amends and pushes.
256 $ echo 'do stuff' > file1 266 $ echo 'do stuff' > file1
257 $ hg amend -m 'implement feature X (v2)' 267 $ hg amend -m 'implement feature X (v2)'
258 $ hg push 268 $ hg push
259 pushing to $TESTTMP/review (glob) 269 pushing to $TESTTMP/review (glob)
260 searching for changes 270 searching for changes
261 remote has heads on branch 'default' that are not known locally: cbdfbd5a5db2 271 remote has heads on branch 'default' that are not known locally: 3363442626b3
262 adding changesets 272 adding changesets
263 adding manifests 273 adding manifests
264 adding file changes 274 adding file changes
265 added 1 changesets with 1 changes to 1 files (+1 heads) 275 added 1 changesets with 1 changes to 1 files (+1 heads)
266 1 new obsolescence markers 276 1 new obsolescence markers
282 $ hg -R ../public bookmarks 292 $ hg -R ../public bookmarks
283 no bookmarks set 293 no bookmarks set
284 $ hg push ../review 294 $ hg push ../review
285 pushing to ../review 295 pushing to ../review
286 searching for changes 296 searching for changes
287 remote has heads on branch 'default' that are not known locally: cbdfbd5a5db2 297 remote has heads on branch 'default' that are not known locally: 3363442626b3
288 adding changesets 298 adding changesets
289 adding manifests 299 adding manifests
290 adding file changes 300 adding file changes
291 added 1 changesets with 1 changes to 1 files (+1 heads) 301 added 1 changesets with 1 changes to 1 files (+1 heads)
292 1 new obsolescence markers 302 1 new obsolescence markers
293 obsoleted 1 changesets 303 obsoleted 1 changesets
294 updating bookmark featureX 304 updating bookmark featureX
295 $ hg -R ../review bookmarks 305 $ hg -R ../review bookmarks
296 bug15 3:cbdfbd5a5db2 306 bug15 3:3363442626b3
297 featureX 6:540ba8f317e6 307 featureX 6:9d21d673314a
298 308
299 Figure SG07: review and public repos after Bob implements feature X. 309 Figure SG07: review and public repos after Bob implements feature X.
300 $ hg --hidden -R ../review shortlog -G -r 1:: 310 $ hg --hidden -R ../review shortlog -G -r 1::
301 o 6:540b public implement feature X (v3) 311 o 6:9d21 public implement feature X (v3)
302 | 312 |
303 | x 5:0eb7 draft implement feature X (v2) 313 | x 5:1bb4 draft implement feature X (v2)
304 |/ 314 |/
305 | x 4:1936 draft implement feature X (v1) 315 | x 4:c7ff draft implement feature X (v1)
306 |/ 316 |/
307 | o 3:cbdf draft fix bug 15 (v2) 317 | o 3:3363 draft fix bug 15 (v2)
308 |/ 318 |/
309 | x 2:f91e draft fix bug 15 (v1) 319 | x 2:4e96 draft fix bug 15 (v1)
310 |/ 320 |/
311 @ 1:de61 public fix bug 37 321 @ 1:7b49 public fix bug 37
312 | 322 |
313 ~ 323 ~
314 $ hg --hidden -R ../public shortlog -G -r 1:: 324 $ hg --hidden -R ../public shortlog -G -r 1::
315 o 2:540b public implement feature X (v3) 325 o 2:9d21 public implement feature X (v3)
316 | 326 |
317 o 1:de61 public fix bug 37 327 o 1:7b49 public fix bug 37
318 | 328 |
319 ~ 329 ~
320 330
321 Meantime, Alice is back from lunch. While she was away, Bob approved 331 Meantime, Alice is back from lunch. While she was away, Bob approved
322 her change, so now she can publish it. 332 her change, so now she can publish it.
323 $ cd ../alice 333 $ cd ../alice
324 $ hg --hidden shortlog -G -r 1:: 334 $ hg --hidden shortlog -G -r 1::
325 @ 3:cbdf draft fix bug 15 (v2) 335 @ 3:3363 draft fix bug 15 (v2)
326 | 336 |
327 | x 2:f91e draft fix bug 15 (v1) 337 | x 2:4e96 draft fix bug 15 (v1)
328 |/ 338 |/
329 o 1:de61 public fix bug 37 339 o 1:7b49 public fix bug 37
330 | 340 |
331 ~ 341 ~
332 $ hg outgoing -q ../public 342 $ hg outgoing -q ../public
333 3:cbdfbd5a5db2 343 3:3363442626b3
334 $ hg push ../public 344 $ hg push ../public
335 pushing to ../public 345 pushing to ../public
336 searching for changes 346 searching for changes
337 remote has heads on branch 'default' that are not known locally: 540ba8f317e6 347 remote has heads on branch 'default' that are not known locally: 9d21d673314a
338 abort: push creates new remote head cbdfbd5a5db2 with bookmark 'bug15'! 348 abort: push creates new remote head 3363442626b3 with bookmark 'bug15'!
339 (pull and merge or see 'hg help push' for details about pushing new heads) 349 (pull and merge or see 'hg help push' for details about pushing new heads)
340 [255] 350 [255]
341 $ hg pull ../public 351 $ hg pull ../public
342 pulling from ../public 352 pulling from ../public
343 searching for changes 353 searching for changes
344 adding changesets 354 adding changesets
345 adding manifests 355 adding manifests
346 adding file changes 356 adding file changes
347 added 1 changesets with 1 changes to 1 files (+1 heads) 357 added 1 changesets with 1 changes to 1 files (+1 heads)
348 2 new obsolescence markers 358 2 new obsolescence markers
349 new changesets 540ba8f317e6 359 new changesets 9d21d673314a
350 (run 'hg heads' to see heads, 'hg merge' to merge) 360 (run 'hg heads' to see heads, 'hg merge' to merge)
351 $ hg log -G -q -r 'head()' 361 $ hg log -G -q -r 'head()'
352 o 4:540ba8f317e6 362 o 4:9d21d673314a
353 | 363 |
354 ~ 364 ~
355 @ 3:cbdfbd5a5db2 365 @ 3:3363442626b3
356 | 366 |
357 ~ 367 ~
358 $ hg --hidden shortlog -G -r 1:: 368 $ hg --hidden shortlog -G -r 1::
359 o 4:540b public implement feature X (v3) 369 o 4:9d21 public implement feature X (v3)
360 | 370 |
361 | @ 3:cbdf draft fix bug 15 (v2) 371 | @ 3:3363 draft fix bug 15 (v2)
362 |/ 372 |/
363 | x 2:f91e draft fix bug 15 (v1) 373 | x 2:4e96 draft fix bug 15 (v1)
364 |/ 374 |/
365 o 1:de61 public fix bug 37 375 o 1:7b49 public fix bug 37
366 | 376 |
367 ~ 377 ~
368 378
369 Alice rebases her draft changeset on top of Bob's public changeset and 379 Alice rebases her draft changeset on top of Bob's public changeset and
370 publishes the result. 380 publishes the result.
371 $ hg rebase -d 5 381 $ hg rebase -d 4
372 rebasing 3:cbdfbd5a5db2 "fix bug 15 (v2)" (bug15) 382 rebasing 3:3363442626b3 "fix bug 15 (v2)" (bug15)
373 $ hg push ../public 383 $ hg push ../public
374 pushing to ../public 384 pushing to ../public
375 searching for changes 385 searching for changes
376 adding changesets 386 adding changesets
377 adding manifests 387 adding manifests
389 obsoleted 1 changesets 399 obsoleted 1 changesets
390 updating bookmark bug15 400 updating bookmark bug15
391 401
392 Figure SG08: review and public changesets after Alice pushes. 402 Figure SG08: review and public changesets after Alice pushes.
393 $ hg --hidden -R ../review shortlog -G -r 1:: 403 $ hg --hidden -R ../review shortlog -G -r 1::
394 o 7:a06e public fix bug 15 (v2) 404 o 7:dd15 public fix bug 15 (v2)
395 | 405 |
396 o 6:540b public implement feature X (v3) 406 o 6:9d21 public implement feature X (v3)
397 | 407 |
398 | x 5:0eb7 draft implement feature X (v2) 408 | x 5:1bb4 draft implement feature X (v2)
399 |/ 409 |/
400 | x 4:1936 draft implement feature X (v1) 410 | x 4:c7ff draft implement feature X (v1)
401 |/ 411 |/
402 | x 3:cbdf draft fix bug 15 (v2) 412 | x 3:3363 draft fix bug 15 (v2)
403 |/ 413 |/
404 | x 2:f91e draft fix bug 15 (v1) 414 | x 2:4e96 draft fix bug 15 (v1)
405 |/ 415 |/
406 @ 1:de61 public fix bug 37 416 @ 1:7b49 public fix bug 37
407 | 417 |
408 ~ 418 ~
409 $ hg --hidden -R ../public shortlog -G -r 1:: 419 $ hg --hidden -R ../public shortlog -G -r 1::
410 o 3:a06e public fix bug 15 (v2) 420 o 3:dd15 public fix bug 15 (v2)
411 | 421 |
412 o 2:540b public implement feature X (v3) 422 o 2:9d21 public implement feature X (v3)
413 | 423 |
414 o 1:de61 public fix bug 37 424 o 1:7b49 public fix bug 37
415 | 425 |
416 ~ 426 ~
417 $ cd .. 427 $ cd ..
418 428
419 Setup for shared mutable history (to illustrate content-divergence and 429 Setup for shared mutable history (to illustrate content-divergence and
436 446
437 $ cd bob 447 $ cd bob
438 $ echo 'pretty good fix' >> file1 448 $ echo 'pretty good fix' >> file1
439 $ hg commit -u bob -m 'fix bug 24 (v1)' 449 $ hg commit -u bob -m 'fix bug 24 (v1)'
440 $ hg shortlog -r . 450 $ hg shortlog -r .
441 4:2fe6 draft fix bug 24 (v1) 451 4:b2be draft fix bug 24 (v1)
442 452
443 Alice pulls Bob's draft changeset and amends it herself. :: 453 Alice pulls Bob's draft changeset and amends it herself. ::
444 454
445 $ cd ../alice 455 $ cd ../alice
446 $ hg pull -u ../bob 456 $ hg pull -u ../bob
448 searching for changes 458 searching for changes
449 adding changesets 459 adding changesets
450 adding manifests 460 adding manifests
451 adding file changes 461 adding file changes
452 added 1 changesets with 1 changes to 1 files 462 added 1 changesets with 1 changes to 1 files
453 new changesets 2fe6c4bd32d0 (1 drafts) 463 new changesets b2be254b3b9f (1 drafts)
454 1 files updated, 0 files merged, 0 files removed, 0 files unresolved 464 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
455 $ echo 'better fix (alice)' >> file1 465 $ echo 'better fix (alice)' >> file1
456 $ hg amend -u alice -m 'fix bug 24 (v2 by alice)' 466 $ hg amend -u alice -m 'fix bug 24 (v2 by alice)'
457 467
458 Bob implements a better fix of his own:: 468 Bob implements a better fix of his own::
459 469
460 $ cd ../bob 470 $ cd ../bob
461 $ echo 'better fix (bob)' >> file1 471 $ echo 'better fix (bob)' >> file1
462 $ hg amend -u bob -m 'fix bug 24 (v2 by bob)' 472 $ hg amend -u bob -m 'fix bug 24 (v2 by bob)'
463 $ hg --hidden shortlog -G -r 3:: 473 $ hg --hidden shortlog -G -r 3::
464 @ 5:a360 draft fix bug 24 (v2 by bob) 474 @ 5:541f draft fix bug 24 (v2 by bob)
465 | 475 |
466 | x 4:2fe6 draft fix bug 24 (v1) 476 | x 4:b2be draft fix bug 24 (v1)
467 |/ 477 |/
468 o 3:a06e public fix bug 15 (v2) 478 o 3:dd15 public fix bug 15 (v2)
469 | 479 |
470 ~ 480 ~
471 481
472 Bob discovers the divergence. 482 Bob discovers the divergence.
473 $ hg pull ../alice 483 $ hg pull ../alice
477 adding manifests 487 adding manifests
478 adding file changes 488 adding file changes
479 added 1 changesets with 1 changes to 1 files (+1 heads) 489 added 1 changesets with 1 changes to 1 files (+1 heads)
480 1 new obsolescence markers 490 1 new obsolescence markers
481 2 new content-divergent changesets 491 2 new content-divergent changesets
482 new changesets e3f99ce9d9cd (1 drafts) 492 new changesets e3a586fd2377 (1 drafts)
483 (run 'hg heads' to see heads, 'hg merge' to merge) 493 (run 'hg heads' to see heads, 'hg merge' to merge)
484 494
485 Figure SG09: multiple heads! divergence! oh my! 495 Figure SG09: multiple heads! divergence! oh my!
486 $ hg --hidden shortlog -G -r 3:: 496 $ hg --hidden shortlog -G -r 3::
487 * 6:e3f9 draft fix bug 24 (v2 by alice) 497 * 6:e3a5 draft fix bug 24 (v2 by alice)
488 | 498 |
489 | @ 5:a360 draft fix bug 24 (v2 by bob) 499 | @ 5:541f draft fix bug 24 (v2 by bob)
490 |/ 500 |/
491 | x 4:2fe6 draft fix bug 24 (v1) 501 | x 4:b2be draft fix bug 24 (v1)
492 |/ 502 |/
493 o 3:a06e public fix bug 15 (v2) 503 o 3:dd15 public fix bug 15 (v2)
494 | 504 |
495 ~ 505 ~
496 $ hg --hidden shortlog -r 'successors(2fe6)' 506 $ hg --hidden shortlog -r 'successors(b2be)'
497 5:a360 draft fix bug 24 (v2 by bob) 507 5:541f draft fix bug 24 (v2 by bob)
498 6:e3f9 draft fix bug 24 (v2 by alice) 508 6:e3a5 draft fix bug 24 (v2 by alice)
499 509
500 Use evolve to fix the divergence. 510 Use evolve to fix the divergence.
501 $ cat > editor.sh <<EOF 511 $ cat > editor.sh <<EOF
502 > #!/bin/sh 512 > #!/bin/sh
503 > cat > \$1 <<ENDOF 513 > cat > \$1 <<ENDOF
508 $ HGEDITOR='sh ./editor.sh' HGMERGE=internal:other hg evolve --content-divergent 518 $ HGEDITOR='sh ./editor.sh' HGMERGE=internal:other hg evolve --content-divergent
509 merge:[5] fix bug 24 (v2 by bob) 519 merge:[5] fix bug 24 (v2 by bob)
510 with: [6] fix bug 24 (v2 by alice) 520 with: [6] fix bug 24 (v2 by alice)
511 base: [4] fix bug 24 (v1) 521 base: [4] fix bug 24 (v1)
512 0 files updated, 1 files merged, 0 files removed, 0 files unresolved 522 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
513 working directory is now at b1499b0f03ca 523 working directory is now at aa824ceedb8b
514 $ hg log -q -r 'contentdivergent()' 524 $ hg log -q -r 'contentdivergent()'
515 525
516 Figure SG10: Bob's repository after fixing divergence. 526 Figure SG10: Bob's repository after fixing divergence.
517 $ hg --hidden shortlog -G -r 3:: 527 $ hg --hidden shortlog -G -r 3::
518 @ 7:b149 draft fix bug 24 (v2 by bob) 528 @ 7:aa82 draft fix bug 24 (v2 by bob)
519 | 529 |
520 | x 6:e3f9 draft fix bug 24 (v2 by alice) 530 | x 6:e3a5 draft fix bug 24 (v2 by alice)
521 |/ 531 |/
522 | x 5:a360 draft fix bug 24 (v2 by bob) 532 | x 5:541f draft fix bug 24 (v2 by bob)
523 |/ 533 |/
524 | x 4:2fe6 draft fix bug 24 (v1) 534 | x 4:b2be draft fix bug 24 (v1)
525 |/ 535 |/
526 o 3:a06e public fix bug 15 (v2) 536 o 3:dd15 public fix bug 15 (v2)
527 | 537 |
528 ~ 538 ~
529 $ hg --hidden shortlog -r 'predecessors(b1499b0f03ca)' 539 $ hg --hidden shortlog -r 'predecessors(aa82)'
530 5:a360 draft fix bug 24 (v2 by bob) 540 5:541f draft fix bug 24 (v2 by bob)
531 6:e3f9 draft fix bug 24 (v2 by alice) 541 6:e3a5 draft fix bug 24 (v2 by alice)
532 $ cat file1 542 $ cat file1
533 Do stuff. 543 Do stuff.
534 pretty good fix 544 pretty good fix
535 better fix (alice) 545 better fix (alice)