tests/test-evolve-phase-divergence.t
branchmercurial-4.3
changeset 3818 f8677cb11dcb
parent 3716 e5ba6531503e
child 3936 537fd9a86c06
equal deleted inserted replaced
3817:5ca297e78f2c 3818:f8677cb11dcb
    78   searching for changes
    78   searching for changes
    79   adding changesets
    79   adding changesets
    80   adding manifests
    80   adding manifests
    81   adding file changes
    81   adding file changes
    82   added 1 changesets with 1 changes to 1 files
    82   added 1 changesets with 1 changes to 1 files
    83   new changesets 4d1169d82e47
       
    84   (run 'hg update' to get a working copy)
    83   (run 'hg update' to get a working copy)
    85 
    84 
    86   $ hg glog
    85   $ hg glog
    87   o  1:4d1169d82e47 modify a
    86   o  1:4d1169d82e47 modify a
    88   |   () draft
    87   |   () draft
   112 XXX: pull should tell us how to see what is the new phase-divergent changeset
   111 XXX: pull should tell us how to see what is the new phase-divergent changeset
   113   $ hg pull ../public
   112   $ hg pull ../public
   114   pulling from ../public
   113   pulling from ../public
   115   searching for changes
   114   searching for changes
   116   no changes found
   115   no changes found
   117   1 new phase-divergent changesets
   116   1 new bumped changesets
   118 
   117 
   119   $ hg glog
   118   $ hg glog
   120   @  2:98bb3a6cfe1a tweak a
   119   @  2:98bb3a6cfe1a tweak a
   121   |   () draft
   120   |   () draft
   122   | o  1:4d1169d82e47 modify a
   121   | o  1:4d1169d82e47 modify a
   127 Using evolve --list to list phase-divergent changesets
   126 Using evolve --list to list phase-divergent changesets
   128 ------------------------------------------------------
   127 ------------------------------------------------------
   129 
   128 
   130   $ hg evolve --list
   129   $ hg evolve --list
   131   98bb3a6cfe1a: tweak a
   130   98bb3a6cfe1a: tweak a
   132     phase-divergent: 4d1169d82e47 (immutable precursor)
   131     bumped: 4d1169d82e47 (immutable precursor)
   133   
   132   
   134 
   133 
   135 
   134 
   136 XXX-Pulkit: Trying to see instability on public changeset
   135 XXX-Pulkit: Trying to see instability on public changeset
   137 
   136 
   150 XXX: There must be mention of phase-divergence here
   149 XXX: There must be mention of phase-divergence here
   151   $ hg obslog -r . --all
   150   $ hg obslog -r . --all
   152   @  98bb3a6cfe1a (2) tweak a
   151   @  98bb3a6cfe1a (2) tweak a
   153   |
   152   |
   154   o  4d1169d82e47 (1) modify a
   153   o  4d1169d82e47 (1) modify a
   155        rewritten(description) as 98bb3a6cfe1a using amend by test (Thu Jan 01 00:00:00 1970 +0000)
   154        rewritten(description) as 98bb3a6cfe1a by test (Thu Jan 01 00:00:00 1970 +0000)
   156   
   155   
   157 Solving the phase divergence using evolve command
   156 Solving the phase divergence using evolve command
   158 --------------------------------------------------
   157 --------------------------------------------------
   159 
   158 
   160 (We do not solve evolution other than orphan by default because it turned out
   159 (We do not solve evolution other than orphan by default because it turned out
   182   recreate:[2] tweak a
   181   recreate:[2] tweak a
   183   atop:[1] modify a
   182   atop:[1] modify a
   184   hg rebase --rev 98bb3a6cfe1a --dest d3873e73d99e;
   183   hg rebase --rev 98bb3a6cfe1a --dest d3873e73d99e;
   185   hg update 4d1169d82e47;
   184   hg update 4d1169d82e47;
   186   hg revert --all --rev 98bb3a6cfe1a;
   185   hg revert --all --rev 98bb3a6cfe1a;
   187   hg commit --msg "phase-divergent update to 98bb3a6cfe1a"
   186   hg commit --msg "bumped update to 98bb3a6cfe1a"
   188 
   187 
   189 XXX: evolve should have mentioned that draft commit is just obsoleted in favour
   188 XXX: evolve should have mentioned that draft commit is just obsoleted in favour
   190 of public one. From the message it looks like a new commit is created.
   189 of public one. From the message it looks like a new commit is created.
   191 
   190 
   192   $ hg evolve --phase-divergent
   191   $ hg evolve --phase-divergent
   257   searching for changes
   256   searching for changes
   258   adding changesets
   257   adding changesets
   259   adding manifests
   258   adding manifests
   260   adding file changes
   259   adding file changes
   261   added 1 changesets with 1 changes to 1 files
   260   added 1 changesets with 1 changes to 1 files
   262   new changesets aa071e5554e3
       
   263   (run 'hg update' to get a working copy)
   261   (run 'hg update' to get a working copy)
   264 
   262 
   265   $ hg push ../public
   263   $ hg push ../public
   266   pushing to ../public
   264   pushing to ../public
   267   searching for changes
   265   searching for changes
   280 
   278 
   281   $ hg pull ../public
   279   $ hg pull ../public
   282   pulling from ../public
   280   pulling from ../public
   283   searching for changes
   281   searching for changes
   284   no changes found
   282   no changes found
   285   1 new phase-divergent changesets
   283   1 new bumped changesets
   286 
   284 
   287   $ hg glog
   285   $ hg glog
   288   @  4:d47f2b37ed82 added bar to foo
   286   @  5:d47f2b37ed82 added bar to foo
   289   |   (bm) draft
   287   |   (bm) draft
   290   | o  3:aa071e5554e3 added foo to foo
   288   | o  3:aa071e5554e3 added foo to foo
   291   |/    () public
   289   |/    () public
   292   o  1:4d1169d82e47 modify a
   290   o  1:4d1169d82e47 modify a
   293   |   () public
   291   |   () public
   302 
   300 
   303 XXX: we should document what should user expect where running this, writing this
   301 XXX: we should document what should user expect where running this, writing this
   304 test I have to go through code base to understand what will be the behavior
   302 test I have to go through code base to understand what will be the behavior
   305 
   303 
   306   $ hg evolve --phase-divergent
   304   $ hg evolve --phase-divergent
   307   recreate:[4] added bar to foo
   305   recreate:[5] added bar to foo
   308   atop:[3] added foo to foo
   306   atop:[3] added foo to foo
   309   computing new diff
   307   computing new diff
   310   committed as 3d62500c673d
   308   committed as bdf645eb43bb
   311   working directory is now at 3d62500c673d
   309   working directory is now at bdf645eb43bb
   312 
   310 
   313   $ hg exp
   311   $ hg exp
   314   # HG changeset patch
   312   # HG changeset patch
   315   # User test
   313   # User test
   316   # Date 0 0
   314   # Date 0 0
   317   #      Thu Jan 01 00:00:00 1970 +0000
   315   #      Thu Jan 01 00:00:00 1970 +0000
   318   # Node ID 3d62500c673dd1c88bb09a73e86d0210aed6fcb6
   316   # Node ID bdf645eb43bb0c9f180cd17d109bb359ce1571b2
   319   # Parent  aa071e5554e36080a36cfd24accd5a71e3320f1e
   317   # Parent  aa071e5554e36080a36cfd24accd5a71e3320f1e
   320   phase-divergent update to aa071e5554e3:
   318   bumped update to aa071e5554e3:
   321   
   319   
   322   added bar to foo
   320   added bar to foo
   323   
   321   
   324   diff -r aa071e5554e3 -r 3d62500c673d foo
   322   diff -r aa071e5554e3 -r bdf645eb43bb foo
   325   --- a/foo	Thu Jan 01 00:00:00 1970 +0000
   323   --- a/foo	Thu Jan 01 00:00:00 1970 +0000
   326   +++ b/foo	Thu Jan 01 00:00:00 1970 +0000
   324   +++ b/foo	Thu Jan 01 00:00:00 1970 +0000
   327   @@ -1,1 +1,2 @@
   325   @@ -1,1 +1,2 @@
   328    foo
   326    foo
   329   +bar
   327   +bar
   330 
   328 
   331 XXX: the commit message is not best one, we should give option to user to modify
   329 XXX: the commit message is not best one, we should give option to user to modify
   332 the commit message
   330 the commit message
   333 
   331 
   334   $ hg glog
   332   $ hg glog
   335   @  5:3d62500c673d phase-divergent update to aa071e5554e3:
   333   @  6:bdf645eb43bb bumped update to aa071e5554e3:
   336   |   (bm) draft
   334   |   (bm) draft
   337   o  3:aa071e5554e3 added foo to foo
   335   o  3:aa071e5554e3 added foo to foo
   338   |   () public
   336   |   () public
   339   o  1:4d1169d82e47 modify a
   337   o  1:4d1169d82e47 modify a
   340   |   () public
   338   |   () public
   341   o  0:d3873e73d99e init
   339   o  0:d3873e73d99e init
   342       () public
   340       () public
   343 
   341 
   344   $ hg obslog -r . --all
   342   $ hg obslog -r . --all
   345   @  3d62500c673d (5) phase-divergent update to aa071e5554e3:
   343   @  bdf645eb43bb (6) bumped update to aa071e5554e3:
   346   |
   344   |
   347   x  d47f2b37ed82 (4) added bar to foo
   345   x  d47f2b37ed82 (5) added bar to foo
   348   |    rewritten(description, parent, content) as 3d62500c673d using evolve by test (Thu Jan 01 00:00:00 1970 +0000)
   346   |    rewritten(description, parent, content) as bdf645eb43bb by test (Thu Jan 01 00:00:00 1970 +0000)
   349   |
   347   |
   350   o  aa071e5554e3 (3) added foo to foo
   348   o  aa071e5554e3 (3) added foo to foo
   351        rewritten(description, content) as d47f2b37ed82 using amend by test (Thu Jan 01 00:00:00 1970 +0000)
   349        rewritten(description, content) as d47f2b37ed82 by test (Thu Jan 01 00:00:00 1970 +0000)
   352   
   350   
   353 
   351 
   354 Syncing all other repositories
   352 Syncing all other repositories
   355 ------------------------------
   353 ------------------------------
   356 
   354 
   362   searching for changes
   360   searching for changes
   363   adding changesets
   361   adding changesets
   364   adding manifests
   362   adding manifests
   365   adding file changes
   363   adding file changes
   366   added 1 changesets with 1 changes to 1 files
   364   added 1 changesets with 1 changes to 1 files
   367   2 new obsolescence markers
   365   3 new obsolescence markers
   368 
   366 
   369   $ hg push ../private
   367   $ hg push ../private
   370   pushing to ../private
   368   pushing to ../private
   371   searching for changes
   369   searching for changes
   372   adding changesets
   370   adding changesets
   373   adding manifests
   371   adding manifests
   374   adding file changes
   372   adding file changes
   375   added 1 changesets with 1 changes to 1 files
   373   added 1 changesets with 1 changes to 1 files
   376   2 new obsolescence markers
   374   3 new obsolescence markers
   377 
   375 
   378   $ hg push ../public
   376   $ hg push ../public
   379   pushing to ../public
   377   pushing to ../public
   380   searching for changes
   378   searching for changes
   381   adding changesets
   379   adding changesets
   382   adding manifests
   380   adding manifests
   383   adding file changes
   381   adding file changes
   384   added 1 changesets with 1 changes to 1 files
   382   added 1 changesets with 1 changes to 1 files
   385   2 new obsolescence markers
   383   3 new obsolescence markers
   386 
   384 
   387 Creating a phasedivergence changeset where the divergent changeset changed in a
   385 Creating a phasedivergence changeset where the divergent changeset changed in a
   388 way that we rebase that on old public changeset, there will be conflicts, but
   386 way that we rebase that on old public changeset, there will be conflicts, but
   389 the `hg evolve` command handles it very well and uses `hg revert` logic to
   387 the `hg evolve` command handles it very well and uses `hg revert` logic to
   390 prevent any conflicts
   388 prevent any conflicts
   410   searching for changes
   408   searching for changes
   411   adding changesets
   409   adding changesets
   412   adding manifests
   410   adding manifests
   413   adding file changes
   411   adding file changes
   414   added 1 changesets with 1 changes to 1 files
   412   added 1 changesets with 1 changes to 1 files
   415   new changesets b756eb10ea73
       
   416   (run 'hg update' to get a working copy)
   413   (run 'hg update' to get a working copy)
   417 
   414 
   418   $ hg push ../public
   415   $ hg push ../public
   419   pushing to ../public
   416   pushing to ../public
   420   searching for changes
   417   searching for changes
   431 
   428 
   432   $ hg pull ../public
   429   $ hg pull ../public
   433   pulling from ../public
   430   pulling from ../public
   434   searching for changes
   431   searching for changes
   435   no changes found
   432   no changes found
   436   1 new phase-divergent changesets
   433   1 new bumped changesets
   437 
   434 
   438   $ hg glog
   435   $ hg glog
   439   @  7:2c3560aedead foo to bar
   436   @  9:d529f41744b3 foo to bar
   440   |   (bm) draft
   437   |   (bm) draft
   441   | o  6:b756eb10ea73 added bar to bar
   438   | o  7:6176b60d16d2 added bar to bar
   442   |/    () public
   439   |/    () public
   443   o  5:3d62500c673d phase-divergent update to aa071e5554e3:
   440   o  6:bdf645eb43bb bumped update to aa071e5554e3:
   444   |   () public
   441   |   () public
   445   o  3:aa071e5554e3 added foo to foo
   442   o  3:aa071e5554e3 added foo to foo
   446   |   () public
   443   |   () public
   447   o  1:4d1169d82e47 modify a
   444   o  1:4d1169d82e47 modify a
   448   |   () public
   445   |   () public
   451 
   448 
   452 Resolving the new phase-divergence changeset using `hg evolve`
   449 Resolving the new phase-divergence changeset using `hg evolve`
   453 ---------------------------------------------------------------
   450 ---------------------------------------------------------------
   454 
   451 
   455   $ hg evolve --phase-divergent
   452   $ hg evolve --phase-divergent
   456   recreate:[7] foo to bar
   453   recreate:[9] foo to bar
   457   atop:[6] added bar to bar
   454   atop:[7] added bar to bar
   458   computing new diff
   455   computing new diff
   459   committed as 502e73736632
   456   committed as 73f67b6cf2c4
   460   working directory is now at 502e73736632
   457   working directory is now at 73f67b6cf2c4
   461 
   458 
   462   $ hg exp
   459   $ hg exp
   463   # HG changeset patch
   460   # HG changeset patch
   464   # User test
   461   # User test
   465   # Date 0 0
   462   # Date 0 0
   466   #      Thu Jan 01 00:00:00 1970 +0000
   463   #      Thu Jan 01 00:00:00 1970 +0000
   467   # Node ID 502e737366322886cf628276aa0a2796904453b4
   464   # Node ID 73f67b6cf2c428075c41d377f8651912e0d8cae2
   468   # Parent  b756eb10ea73ee4ba69c998e64a5c6e1005d74b5
   465   # Parent  6176b60d16d20d69c77bb27c2a1b79caec671612
   469   phase-divergent update to b756eb10ea73:
   466   bumped update to 6176b60d16d2:
   470   
   467   
   471   foo to bar
   468   foo to bar
   472   
   469   
   473   diff -r b756eb10ea73 -r 502e73736632 bar
   470   diff -r 6176b60d16d2 -r 73f67b6cf2c4 bar
   474   --- a/bar	Thu Jan 01 00:00:00 1970 +0000
   471   --- a/bar	Thu Jan 01 00:00:00 1970 +0000
   475   +++ b/bar	Thu Jan 01 00:00:00 1970 +0000
   472   +++ b/bar	Thu Jan 01 00:00:00 1970 +0000
   476   @@ -1,1 +1,1 @@
   473   @@ -1,1 +1,1 @@
   477   -bar
   474   -bar
   478   +foo
   475   +foo
   479 
   476 
   480   $ hg glog
   477   $ hg glog
   481   @  8:502e73736632 phase-divergent update to b756eb10ea73:
   478   @  10:73f67b6cf2c4 bumped update to 6176b60d16d2:
   482   |   (bm) draft
   479   |   (bm) draft
   483   o  6:b756eb10ea73 added bar to bar
   480   o  7:6176b60d16d2 added bar to bar
   484   |   () public
   481   |   () public
   485   o  5:3d62500c673d phase-divergent update to aa071e5554e3:
   482   o  6:bdf645eb43bb bumped update to aa071e5554e3:
   486   |   () public
   483   |   () public
   487   o  3:aa071e5554e3 added foo to foo
   484   o  3:aa071e5554e3 added foo to foo
   488   |   () public
   485   |   () public
   489   o  1:4d1169d82e47 modify a
   486   o  1:4d1169d82e47 modify a
   490   |   () public
   487   |   () public
   499   searching for changes
   496   searching for changes
   500   adding changesets
   497   adding changesets
   501   adding manifests
   498   adding manifests
   502   adding file changes
   499   adding file changes
   503   added 1 changesets with 1 changes to 1 files
   500   added 1 changesets with 1 changes to 1 files
   504   2 new obsolescence markers
   501   3 new obsolescence markers
   505   $ hg push ../public
   502   $ hg push ../public
   506   pushing to ../public
   503   pushing to ../public
   507   searching for changes
   504   searching for changes
   508   adding changesets
   505   adding changesets
   509   adding manifests
   506   adding manifests
   510   adding file changes
   507   adding file changes
   511   added 1 changesets with 1 changes to 1 files
   508   added 1 changesets with 1 changes to 1 files
   512   2 new obsolescence markers
   509   3 new obsolescence markers
   513 
   510 
   514 Creating phase-divergence with divergent changeset and precursor having
   511 Creating phase-divergence with divergent changeset and precursor having
   515 different parents
   512 different parents
   516 -----------------------------------------------------------------------
   513 -----------------------------------------------------------------------
   517 
   514 
   538   searching for changes
   535   searching for changes
   539   adding changesets
   536   adding changesets
   540   adding manifests
   537   adding manifests
   541   adding file changes
   538   adding file changes
   542   added 2 changesets with 2 changes to 2 files
   539   added 2 changesets with 2 changes to 2 files
   543   2 new obsolescence markers
   540   3 new obsolescence markers
   544   new changesets 502e73736632:2352021b3785
       
   545   (run 'hg update' to get a working copy)
   541   (run 'hg update' to get a working copy)
   546   $ hg push ../public
   542   $ hg push ../public
   547   pushing to ../public
   543   pushing to ../public
   548   searching for changes
   544   searching for changes
   549   adding changesets
   545   adding changesets
   554 Alice like always dont care about Bob existence and rebases her changeset and
   550 Alice like always dont care about Bob existence and rebases her changeset and
   555 then pull from public repo creating phase divergence
   551 then pull from public repo creating phase divergence
   556 
   552 
   557   $ cd ../alice
   553   $ cd ../alice
   558   $ hg rebase -r . -d .^^^
   554   $ hg rebase -r . -d .^^^
   559   rebasing 9:2352021b3785 "added x to x" (bm tip)
   555   rebasing 11:ae81846887bc "added x to x" (tip bm)
   560 
   556 
   561   $ hg pull ../public
   557   $ hg pull ../public
   562   pulling from ../public
   558   pulling from ../public
   563   searching for changes
   559   searching for changes
   564   no changes found
   560   no changes found
   565   1 new phase-divergent changesets
   561   1 new bumped changesets
   566 
   562 
   567   $ hg obslog -r .
   563   $ hg obslog -r .
   568   @  334e300d6db5 (10) added x to x
   564   @  5cc37876a882 (12) added x to x
   569   |
   565   |
   570   o  2352021b3785 (9) added x to x
   566   o  ae81846887bc (11) added x to x
   571        rewritten(parent) as 334e300d6db5 using rebase by test (Thu Jan 01 00:00:00 1970 +0000)
   567        rewritten(parent) as 5cc37876a882 by test (Thu Jan 01 00:00:00 1970 +0000)
   572   
   568   
   573   $ hg glog -r .^::
   569   $ hg glog -r .^::
   574   hg: parse error at 4: not a prefix: end
   570   hg: parse error at 4: not a prefix: end
   575   [255]
   571   [255]
   576 
   572 
   577 Using `hg evolve` to resolve phase-divergence
   573 Using `hg evolve` to resolve phase-divergence
   578 ---------------------------------------------
   574 ---------------------------------------------
   579 
   575 
   580   $ hg evolve --phase-divergent
   576   $ hg evolve --phase-divergent
   581   recreate:[10] added x to x
   577   recreate:[12] added x to x
   582   atop:[9] added x to x
   578   atop:[11] added x to x
   583   rebasing to destination parent: 502e73736632
   579   rebasing to destination parent: 73f67b6cf2c4
   584   (leaving bookmark bm)
   580   (leaving bookmark bm)
   585   computing new diff
   581   computing new diff
   586   committed as 2352021b3785
   582   committed as ae81846887bc
   587   working directory is now at 2352021b3785
   583   working directory is now at ae81846887bc
   588 
   584 
   589 XXX: we should move bookmark here
   585 XXX: we should move bookmark here
   590   $ hg glog
   586   $ hg glog
   591   @  9:2352021b3785 added x to x
   587   @  11:ae81846887bc added x to x
   592   |   (bm) public
   588   |   (bm) public
   593   o  8:502e73736632 phase-divergent update to b756eb10ea73:
   589   o  10:73f67b6cf2c4 bumped update to 6176b60d16d2:
   594   |   () public
   590   |   () public
   595   o  6:b756eb10ea73 added bar to bar
   591   o  7:6176b60d16d2 added bar to bar
   596   |   () public
   592   |   () public
   597   o  5:3d62500c673d phase-divergent update to aa071e5554e3:
   593   o  6:bdf645eb43bb bumped update to aa071e5554e3:
   598   |   () public
   594   |   () public
   599   o  3:aa071e5554e3 added foo to foo
   595   o  3:aa071e5554e3 added foo to foo
   600   |   () public
   596   |   () public
   601   o  1:4d1169d82e47 modify a
   597   o  1:4d1169d82e47 modify a
   602   |   () public
   598   |   () public
   603   o  0:d3873e73d99e init
   599   o  0:d3873e73d99e init
   604       () public
   600       () public
   605 
   601 
   606   $ hg obslog -r . b1a0e143e32b --all --hidden
   602   $ hg obslog -r ae81846887bc --all --hidden
   607   x  b1a0e143e32b (11) added x to x
   603   x  14c7c60e138f (13) added x to x
   608   |    pruned using evolve by test (Thu Jan 01 00:00:00 1970 +0000)
   604   |    pruned by test (Thu Jan 01 00:00:00 1970 +0000)
   609   |
   605   |
   610   x  334e300d6db5 (10) added x to x
   606   x  5cc37876a882 (12) added x to x
   611   |    rewritten(parent) as b1a0e143e32b using evolve by test (Thu Jan 01 00:00:00 1970 +0000)
   607   |    rewritten(parent) as 14c7c60e138f by test (Thu Jan 01 00:00:00 1970 +0000)
   612   |
   608   |
   613   @  2352021b3785 (9) added x to x
   609   @  ae81846887bc (11) added x to x
   614        rewritten(parent) as 334e300d6db5 using rebase by test (Thu Jan 01 00:00:00 1970 +0000)
   610        rewritten(parent) as 5cc37876a882 by test (Thu Jan 01 00:00:00 1970 +0000)
   615   
   611   
   616 
   612 
   617   $ hg exp
   613   $ hg exp
   618   # HG changeset patch
   614   # HG changeset patch
   619   # User test
   615   # User test
   620   # Date 0 0
   616   # Date 0 0
   621   #      Thu Jan 01 00:00:00 1970 +0000
   617   #      Thu Jan 01 00:00:00 1970 +0000
   622   # Node ID 2352021b37851be226ebed109b0eb6eada918566
   618   # Node ID ae81846887bc53e9ba17ea2172950677d1ba3a1d
   623   # Parent  502e737366322886cf628276aa0a2796904453b4
   619   # Parent  73f67b6cf2c428075c41d377f8651912e0d8cae2
   624   added x to x
   620   added x to x
   625   
   621   
   626   diff -r 502e73736632 -r 2352021b3785 x
   622   diff -r 73f67b6cf2c4 -r ae81846887bc x
   627   --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   623   --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   628   +++ b/x	Thu Jan 01 00:00:00 1970 +0000
   624   +++ b/x	Thu Jan 01 00:00:00 1970 +0000
   629   @@ -0,0 +1,1 @@
   625   @@ -0,0 +1,1 @@
   630   +x
   626   +x
   631 
   627 
   634 -----------------------------------------------------------------------------
   630 -----------------------------------------------------------------------------
   635 
   631 
   636 Alice is tired of pushing and pulling and will create phase-divergence locally
   632 Alice is tired of pushing and pulling and will create phase-divergence locally
   637 
   633 
   638   $ hg glog
   634   $ hg glog
   639   @  9:2352021b3785 added x to x
   635   @  11:ae81846887bc added x to x
   640   |   (bm) public
   636   |   (bm) public
   641   o  8:502e73736632 phase-divergent update to b756eb10ea73:
   637   o  10:73f67b6cf2c4 bumped update to 6176b60d16d2:
   642   |   () public
   638   |   () public
   643   o  6:b756eb10ea73 added bar to bar
   639   o  7:6176b60d16d2 added bar to bar
   644   |   () public
   640   |   () public
   645   o  5:3d62500c673d phase-divergent update to aa071e5554e3:
   641   o  6:bdf645eb43bb bumped update to aa071e5554e3:
   646   |   () public
   642   |   () public
   647   o  3:aa071e5554e3 added foo to foo
   643   o  3:aa071e5554e3 added foo to foo
   648   |   () public
   644   |   () public
   649   o  1:4d1169d82e47 modify a
   645   o  1:4d1169d82e47 modify a
   650   |   () public
   646   |   () public
   654   $ echo y > y
   650   $ echo y > y
   655   $ echo foobar >> foo
   651   $ echo foobar >> foo
   656   $ hg add y
   652   $ hg add y
   657   $ hg ci -m "y to y and foobar to foo"
   653   $ hg ci -m "y to y and foobar to foo"
   658   $ hg rebase -r . -d .^^^
   654   $ hg rebase -r . -d .^^^
   659   rebasing 12:dc88f5aa9bc9 "y to y and foobar to foo" (tip)
   655   rebasing 14:43dd61d1a393 "y to y and foobar to foo" (tip)
   660 
   656 
   661   $ echo foo > y
   657   $ echo foo > y
   662   $ hg amend
   658   $ hg amend
   663 
   659 
   664 Alice making the old changeset public to have content-divergence
   660 Alice making the old changeset public to have content-divergence
   665 
   661 
   666   $ hg phase -r dc88f5aa9bc9 --public --hidden
   662   $ hg phase -r 43dd61d1a393 --public --hidden
   667   1 new phase-divergent changesets
   663   1 new bumped changesets
   668   $ hg glog
   664   $ hg glog
   669   @  14:13015a180eee y to y and foobar to foo
   665   @  17:694790041d7d y to y and foobar to foo
   670   |   () draft
   666   |   () draft
   671   | o  12:dc88f5aa9bc9 y to y and foobar to foo
   667   | o  14:43dd61d1a393 y to y and foobar to foo
   672   | |   () public
   668   | |   () public
   673   | o  9:2352021b3785 added x to x
   669   | o  11:ae81846887bc added x to x
   674   | |   (bm) public
   670   | |   (bm) public
   675   | o  8:502e73736632 phase-divergent update to b756eb10ea73:
   671   | o  10:73f67b6cf2c4 bumped update to 6176b60d16d2:
   676   |/    () public
   672   |/    () public
   677   o  6:b756eb10ea73 added bar to bar
   673   o  7:6176b60d16d2 added bar to bar
   678   |   () public
   674   |   () public
   679   o  5:3d62500c673d phase-divergent update to aa071e5554e3:
   675   o  6:bdf645eb43bb bumped update to aa071e5554e3:
   680   |   () public
   676   |   () public
   681   o  3:aa071e5554e3 added foo to foo
   677   o  3:aa071e5554e3 added foo to foo
   682   |   () public
   678   |   () public
   683   o  1:4d1169d82e47 modify a
   679   o  1:4d1169d82e47 modify a
   684   |   () public
   680   |   () public
   685   o  0:d3873e73d99e init
   681   o  0:d3873e73d99e init
   686       () public
   682       () public
   687 
   683 
   688   $ hg obslog -r .
   684   $ hg obslog -r .
   689   @  13015a180eee (14) y to y and foobar to foo
   685   @  694790041d7d (17) y to y and foobar to foo
   690   |
   686   |
   691   x  211ab84d1689 (13) y to y and foobar to foo
   687   x  9195657992dd (15) y to y and foobar to foo
   692   |    rewritten(content) as 13015a180eee using amend by test (Thu Jan 01 00:00:00 1970 +0000)
   688   |    rewritten(content) as 694790041d7d by test (Thu Jan 01 00:00:00 1970 +0000)
   693   |
   689   |
   694   o  dc88f5aa9bc9 (12) y to y and foobar to foo
   690   o  43dd61d1a393 (14) y to y and foobar to foo
   695        rewritten(parent) as 211ab84d1689 using rebase by test (Thu Jan 01 00:00:00 1970 +0000)
   691        rewritten(parent) as 9195657992dd by test (Thu Jan 01 00:00:00 1970 +0000)
   696   
   692   
   697 Resolving divergence using `hg evolve`
   693 Resolving divergence using `hg evolve`
   698 -------------------------------------
   694 -------------------------------------
   699 
   695 
   700   $ hg evolve --phase-divergent
   696   $ hg evolve --phase-divergent
   701   recreate:[14] y to y and foobar to foo
   697   recreate:[17] y to y and foobar to foo
   702   atop:[12] y to y and foobar to foo
   698   atop:[14] y to y and foobar to foo
   703   rebasing to destination parent: 2352021b3785
   699   rebasing to destination parent: ae81846887bc
   704   computing new diff
   700   computing new diff
   705   committed as 8c2bb6fb44e9
   701   committed as 8da44ebfc416
   706   working directory is now at 8c2bb6fb44e9
   702   working directory is now at 8da44ebfc416
   707 
   703 
   708   $ hg exp
   704   $ hg exp
   709   # HG changeset patch
   705   # HG changeset patch
   710   # User test
   706   # User test
   711   # Date 0 0
   707   # Date 0 0
   712   #      Thu Jan 01 00:00:00 1970 +0000
   708   #      Thu Jan 01 00:00:00 1970 +0000
   713   # Node ID 8c2bb6fb44e9443c64b3a2a3d061272c8e25e6ce
   709   # Node ID 8da44ebfc416e3a6fc52c29f3a78e1d87c0d492e
   714   # Parent  dc88f5aa9bc90a6418899d267d9524205dfb429b
   710   # Parent  43dd61d1a393577a202514a924148969b8f74db8
   715   phase-divergent update to dc88f5aa9bc9:
   711   bumped update to 43dd61d1a393:
   716   
   712   
   717   y to y and foobar to foo
   713   y to y and foobar to foo
   718   
   714   
   719   diff -r dc88f5aa9bc9 -r 8c2bb6fb44e9 y
   715   diff -r 43dd61d1a393 -r 8da44ebfc416 y
   720   --- a/y	Thu Jan 01 00:00:00 1970 +0000
   716   --- a/y	Thu Jan 01 00:00:00 1970 +0000
   721   +++ b/y	Thu Jan 01 00:00:00 1970 +0000
   717   +++ b/y	Thu Jan 01 00:00:00 1970 +0000
   722   @@ -1,1 +1,1 @@
   718   @@ -1,1 +1,1 @@
   723   -y
   719   -y
   724   +foo
   720   +foo
   725 
   721 
   726   $ hg glog
   722   $ hg glog
   727   @  16:8c2bb6fb44e9 phase-divergent update to dc88f5aa9bc9:
   723   @  19:8da44ebfc416 bumped update to 43dd61d1a393:
   728   |   () draft
   724   |   () draft
   729   o  12:dc88f5aa9bc9 y to y and foobar to foo
   725   o  14:43dd61d1a393 y to y and foobar to foo
   730   |   () public
   726   |   () public
   731   o  9:2352021b3785 added x to x
   727   o  11:ae81846887bc added x to x
   732   |   (bm) public
   728   |   (bm) public
   733   o  8:502e73736632 phase-divergent update to b756eb10ea73:
   729   o  10:73f67b6cf2c4 bumped update to 6176b60d16d2:
   734   |   () public
   730   |   () public
   735   o  6:b756eb10ea73 added bar to bar
   731   o  7:6176b60d16d2 added bar to bar
   736   |   () public
   732   |   () public
   737   o  5:3d62500c673d phase-divergent update to aa071e5554e3:
   733   o  6:bdf645eb43bb bumped update to aa071e5554e3:
   738   |   () public
   734   |   () public
   739   o  3:aa071e5554e3 added foo to foo
   735   o  3:aa071e5554e3 added foo to foo
   740   |   () public
   736   |   () public
   741   o  1:4d1169d82e47 modify a
   737   o  1:4d1169d82e47 modify a
   742   |   () public
   738   |   () public
   748 -----------------------------------------------------------------------------
   744 -----------------------------------------------------------------------------
   749 
   745 
   750   $ echo l > l
   746   $ echo l > l
   751   $ hg ci -Aqm "added l to l"
   747   $ hg ci -Aqm "added l to l"
   752   $ hg rebase -r . -d .^^^^
   748   $ hg rebase -r . -d .^^^^
   753   rebasing 17:f3794e5a91dc "added l to l" (tip)
   749   rebasing 20:515507bedb51 "added l to l" (tip)
   754   $ echo kl > l
   750   $ echo kl > l
   755   $ echo foo > x
   751   $ echo foo > x
   756   $ hg add x
   752   $ hg add x
   757   $ hg amend
   753   $ hg amend
   758 
   754 
   759   $ hg obslog -r .
   755   $ hg obslog -r .
   760   @  5fd38c0de46e (19) added l to l
   756   @  e3c208c26c0c (23) added l to l
   761   |
   757   |
   762   x  2bfd56949cf0 (18) added l to l
   758   x  c114000165ef (21) added l to l
   763   |    rewritten(content) as 5fd38c0de46e using amend by test (Thu Jan 01 00:00:00 1970 +0000)
   759   |    rewritten(content) as e3c208c26c0c by test (Thu Jan 01 00:00:00 1970 +0000)
   764   |
   760   |
   765   x  f3794e5a91dc (17) added l to l
   761   x  515507bedb51 (20) added l to l
   766        rewritten(parent) as 2bfd56949cf0 using rebase by test (Thu Jan 01 00:00:00 1970 +0000)
   762        rewritten(parent) as c114000165ef by test (Thu Jan 01 00:00:00 1970 +0000)
   767   
   763   
   768 
   764 
   769   $ hg phase -r f3794e5a91dc --public --hidden
   765   $ hg phase -r 515507bedb51 --public --hidden
   770   1 new phase-divergent changesets
   766   1 new bumped changesets
   771 
   767 
   772 Resolution using `hg evolve --phase-divergent`
   768 Resolution using `hg evolve --phase-divergent`
   773 ----------------------------------------------
   769 ----------------------------------------------
   774 
   770 
   775   $ hg evolve --phase-divergent
   771   $ hg evolve --phase-divergent
   776   recreate:[19] added l to l
   772   recreate:[23] added l to l
   777   atop:[17] added l to l
   773   atop:[20] added l to l
   778   rebasing to destination parent: 8c2bb6fb44e9
   774   rebasing to destination parent: 8da44ebfc416
   779   merging x
   775   merging x
   780   warning: conflicts while merging x! (edit, then use 'hg resolve --mark')
   776   warning: conflicts while merging x! (edit, then use 'hg resolve --mark')
   781   evolution failed!
   777   evolution failed!
   782   fix conflict then run 'hg evolve --continue' or use `hg evolve --abort`
   778   fix conflict then run 'hg evolve --continue' or use `hg evolve --abort`
   783   abort: unresolved merge conflicts (see hg help resolve)
   779   abort: unresolved merge conflicts (see hg help resolve)
   784   [255]
   780   [255]
   785 
   781 
   786   $ hg diff
   782   $ hg diff
   787   diff -r 8c2bb6fb44e9 l
   783   diff -r 8da44ebfc416 l
   788   --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   784   --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   789   +++ b/l	Thu Jan 01 00:00:00 1970 +0000
   785   +++ b/l	Thu Jan 01 00:00:00 1970 +0000
   790   @@ -0,0 +1,1 @@
   786   @@ -0,0 +1,1 @@
   791   +kl
   787   +kl
   792   diff -r 8c2bb6fb44e9 x
   788   diff -r 8da44ebfc416 x
   793   --- a/x	Thu Jan 01 00:00:00 1970 +0000
   789   --- a/x	Thu Jan 01 00:00:00 1970 +0000
   794   +++ b/x	Thu Jan 01 00:00:00 1970 +0000
   790   +++ b/x	Thu Jan 01 00:00:00 1970 +0000
   795   @@ -1,1 +1,5 @@
   791   @@ -1,1 +1,5 @@
   796   +<<<<<<< destination: 8c2bb6fb44e9 - test: phase-divergent update to dc88f5aa9...
   792   +<<<<<<< destination: 8da44ebfc416 - test: bumped update to 43dd61d1a393:
   797    x
   793    x
   798   +=======
   794   +=======
   799   +foo
   795   +foo
   800   +>>>>>>> evolving:    5fd38c0de46e - test: added l to l
   796   +>>>>>>> evolving:    e3c208c26c0c - test: added l to l
   801 
   797 
   802   $ echo foo > x
   798   $ echo foo > x
   803 
   799 
   804   $ hg resolve -m
   800   $ hg resolve -m
   805   (no more unresolved files)
   801   (no more unresolved files)
   806   continue: hg evolve --continue
   802   continue: hg evolve --continue
   807 
   803 
   808   $ hg evolve --continue
   804   $ hg evolve --continue
   809   evolving 19:5fd38c0de46e "added l to l"
   805   evolving 23:e3c208c26c0c "added l to l"
   810   computing new diff
   806   computing new diff
   811   committed as e3090241a10c
   807   committed as 01e0d829c156
   812   working directory is now at e3090241a10c
   808   working directory is now at 01e0d829c156
   813 
   809 
   814   $ hg glog
   810   $ hg glog
   815   @  21:e3090241a10c phase-divergent update to f3794e5a91dc:
   811   @  25:01e0d829c156 bumped update to 515507bedb51:
   816   |   () draft
   812   |   () draft
   817   o  17:f3794e5a91dc added l to l
   813   o  20:515507bedb51 added l to l
   818   |   () public
   814   |   () public
   819   o  16:8c2bb6fb44e9 phase-divergent update to dc88f5aa9bc9:
   815   o  19:8da44ebfc416 bumped update to 43dd61d1a393:
   820   |   () public
   816   |   () public
   821   o  12:dc88f5aa9bc9 y to y and foobar to foo
   817   o  14:43dd61d1a393 y to y and foobar to foo
   822   |   () public
   818   |   () public
   823   o  9:2352021b3785 added x to x
   819   o  11:ae81846887bc added x to x
   824   |   (bm) public
   820   |   (bm) public
   825   o  8:502e73736632 phase-divergent update to b756eb10ea73:
   821   o  10:73f67b6cf2c4 bumped update to 6176b60d16d2:
   826   |   () public
   822   |   () public
   827   o  6:b756eb10ea73 added bar to bar
   823   o  7:6176b60d16d2 added bar to bar
   828   |   () public
   824   |   () public
   829   o  5:3d62500c673d phase-divergent update to aa071e5554e3:
   825   o  6:bdf645eb43bb bumped update to aa071e5554e3:
   830   |   () public
   826   |   () public
   831   o  3:aa071e5554e3 added foo to foo
   827   o  3:aa071e5554e3 added foo to foo
   832   |   () public
   828   |   () public
   833   o  1:4d1169d82e47 modify a
   829   o  1:4d1169d82e47 modify a
   834   |   () public
   830   |   () public
   838   $ hg exp
   834   $ hg exp
   839   # HG changeset patch
   835   # HG changeset patch
   840   # User test
   836   # User test
   841   # Date 0 0
   837   # Date 0 0
   842   #      Thu Jan 01 00:00:00 1970 +0000
   838   #      Thu Jan 01 00:00:00 1970 +0000
   843   # Node ID e3090241a10c320b6132e4673915fd6b19c0de39
   839   # Node ID 01e0d829c1560d8297062062dff671e272439e38
   844   # Parent  f3794e5a91dc1d4d36fee5c423386b19433a1f48
   840   # Parent  515507bedb512ac15258c2ab44809645139055ef
   845   phase-divergent update to f3794e5a91dc:
   841   bumped update to 515507bedb51:
   846   
   842   
   847   added l to l
   843   added l to l
   848   
   844   
   849   diff -r f3794e5a91dc -r e3090241a10c l
   845   diff -r 515507bedb51 -r 01e0d829c156 l
   850   --- a/l	Thu Jan 01 00:00:00 1970 +0000
   846   --- a/l	Thu Jan 01 00:00:00 1970 +0000
   851   +++ b/l	Thu Jan 01 00:00:00 1970 +0000
   847   +++ b/l	Thu Jan 01 00:00:00 1970 +0000
   852   @@ -1,1 +1,1 @@
   848   @@ -1,1 +1,1 @@
   853   -l
   849   -l
   854   +kl
   850   +kl
   855   diff -r f3794e5a91dc -r e3090241a10c x
   851   diff -r 515507bedb51 -r 01e0d829c156 x
   856   --- a/x	Thu Jan 01 00:00:00 1970 +0000
   852   --- a/x	Thu Jan 01 00:00:00 1970 +0000
   857   +++ b/x	Thu Jan 01 00:00:00 1970 +0000
   853   +++ b/x	Thu Jan 01 00:00:00 1970 +0000
   858   @@ -1,1 +1,1 @@
   854   @@ -1,1 +1,1 @@
   859   -x
   855   -x
   860   +foo
   856   +foo
   861 
   857 
   862 Creating phase divergence when couple of changesets are folded into one
   858 Creating phase divergence when couple of changesets are folded into one
   863 ------------------------------------------------------------------------
   859 ------------------------------------------------------------------------
   864 
   860 
   865   $ hg glog -r .
   861   $ hg glog -r .
   866   @  21:e3090241a10c phase-divergent update to f3794e5a91dc:
   862   @  25:01e0d829c156 bumped update to 515507bedb51:
   867   |   () draft
   863   |   () draft
   868   ~
   864   ~
   869   $ echo f > f
   865   $ echo f > f
   870   $ hg ci -Aqm "added f"
   866   $ hg ci -Aqm "added f"
   871   $ echo g > g
   867   $ echo g > g
   875   2 changesets folded
   871   2 changesets folded
   876   0 files updated, 0 files merged, 0 files removed, 0 files unresolved
   872   0 files updated, 0 files merged, 0 files removed, 0 files unresolved
   877 
   873 
   878   $ hg evolve --list
   874   $ hg evolve --list
   879 
   875 
   880   $ hg phase -r 428f7900a969 --public --hidden
   876   $ hg phase -r e86ee52bfd76 --public --hidden
   881   1 new phase-divergent changesets
   877   1 new bumped changesets
   882 
   878 
   883   $ hg glog -r f3794e5a91dc::
   879   $ hg glog -r 515507bedb51::
   884   @  24:e450d05b7d27 added g
   880   @  28:d83c51bdc098 added g
   885   |   () draft
   881   |   () draft
   886   | o  23:428f7900a969 added g
   882   | o  27:e86ee52bfd76 added g
   887   | |   () public
   883   | |   () public
   888   | o  22:21ae52e414e6 added f
   884   | o  26:d3c143cd906e added f
   889   |/    () public
   885   |/    () public
   890   o  21:e3090241a10c phase-divergent update to f3794e5a91dc:
   886   o  25:01e0d829c156 bumped update to 515507bedb51:
   891   |   () public
   887   |   () public
   892   o  17:f3794e5a91dc added l to l
   888   o  20:515507bedb51 added l to l
   893   |   () public
   889   |   () public
   894   ~
   890   ~
   895 
   891 
   896   $ hg evolve --list
   892   $ hg evolve --list
   897   e450d05b7d27: added g
   893   d83c51bdc098: added g
   898     phase-divergent: 21ae52e414e6 (immutable precursor)
   894     bumped: d3c143cd906e (immutable precursor)
   899     phase-divergent: 428f7900a969 (immutable precursor)
   895     bumped: e86ee52bfd76 (immutable precursor)
   900   
   896   
   901 Resolving phase divergence using `hg evolve`
   897 Resolving phase divergence using `hg evolve`
   902 
   898 
   903   $ hg evolve --phase-divergent --all
   899   $ hg evolve --phase-divergent --all
   904   recreate:[24] added g
   900   recreate:[28] added g
   905   atop:[23] added g
   901   atop:[27] added g
   906   rebasing to destination parent: 21ae52e414e6
   902   rebasing to destination parent: d3c143cd906e
   907   computing new diff
   903   computing new diff
   908   committed as 428f7900a969
   904   committed as e86ee52bfd76
   909   working directory is now at 428f7900a969
   905   working directory is now at e86ee52bfd76
   910 
   906 
   911   $ hg glog -r f3794e5a91dc::
   907   $ hg glog -r 515507bedb51::
   912   @  23:428f7900a969 added g
   908   @  27:e86ee52bfd76 added g
   913   |   () public
   909   |   () public
   914   o  22:21ae52e414e6 added f
   910   o  26:d3c143cd906e added f
   915   |   () public
   911   |   () public
   916   o  21:e3090241a10c phase-divergent update to f3794e5a91dc:
   912   o  25:01e0d829c156 bumped update to 515507bedb51:
   917   |   () public
   913   |   () public
   918   o  17:f3794e5a91dc added l to l
   914   o  20:515507bedb51 added l to l
   919   |   () public
   915   |   () public
   920   ~
   916   ~
   921 
   917 
   922 When the public changesets is splitted causing phase-divergence
   918 When the public changesets is splitted causing phase-divergence
   923 ---------------------------------------------------------------
   919 ---------------------------------------------------------------
   924 
   920 
   925   $ echo m > m
   921   $ echo m > m
   926   $ echo n > n
   922   $ echo n > n
   927   $ hg ci -Aqm "added m and n"
   923   $ hg ci -Aqm "added m and n"
   928 
   924 
   929   $ hg glog -r 21ae52e414e6::
   925   $ hg glog -r d3c143cd906e::
   930   @  26:849cee0a874b added m and n
   926   @  30:bbb1ce6e7cb5 added m and n
   931   |   () draft
   927   |   () draft
   932   o  23:428f7900a969 added g
   928   o  27:e86ee52bfd76 added g
   933   |   () public
   929   |   () public
   934   o  22:21ae52e414e6 added f
   930   o  26:d3c143cd906e added f
   935   |   () public
   931   |   () public
   936   ~
   932   ~
   937 
   933 
   938   $ hg prev
   934   $ hg prev
   939   0 files updated, 0 files merged, 2 files removed, 0 files unresolved
   935   0 files updated, 0 files merged, 2 files removed, 0 files unresolved
   940   [23] added g
   936   [27] added g
   941   $ echo m > m
   937   $ echo m > m
   942   $ hg ci -Aqm "added m"
   938   $ hg ci -Aqm "added m"
   943   $ echo n > n
   939   $ echo n > n
   944   $ hg ci -Aqm "added n"
   940   $ hg ci -Aqm "added n"
   945 
   941 
   946   $ hg glog -r 428f7900a969::
   942   $ hg glog -r e86ee52bfd76::
   947   @  28:63ccb8ea7cae added n
   943   @  32:e1e84fb7bd8c added n
   948   |   () draft
   944   |   () draft
   949   o  27:f313e2b90e70 added m
   945   o  31:38f8157363bc added m
   950   |   () draft
   946   |   () draft
   951   | o  26:849cee0a874b added m and n
   947   | o  30:bbb1ce6e7cb5 added m and n
   952   |/    () draft
   948   |/    () draft
   953   o  23:428f7900a969 added g
   949   o  27:e86ee52bfd76 added g
   954   |   () public
   950   |   () public
   955   ~
   951   ~
   956 
   952 
   957   $ hg prune -r 849cee0a874b --succ f313e2b90e70 --succ 63ccb8ea7cae --split
   953   $ hg prune -r bbb1ce6e7cb5 --succ 38f8157363bc --succ e1e84fb7bd8c --split
   958   1 changesets pruned
   954   1 changesets pruned
   959 
   955 
   960   $ hg phase -r 849cee0a874b --hidden --public
   956   $ hg phase -r bbb1ce6e7cb5 --hidden --public
   961   2 new phase-divergent changesets
   957   2 new bumped changesets
   962 
   958 
   963   $ hg glog -r 428f7900a969::
   959   $ hg glog -r e86ee52bfd76::
   964   @  28:63ccb8ea7cae added n
   960   @  32:e1e84fb7bd8c added n
   965   |   () draft
   961   |   () draft
   966   o  27:f313e2b90e70 added m
   962   o  31:38f8157363bc added m
   967   |   () draft
   963   |   () draft
   968   | o  26:849cee0a874b added m and n
   964   | o  30:bbb1ce6e7cb5 added m and n
   969   |/    () public
   965   |/    () public
   970   o  23:428f7900a969 added g
   966   o  27:e86ee52bfd76 added g
   971   |   () public
   967   |   () public
   972   ~
   968   ~
   973 
   969 
   974   $ hg evolve --all --phase-divergent
   970   $ hg evolve --all --phase-divergent
   975   recreate:[27] added m
   971   recreate:[31] added m
   976   atop:[26] added m and n
   972   atop:[30] added m and n
   977   computing new diff
   973   computing new diff
   978   committed as 870e1c3eddc3
   974   committed as 26c0e0acbf58
   979   recreate:[28] added n
   975   recreate:[32] added n
   980   atop:[26] added m and n
   976   atop:[30] added m and n
   981   rebasing to destination parent: 428f7900a969
   977   rebasing to destination parent: e86ee52bfd76
   982   computing new diff
   978   computing new diff
   983   committed as 154b0179fb9b
   979   committed as 167994483a30
   984   working directory is now at 154b0179fb9b
   980   working directory is now at 167994483a30
   985 
   981 
   986 XXX: this is messy, we should solve things in better way
   982 XXX: this is messy, we should solve things in better way
   987   $ hg glog -r 428f7900a969:: --hidden
   983   $ hg glog -r e86ee52bfd76:: --hidden
   988   @  31:154b0179fb9b phase-divergent update to 849cee0a874b:
   984   @  35:167994483a30 bumped update to bbb1ce6e7cb5:
   989   |   () draft
   985   |   () draft
   990   | x  30:1ebf33547a82 added n
   986   | x  34:ebca40be1c77 added n
   991   | |   () draft
   987   | |   () draft
   992   +---o  29:870e1c3eddc3 phase-divergent update to 849cee0a874b:
   988   +---o  33:26c0e0acbf58 bumped update to bbb1ce6e7cb5:
   993   | |     () draft
   989   | |     () draft
   994   | | x  28:63ccb8ea7cae added n
   990   | | x  32:e1e84fb7bd8c added n
   995   | | |   () draft
   991   | | |   () draft
   996   | | x  27:f313e2b90e70 added m
   992   | | x  31:38f8157363bc added m
   997   | |/    () draft
   993   | |/    () draft
   998   o |  26:849cee0a874b added m and n
   994   o |  30:bbb1ce6e7cb5 added m and n
   999   |/    () public
   995   |/    () public
  1000   o  23:428f7900a969 added g
   996   o  27:e86ee52bfd76 added g
  1001   |   () public
   997   |   () public
  1002   ~
   998   ~
  1003 
   999 
  1004 XXX: not sure this is the correct
  1000 XXX: not sure this is the correct
  1005   $ hg exp 154b0179fb9b
  1001   $ hg exp 167994483a30
  1006   # HG changeset patch
  1002   # HG changeset patch
  1007   # User test
  1003   # User test
  1008   # Date 0 0
  1004   # Date 0 0
  1009   #      Thu Jan 01 00:00:00 1970 +0000
  1005   #      Thu Jan 01 00:00:00 1970 +0000
  1010   # Node ID 154b0179fb9b53d2f853d6ba04740bb3d7a5cabe
  1006   # Node ID 167994483a3052f6ea76aa4ba54bd0d6ecd03506
  1011   # Parent  849cee0a874be7c4e75dfacb5ad72aa5696951ba
  1007   # Parent  bbb1ce6e7cb56a4d0ddd9b602492c1e79f2beaf5
  1012   phase-divergent update to 849cee0a874b:
  1008   bumped update to bbb1ce6e7cb5:
  1013   
  1009   
  1014   added n
  1010   added n
  1015   
  1011   
  1016   diff -r 849cee0a874b -r 154b0179fb9b m
  1012   diff -r bbb1ce6e7cb5 -r 167994483a30 m
  1017   --- a/m	Thu Jan 01 00:00:00 1970 +0000
  1013   --- a/m	Thu Jan 01 00:00:00 1970 +0000
  1018   +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
  1014   +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
  1019   @@ -1,1 +0,0 @@
  1015   @@ -1,1 +0,0 @@
  1020   -m
  1016   -m
  1021 
  1017 
  1022 XXX: not sure this is correct
  1018 XXX: not sure this is correct
  1023   $ hg exp 870e1c3eddc3
  1019   $ hg exp 26c0e0acbf58 --hidden
  1024   # HG changeset patch
  1020   # HG changeset patch
  1025   # User test
  1021   # User test
  1026   # Date 0 0
  1022   # Date 0 0
  1027   #      Thu Jan 01 00:00:00 1970 +0000
  1023   #      Thu Jan 01 00:00:00 1970 +0000
  1028   # Node ID 870e1c3eddc34cc475e8e13d2fe1934210c1937e
  1024   # Node ID 26c0e0acbf58e4bd2a2414e43b7d2d8aefdbba60
  1029   # Parent  849cee0a874be7c4e75dfacb5ad72aa5696951ba
  1025   # Parent  bbb1ce6e7cb56a4d0ddd9b602492c1e79f2beaf5
  1030   phase-divergent update to 849cee0a874b:
  1026   bumped update to bbb1ce6e7cb5:
  1031   
  1027   
  1032   added m
  1028   added m
  1033   
  1029   
  1034   diff -r 849cee0a874b -r 870e1c3eddc3 n
  1030   diff -r bbb1ce6e7cb5 -r 26c0e0acbf58 n
  1035   --- a/n	Thu Jan 01 00:00:00 1970 +0000
  1031   --- a/n	Thu Jan 01 00:00:00 1970 +0000
  1036   +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
  1032   +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
  1037   @@ -1,1 +0,0 @@
  1033   @@ -1,1 +0,0 @@
  1038   -n
  1034   -n
  1039 
  1035 
  1044   $ echo q > q
  1040   $ echo q > q
  1045   $ hg ci -Aqm "added p and q"
  1041   $ hg ci -Aqm "added p and q"
  1046 
  1042 
  1047   $ hg prev
  1043   $ hg prev
  1048   0 files updated, 0 files merged, 2 files removed, 0 files unresolved
  1044   0 files updated, 0 files merged, 2 files removed, 0 files unresolved
  1049   [31] phase-divergent update to 849cee0a874b:
  1045   [35] bumped update to bbb1ce6e7cb5:
  1050   $ echo p > p
  1046   $ echo p > p
  1051   $ hg ci -Aqm "added p"
  1047   $ hg ci -Aqm "added p"
  1052   $ hg prev
  1048   $ hg prev
  1053   0 files updated, 0 files merged, 1 files removed, 0 files unresolved
  1049   0 files updated, 0 files merged, 1 files removed, 0 files unresolved
  1054   [31] phase-divergent update to 849cee0a874b:
  1050   [35] bumped update to bbb1ce6e7cb5:
  1055   $ echo q > q
  1051   $ echo q > q
  1056   $ hg ci -Aqm "added q"
  1052   $ hg ci -Aqm "added q"
  1057 
  1053 
  1058   $ hg glog -r 154b0179fb9b::
  1054   $ hg glog -r 167994483a30::
  1059   @  34:e046341aa97c added q
  1055   @  38:25009377929c added q
  1060   |   () draft
  1056   |   () draft
  1061   | o  33:6f8c250eecff added p
  1057   | o  37:a27f3cc92c8f added p
  1062   |/    () draft
  1058   |/    () draft
  1063   | o  32:8a70f55b2af3 added p and q
  1059   | o  36:f695c2c8812d added p and q
  1064   |/    () draft
  1060   |/    () draft
  1065   o  31:154b0179fb9b phase-divergent update to 849cee0a874b:
  1061   o  35:167994483a30 bumped update to bbb1ce6e7cb5:
  1066   |   () draft
  1062   |   () draft
  1067   ~
  1063   ~
  1068 
  1064 
  1069   $ hg prune -r 8a70f55b2af3 --succ 6f8c250eecff --succ e046341aa97c --split
  1065   $ hg prune -r f695c2c8812d --succ a27f3cc92c8f --succ 25009377929c --split
  1070   1 changesets pruned
  1066   1 changesets pruned
  1071 
  1067 
  1072   $ hg phase -r 8a70f55b2af3 --public --hidden
  1068   $ hg phase -r f695c2c8812d --public --hidden
  1073   2 new phase-divergent changesets
  1069   2 new bumped changesets
  1074 
  1070 
  1075   $ hg glog -r 154b0179fb9b::
  1071   $ hg glog -r 167994483a30::
  1076   @  34:e046341aa97c added q
  1072   @  38:25009377929c added q
  1077   |   () draft
  1073   |   () draft
  1078   | o  33:6f8c250eecff added p
  1074   | o  37:a27f3cc92c8f added p
  1079   |/    () draft
  1075   |/    () draft
  1080   | o  32:8a70f55b2af3 added p and q
  1076   | o  36:f695c2c8812d added p and q
  1081   |/    () public
  1077   |/    () public
  1082   o  31:154b0179fb9b phase-divergent update to 849cee0a874b:
  1078   o  35:167994483a30 bumped update to bbb1ce6e7cb5:
  1083   |   () public
  1079   |   () public
  1084   ~
  1080   ~
  1085 
  1081 
  1086   $ hg evolve --list
  1082   $ hg evolve --list
  1087   6f8c250eecff: added p
  1083   a27f3cc92c8f: added p
  1088     phase-divergent: 8a70f55b2af3 (immutable precursor)
  1084     bumped: f695c2c8812d (immutable precursor)
  1089   
  1085   
  1090   e046341aa97c: added q
  1086   25009377929c: added q
  1091     phase-divergent: 8a70f55b2af3 (immutable precursor)
  1087     bumped: f695c2c8812d (immutable precursor)
  1092   
  1088   
  1093   $ hg evolve --all --phase-divergent
  1089   $ hg evolve --all --phase-divergent
  1094   recreate:[33] added p
  1090   recreate:[37] added p
  1095   atop:[32] added p and q
  1091   atop:[36] added p and q
  1096   computing new diff
  1092   computing new diff
  1097   committed as f3e41d89b3c5
  1093   committed as abd19926ab01
  1098   recreate:[34] added q
  1094   recreate:[38] added q
  1099   atop:[32] added p and q
  1095   atop:[36] added p and q
  1100   computing new diff
  1096   computing new diff
  1101   committed as 605c306d4f87
  1097   committed as 12c31db4edf9
  1102   working directory is now at 605c306d4f87
  1098   working directory is now at 12c31db4edf9
  1103 
  1099 
  1104   $ hg glog -r 154b0179fb9b:: --hidden
  1100   $ hg glog -r 167994483a30:: --hidden
  1105   @  36:605c306d4f87 phase-divergent update to 8a70f55b2af3:
  1101   @  40:12c31db4edf9 bumped update to f695c2c8812d:
  1106   |   () draft
  1102   |   () draft
  1107   | o  35:f3e41d89b3c5 phase-divergent update to 8a70f55b2af3:
  1103   | o  39:abd19926ab01 bumped update to f695c2c8812d:
  1108   |/    () draft
  1104   |/    () draft
  1109   | x  34:e046341aa97c added q
  1105   | x  38:25009377929c added q
  1110   | |   () draft
  1106   | |   () draft
  1111   | | x  33:6f8c250eecff added p
  1107   | | x  37:a27f3cc92c8f added p
  1112   | |/    () draft
  1108   | |/    () draft
  1113   o |  32:8a70f55b2af3 added p and q
  1109   o |  36:f695c2c8812d added p and q
  1114   |/    () public
  1110   |/    () public
  1115   o  31:154b0179fb9b phase-divergent update to 849cee0a874b:
  1111   o  35:167994483a30 bumped update to bbb1ce6e7cb5:
  1116   |   () public
  1112   |   () public
  1117   ~
  1113   ~
  1118 
  1114 
  1119 XXX: not sure this is correct
  1115 XXX: not sure this is correct
  1120   $ hg exp 605c306d4f87
  1116   $ hg exp 12c31db4edf9
  1121   # HG changeset patch
  1117   # HG changeset patch
  1122   # User test
  1118   # User test
  1123   # Date 0 0
  1119   # Date 0 0
  1124   #      Thu Jan 01 00:00:00 1970 +0000
  1120   #      Thu Jan 01 00:00:00 1970 +0000
  1125   # Node ID 605c306d4f87fccfdb5e7dd1c750b6d4f813defb
  1121   # Node ID 12c31db4edf9a889e3ce9986f484bbf939f4fb42
  1126   # Parent  8a70f55b2af35452916dc89401a5ecf6553646a5
  1122   # Parent  f695c2c8812d12a910a47440ee189e553326a1c8
  1127   phase-divergent update to 8a70f55b2af3:
  1123   bumped update to f695c2c8812d:
  1128   
  1124   
  1129   added q
  1125   added q
  1130   
  1126   
  1131   diff -r 8a70f55b2af3 -r 605c306d4f87 p
  1127   diff -r f695c2c8812d -r 12c31db4edf9 p
  1132   --- a/p	Thu Jan 01 00:00:00 1970 +0000
  1128   --- a/p	Thu Jan 01 00:00:00 1970 +0000
  1133   +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
  1129   +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
  1134   @@ -1,1 +0,0 @@
  1130   @@ -1,1 +0,0 @@
  1135   -p
  1131   -p
  1136 
  1132 
  1137 XXX: not sure this is correct
  1133 XXX: not sure this is correct
  1138   $ hg exp f3e41d89b3c5
  1134   $ hg exp abd19926ab01
  1139   # HG changeset patch
  1135   # HG changeset patch
  1140   # User test
  1136   # User test
  1141   # Date 0 0
  1137   # Date 0 0
  1142   #      Thu Jan 01 00:00:00 1970 +0000
  1138   #      Thu Jan 01 00:00:00 1970 +0000
  1143   # Node ID f3e41d89b3c5f6ee49ccc734045856d7b025f048
  1139   # Node ID abd19926ab0109f43f38e732cfa8ae747e2e4187
  1144   # Parent  8a70f55b2af35452916dc89401a5ecf6553646a5
  1140   # Parent  f695c2c8812d12a910a47440ee189e553326a1c8
  1145   phase-divergent update to 8a70f55b2af3:
  1141   bumped update to f695c2c8812d:
  1146   
  1142   
  1147   added p
  1143   added p
  1148   
  1144   
  1149   diff -r 8a70f55b2af3 -r f3e41d89b3c5 q
  1145   diff -r f695c2c8812d -r abd19926ab01 q
  1150   --- a/q	Thu Jan 01 00:00:00 1970 +0000
  1146   --- a/q	Thu Jan 01 00:00:00 1970 +0000
  1151   +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
  1147   +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
  1152   @@ -1,1 +0,0 @@
  1148   @@ -1,1 +0,0 @@
  1153   -q
  1149   -q
  1154 
  1150 
  1155 Testing the evolution of a phase-divergent merge with no conflicts
  1151 Testing the evolution of a phase-divergent merge with no conflicts
  1156 ------------------------------------------------------------------
  1152 ------------------------------------------------------------------
  1157 
  1153 
  1158   $ hg glog -r 154b0179fb9b::
  1154   $ hg glog -r 167994483a30::
  1159   @  36:605c306d4f87 phase-divergent update to 8a70f55b2af3:
  1155   @  40:12c31db4edf9 bumped update to f695c2c8812d:
  1160   |   () draft
  1156   |   () draft
  1161   | o  35:f3e41d89b3c5 phase-divergent update to 8a70f55b2af3:
  1157   | o  39:abd19926ab01 bumped update to f695c2c8812d:
  1162   |/    () draft
  1158   |/    () draft
  1163   o  32:8a70f55b2af3 added p and q
  1159   o  36:f695c2c8812d added p and q
  1164   |   () public
  1160   |   () public
  1165   o  31:154b0179fb9b phase-divergent update to 849cee0a874b:
  1161   o  35:167994483a30 bumped update to bbb1ce6e7cb5:
  1166   |   () public
  1162   |   () public
  1167   ~
  1163   ~
  1168 
  1164 
  1169   $ echo h > h
  1165   $ echo h > h
  1170   $ hg ci -Aqm "added h"
  1166   $ hg ci -Aqm "added h"
  1171   $ hg prev
  1167   $ hg prev
  1172   0 files updated, 0 files merged, 1 files removed, 0 files unresolved
  1168   0 files updated, 0 files merged, 1 files removed, 0 files unresolved
  1173   [36] phase-divergent update to 8a70f55b2af3:
  1169   [40] bumped update to f695c2c8812d:
  1174   $ echo i > i
  1170   $ echo i > i
  1175   $ hg ci -Aqm "added i"
  1171   $ hg ci -Aqm "added i"
  1176   $ hg merge -r ef8c23f37b55
  1172   $ hg merge -r 'desc("added h")'
  1177   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
  1173   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
  1178   (branch merge, don't forget to commit)
  1174   (branch merge, don't forget to commit)
  1179   $ hg ci -m "merge h and i"
  1175   $ hg ci -m "merge h and i"
  1180 
  1176 
  1181   $ hg glog -r 605c306d4f87::
  1177   $ hg glog -r 12c31db4edf9::
  1182   @    39:12ebe0d625d7 merge h and i
  1178   @    43:98ce636fa344 merge h and i
  1183   |\    () draft
  1179   |\    () draft
  1184   | o  38:9bb561db4230 added i
  1180   | o  42:c13ebd59dd4e added i
  1185   | |   () draft
  1181   | |   () draft
  1186   o |  37:ef8c23f37b55 added h
  1182   o |  41:10bb6c8a838f added h
  1187   |/    () draft
  1183   |/    () draft
  1188   o  36:605c306d4f87 phase-divergent update to 8a70f55b2af3:
  1184   o  40:12c31db4edf9 bumped update to f695c2c8812d:
  1189   |   () draft
  1185   |   () draft
  1190   ~
  1186   ~
  1191 
  1187 
  1192   $ hg up ef8c23f37b55
  1188   $ hg up 10bb6c8a838f
  1193   0 files updated, 0 files merged, 1 files removed, 0 files unresolved
  1189   0 files updated, 0 files merged, 1 files removed, 0 files unresolved
  1194   $ hg merge -r 9bb561db4230
  1190   $ hg merge -r c13ebd59dd4e
  1195   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
  1191   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
  1196   (branch merge, don't forget to commit)
  1192   (branch merge, don't forget to commit)
  1197   $ hg ci -m "merge h and i successor"
  1193   $ hg ci -m "merge h and i successor"
  1198   created new head
  1194   created new head
  1199   $ hg glog -r 605c306d4f87::
  1195   $ hg glog -r 12c31db4edf9::
  1200   @    40:d2aeda868461 merge h and i successor
  1196   @    44:57c7c43469f2 merge h and i successor
  1201   |\    () draft
  1197   |\    () draft
  1202   +---o  39:12ebe0d625d7 merge h and i
  1198   +---o  43:98ce636fa344 merge h and i
  1203   | |/    () draft
  1199   | |/    () draft
  1204   | o  38:9bb561db4230 added i
  1200   | o  42:c13ebd59dd4e added i
  1205   | |   () draft
  1201   | |   () draft
  1206   o |  37:ef8c23f37b55 added h
  1202   o |  41:10bb6c8a838f added h
  1207   |/    () draft
  1203   |/    () draft
  1208   o  36:605c306d4f87 phase-divergent update to 8a70f55b2af3:
  1204   o  40:12c31db4edf9 bumped update to f695c2c8812d:
  1209   |   () draft
  1205   |   () draft
  1210   ~
  1206   ~
  1211 
  1207 
  1212   $ hg prune -r 12ebe0d625d7 --succ .
  1208   $ hg prune -r 98ce636fa344 --succ .
  1213   1 changesets pruned
  1209   1 changesets pruned
  1214 
  1210 
  1215   $ hg phase 12ebe0d625d7 --hidden --public
  1211   $ hg phase 98ce636fa344 --hidden --public
  1216   1 new phase-divergent changesets
  1212   1 new bumped changesets
  1217 
  1213 
  1218 Resolution of phase-divergent merge commit using `hg evolve`
  1214 Resolution of phase-divergent merge commit using `hg evolve`
  1219 
  1215 
  1220 XXX: we should handle phase-divergent merges
  1216 XXX: we should handle phase-divergent merges
  1221   $ hg evolve --phase-divergent
  1217   $ hg evolve --phase-divergent
  1222   skipping d2aeda868461 : we do not handle merge yet
  1218   skipping 57c7c43469f2 : we do not handle merge yet