tests/test-evolve-phase-divergence.t
branchstable
changeset 3704 a0c39e8d2c29
parent 3702 f6979d64b9fb
child 3714 19ec729f3ca2
child 3786 41fc764bf28c
equal deleted inserted replaced
3611:c912eaf29eec 3704:a0c39e8d2c29
       
     1 ** Test for handling of phase divergent changesets by `hg evolve` **
       
     2 ====================================================================
       
     3 
       
     4   $ cat >> $HGRCPATH <<EOF
       
     5   > [alias]
       
     6   > glog = log -GT "{rev}:{node|short} {desc|firstline}\n ({bookmarks}) {phase}"
       
     7   > [extensions]
       
     8   > rebase =
       
     9   > EOF
       
    10 
       
    11 Setting up a public repo
       
    12 ------------------------
       
    13 
       
    14   $ hg init public
       
    15   $ cd public
       
    16   $ echo a > a
       
    17   $ mkcommit() {
       
    18   >    echo "$1" > "$1"
       
    19   >    hg add "$1"
       
    20   >    hg ci -m "add $1"
       
    21   > }
       
    22   $ hg commit -A -m init
       
    23   adding a
       
    24   $ cd ..
       
    25 
       
    26   $ evolvepath=$(echo $(dirname $TESTDIR))/hgext3rd/evolve/
       
    27 
       
    28 Setting up a private non-publishing repo
       
    29 ----------------------------------------
       
    30 
       
    31   $ hg clone -U public private
       
    32   $ cd private
       
    33   $ cat >> .hg/hgrc <<EOF
       
    34   > [extensions]
       
    35   > evolve = $evolvepath
       
    36   > [ui]
       
    37   > logtemplate = {rev}:{node|short}@{branch}({phase}) {desc|firstline}\n
       
    38   > [phases]
       
    39   > publish = false
       
    40   > EOF
       
    41   $ cd ..
       
    42 
       
    43 Setting up couple of more instances of private repo
       
    44 ---------------------------------------------------
       
    45 
       
    46   $ cp -a private alice
       
    47   $ cp -a private bob
       
    48 
       
    49 Creating a phase-divergence changeset
       
    50 -------------------------------------
       
    51 
       
    52 Alice creating a draft changeset and pushing to main private repo
       
    53 
       
    54   $ cd alice
       
    55   $ hg update
       
    56   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
       
    57   $ echo a >> a
       
    58   $ hg commit -u alice -m 'modify a'
       
    59   $ hg push ../private
       
    60   pushing to ../private
       
    61   searching for changes
       
    62   adding changesets
       
    63   adding manifests
       
    64   adding file changes
       
    65   added 1 changesets with 1 changes to 1 files
       
    66   $ hg glog
       
    67   @  1:4d1169d82e47 modify a
       
    68   |   () draft
       
    69   o  0:d3873e73d99e init
       
    70       () public
       
    71 
       
    72 Bob pulling from private repo and pushing to the main public repo making the
       
    73 changeset public
       
    74 
       
    75   $ cd ../bob
       
    76   $ hg pull ../private
       
    77   pulling from ../private
       
    78   searching for changes
       
    79   adding changesets
       
    80   adding manifests
       
    81   adding file changes
       
    82   added 1 changesets with 1 changes to 1 files
       
    83   new changesets 4d1169d82e47
       
    84   (run 'hg update' to get a working copy)
       
    85 
       
    86   $ hg glog
       
    87   o  1:4d1169d82e47 modify a
       
    88   |   () draft
       
    89   o  0:d3873e73d99e init
       
    90       () public
       
    91 
       
    92   $ hg push ../public
       
    93   pushing to ../public
       
    94   searching for changes
       
    95   adding changesets
       
    96   adding manifests
       
    97   adding file changes
       
    98   added 1 changesets with 1 changes to 1 files
       
    99 
       
   100   $ hg glog
       
   101   o  1:4d1169d82e47 modify a
       
   102   |   () public
       
   103   o  0:d3873e73d99e init
       
   104       () public
       
   105 
       
   106 *But* Alice decided to amend the changeset she had and then pulling from public
       
   107 repo creating phase-divergent changeset locally
       
   108 
       
   109   $ cd ../alice
       
   110   $ hg amend -m 'tweak a'
       
   111 
       
   112 XXX: pull should tell us how to see what is the new phase-divergent changeset
       
   113   $ hg pull ../public
       
   114   pulling from ../public
       
   115   searching for changes
       
   116   no changes found
       
   117   1 new phase-divergent changesets
       
   118 
       
   119   $ hg glog
       
   120   @  2:98bb3a6cfe1a tweak a
       
   121   |   () draft
       
   122   | o  1:4d1169d82e47 modify a
       
   123   |/    () public
       
   124   o  0:d3873e73d99e init
       
   125       () public
       
   126 
       
   127 Using evolve --list to list phase-divergent changesets
       
   128 ------------------------------------------------------
       
   129 
       
   130   $ hg evolve --list
       
   131   98bb3a6cfe1a: tweak a
       
   132     phase-divergent: 4d1169d82e47 (immutable precursor)
       
   133   
       
   134 
       
   135 
       
   136 XXX-Pulkit: Trying to see instability on public changeset
       
   137 
       
   138 XXX-Pulkit: this is not helpful
       
   139 
       
   140 XXX-Marmoute: public changeset "instable themself"
       
   141 XXX-Marmoute: I'm not sure if we store this information and it is useful to show it.
       
   142 XXX-Marmoute: We should maybe point the user toward `hg obslog` instead`
       
   143   $ hg evolve -r 4d1169d8 --list
       
   144   4d1169d82e47: modify a
       
   145   
       
   146 
       
   147 Understanding phasedivergence using obslog
       
   148 ------------------------------------------
       
   149 
       
   150 XXX: There must be mention of phase-divergence here
       
   151   $ hg obslog -r . --all
       
   152   @  98bb3a6cfe1a (2) tweak a
       
   153   |
       
   154   o  4d1169d82e47 (1) modify a
       
   155        rewritten(description) as 98bb3a6cfe1a using amend by test (Thu Jan 01 00:00:00 1970 +0000)
       
   156   
       
   157 Solving the phase divergence using evolve command
       
   158 --------------------------------------------------
       
   159 
       
   160 (We do not solve evolution other than orphan by default because it turned out
       
   161 it was too confusing for users. We used to behave this way, but having multiple
       
   162 possible outcome to evolve end up scaring people)
       
   163 
       
   164   $ hg evolve
       
   165   nothing to evolve on current working copy parent
       
   166   (do you want to use --phase-divergent)
       
   167   [2]
       
   168 
       
   169 testing the --confirm option
       
   170   $ hg evolve --phase-divergent --confirm <<EOF
       
   171   > n
       
   172   > EOF
       
   173   recreate:[2] tweak a
       
   174   atop:[1] modify a
       
   175   perform evolve? [Ny] n
       
   176   abort: evolve aborted by user
       
   177   [255]
       
   178 
       
   179 testing the --dry-run option
       
   180 
       
   181   $ hg evolve --phase-divergent --dry-run
       
   182   recreate:[2] tweak a
       
   183   atop:[1] modify a
       
   184   hg rebase --rev 98bb3a6cfe1a --dest d3873e73d99e;
       
   185   hg update 4d1169d82e47;
       
   186   hg revert --all --rev 98bb3a6cfe1a;
       
   187   hg commit --msg "phase-divergent update to 98bb3a6cfe1a"
       
   188 
       
   189 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.
       
   191 
       
   192   $ hg evolve --phase-divergent
       
   193   recreate:[2] tweak a
       
   194   atop:[1] modify a
       
   195   computing new diff
       
   196   committed as 4d1169d82e47
       
   197   working directory is now at 4d1169d82e47
       
   198 
       
   199   $ hg glog
       
   200   @  1:4d1169d82e47 modify a
       
   201   |   () public
       
   202   o  0:d3873e73d99e init
       
   203       () public
       
   204 
       
   205 Syncying every repo with the new state
       
   206 --------------------------------------
       
   207 
       
   208   $ hg push ../public
       
   209   pushing to ../public
       
   210   searching for changes
       
   211   no changes found
       
   212   2 new obsolescence markers
       
   213   [1]
       
   214   $ hg push ../private
       
   215   pushing to ../private
       
   216   searching for changes
       
   217   no changes found
       
   218   2 new obsolescence markers
       
   219   [1]
       
   220   $ hg push ../bob
       
   221   pushing to ../bob
       
   222   searching for changes
       
   223   no changes found
       
   224   2 new obsolescence markers
       
   225   [1]
       
   226 
       
   227 Creating more phase-divergence where a new resolution commit will be formed and
       
   228 also testing bookmark movement
       
   229 --------------------------------------------------------------------------------
       
   230 
       
   231 Alice created a commit and push to private non-publishing repo
       
   232 
       
   233   $ echo foo > foo
       
   234   $ hg add foo
       
   235   $ hg ci -m "added foo to foo"
       
   236   $ hg glog
       
   237   @  3:aa071e5554e3 added foo to foo
       
   238   |   () draft
       
   239   o  1:4d1169d82e47 modify a
       
   240   |   () public
       
   241   o  0:d3873e73d99e init
       
   242       () public
       
   243 
       
   244   $ hg push ../private
       
   245   pushing to ../private
       
   246   searching for changes
       
   247   adding changesets
       
   248   adding manifests
       
   249   adding file changes
       
   250   added 1 changesets with 1 changes to 1 files
       
   251 
       
   252 Bob pulled from the private repo and pushed that to publishing repo
       
   253 
       
   254   $ cd ../bob
       
   255   $ hg pull ../private
       
   256   pulling from ../private
       
   257   searching for changes
       
   258   adding changesets
       
   259   adding manifests
       
   260   adding file changes
       
   261   added 1 changesets with 1 changes to 1 files
       
   262   new changesets aa071e5554e3
       
   263   (run 'hg update' to get a working copy)
       
   264 
       
   265   $ hg push ../public
       
   266   pushing to ../public
       
   267   searching for changes
       
   268   adding changesets
       
   269   adding manifests
       
   270   adding file changes
       
   271   added 1 changesets with 1 changes to 1 files
       
   272 
       
   273 Alice amended that changeset and then pulled from publishing repo creating
       
   274 phase-divergence
       
   275 
       
   276   $ cd ../alice
       
   277   $ echo bar >> foo
       
   278   $ hg amend -m "added bar to foo"
       
   279   $ hg bookmark bm
       
   280 
       
   281   $ hg pull ../public
       
   282   pulling from ../public
       
   283   searching for changes
       
   284   no changes found
       
   285   1 new phase-divergent changesets
       
   286 
       
   287   $ hg glog
       
   288   @  4:d47f2b37ed82 added bar to foo
       
   289   |   (bm) draft
       
   290   | o  3:aa071e5554e3 added foo to foo
       
   291   |/    () public
       
   292   o  1:4d1169d82e47 modify a
       
   293   |   () public
       
   294   o  0:d3873e73d99e init
       
   295       () public
       
   296 
       
   297 Resolving the new phase-divergence changeset using `hg evolve`
       
   298 --------------------------------------------------------------
       
   299 
       
   300 XXX: this should have popped up for a new commit message of the changeset or an
       
   301 option should be there
       
   302 
       
   303 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
       
   305 
       
   306   $ hg evolve --phase-divergent
       
   307   recreate:[4] added bar to foo
       
   308   atop:[3] added foo to foo
       
   309   computing new diff
       
   310   committed as 3d62500c673d
       
   311   working directory is now at 3d62500c673d
       
   312 
       
   313   $ hg exp
       
   314   # HG changeset patch
       
   315   # User test
       
   316   # Date 0 0
       
   317   #      Thu Jan 01 00:00:00 1970 +0000
       
   318   # Node ID 3d62500c673dd1c88bb09a73e86d0210aed6fcb6
       
   319   # Parent  aa071e5554e36080a36cfd24accd5a71e3320f1e
       
   320   phase-divergent update to aa071e5554e3:
       
   321   
       
   322   added bar to foo
       
   323   
       
   324   diff -r aa071e5554e3 -r 3d62500c673d foo
       
   325   --- a/foo	Thu Jan 01 00:00:00 1970 +0000
       
   326   +++ b/foo	Thu Jan 01 00:00:00 1970 +0000
       
   327   @@ -1,1 +1,2 @@
       
   328    foo
       
   329   +bar
       
   330 
       
   331 XXX: the commit message is not best one, we should give option to user to modify
       
   332 the commit message
       
   333 
       
   334   $ hg glog
       
   335   @  5:3d62500c673d phase-divergent update to aa071e5554e3:
       
   336   |   (bm) draft
       
   337   o  3:aa071e5554e3 added foo to foo
       
   338   |   () public
       
   339   o  1:4d1169d82e47 modify a
       
   340   |   () public
       
   341   o  0:d3873e73d99e init
       
   342       () public
       
   343 
       
   344   $ hg obslog -r . --all
       
   345   @  3d62500c673d (5) phase-divergent update to aa071e5554e3:
       
   346   |
       
   347   x  d47f2b37ed82 (4) added bar to foo
       
   348   |    rewritten(description, parent, content) as 3d62500c673d using evolve by test (Thu Jan 01 00:00:00 1970 +0000)
       
   349   |
       
   350   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)
       
   352   
       
   353 
       
   354 Syncing all other repositories
       
   355 ------------------------------
       
   356 
       
   357 These pushed should not be turned to quiet mode as the output is very helpful to
       
   358 make sure everything is working fine
       
   359 
       
   360   $ hg push ../bob
       
   361   pushing to ../bob
       
   362   searching for changes
       
   363   adding changesets
       
   364   adding manifests
       
   365   adding file changes
       
   366   added 1 changesets with 1 changes to 1 files
       
   367   2 new obsolescence markers
       
   368 
       
   369   $ hg push ../private
       
   370   pushing to ../private
       
   371   searching for changes
       
   372   adding changesets
       
   373   adding manifests
       
   374   adding file changes
       
   375   added 1 changesets with 1 changes to 1 files
       
   376   2 new obsolescence markers
       
   377 
       
   378   $ hg push ../public
       
   379   pushing to ../public
       
   380   searching for changes
       
   381   adding changesets
       
   382   adding manifests
       
   383   adding file changes
       
   384   added 1 changesets with 1 changes to 1 files
       
   385   2 new obsolescence markers
       
   386 
       
   387 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
       
   389 the `hg evolve` command handles it very well and uses `hg revert` logic to
       
   390 prevent any conflicts
       
   391 -------------------------------------------------------------------------------
       
   392 
       
   393 Alice creates one more changeset and pushes to private repo
       
   394 
       
   395   $ echo bar > bar
       
   396   $ hg ci -Aqm "added bar to bar"
       
   397   $ hg push ../private
       
   398   pushing to ../private
       
   399   searching for changes
       
   400   adding changesets
       
   401   adding manifests
       
   402   adding file changes
       
   403   added 1 changesets with 1 changes to 1 files
       
   404 
       
   405 Bob pulls from private and pushes to public repo
       
   406   $ cd ../bob
       
   407 
       
   408   $ hg pull ../private
       
   409   pulling from ../private
       
   410   searching for changes
       
   411   adding changesets
       
   412   adding manifests
       
   413   adding file changes
       
   414   added 1 changesets with 1 changes to 1 files
       
   415   new changesets b756eb10ea73
       
   416   (run 'hg update' to get a working copy)
       
   417 
       
   418   $ hg push ../public
       
   419   pushing to ../public
       
   420   searching for changes
       
   421   adding changesets
       
   422   adding manifests
       
   423   adding file changes
       
   424   added 1 changesets with 1 changes to 1 files
       
   425 
       
   426 Alice amends the changeset and then pull from public creating phase-divergence
       
   427 
       
   428   $ cd ../alice
       
   429   $ echo foo > bar
       
   430   $ hg amend -m "foo to bar"
       
   431 
       
   432   $ hg pull ../public
       
   433   pulling from ../public
       
   434   searching for changes
       
   435   no changes found
       
   436   1 new phase-divergent changesets
       
   437 
       
   438   $ hg glog
       
   439   @  7:2c3560aedead foo to bar
       
   440   |   (bm) draft
       
   441   | o  6:b756eb10ea73 added bar to bar
       
   442   |/    () public
       
   443   o  5:3d62500c673d phase-divergent update to aa071e5554e3:
       
   444   |   () public
       
   445   o  3:aa071e5554e3 added foo to foo
       
   446   |   () public
       
   447   o  1:4d1169d82e47 modify a
       
   448   |   () public
       
   449   o  0:d3873e73d99e init
       
   450       () public
       
   451 
       
   452 Resolving the new phase-divergence changeset using `hg evolve`
       
   453 ---------------------------------------------------------------
       
   454 
       
   455   $ hg evolve --phase-divergent
       
   456   recreate:[7] foo to bar
       
   457   atop:[6] added bar to bar
       
   458   computing new diff
       
   459   committed as 502e73736632
       
   460   working directory is now at 502e73736632
       
   461 
       
   462   $ hg exp
       
   463   # HG changeset patch
       
   464   # User test
       
   465   # Date 0 0
       
   466   #      Thu Jan 01 00:00:00 1970 +0000
       
   467   # Node ID 502e737366322886cf628276aa0a2796904453b4
       
   468   # Parent  b756eb10ea73ee4ba69c998e64a5c6e1005d74b5
       
   469   phase-divergent update to b756eb10ea73:
       
   470   
       
   471   foo to bar
       
   472   
       
   473   diff -r b756eb10ea73 -r 502e73736632 bar
       
   474   --- a/bar	Thu Jan 01 00:00:00 1970 +0000
       
   475   +++ b/bar	Thu Jan 01 00:00:00 1970 +0000
       
   476   @@ -1,1 +1,1 @@
       
   477   -bar
       
   478   +foo
       
   479 
       
   480   $ hg glog
       
   481   @  8:502e73736632 phase-divergent update to b756eb10ea73:
       
   482   |   (bm) draft
       
   483   o  6:b756eb10ea73 added bar to bar
       
   484   |   () public
       
   485   o  5:3d62500c673d phase-divergent update to aa071e5554e3:
       
   486   |   () public
       
   487   o  3:aa071e5554e3 added foo to foo
       
   488   |   () public
       
   489   o  1:4d1169d82e47 modify a
       
   490   |   () public
       
   491   o  0:d3873e73d99e init
       
   492       () public
       
   493 
       
   494 Syncing all the repositories
       
   495 ----------------------------
       
   496 
       
   497   $ hg push ../private
       
   498   pushing to ../private
       
   499   searching for changes
       
   500   adding changesets
       
   501   adding manifests
       
   502   adding file changes
       
   503   added 1 changesets with 1 changes to 1 files
       
   504   2 new obsolescence markers
       
   505   $ hg push ../public
       
   506   pushing to ../public
       
   507   searching for changes
       
   508   adding changesets
       
   509   adding manifests
       
   510   adding file changes
       
   511   added 1 changesets with 1 changes to 1 files
       
   512   2 new obsolescence markers
       
   513 
       
   514 Creating phase-divergence with divergent changeset and precursor having
       
   515 different parents
       
   516 -----------------------------------------------------------------------
       
   517 
       
   518 Alice creates a changeset and pushes to private repo
       
   519 
       
   520   $ echo x > x
       
   521   $ hg ci -Am "added x to x"
       
   522   adding x
       
   523 
       
   524   $ hg push ../private
       
   525   pushing to ../private
       
   526   searching for changes
       
   527   adding changesets
       
   528   adding manifests
       
   529   adding file changes
       
   530   added 1 changesets with 1 changes to 1 files
       
   531 
       
   532 Bob does what he always does, pull from private and push to public, he is acting
       
   533 as a CI service
       
   534 
       
   535   $ cd ../bob
       
   536   $ hg pull ../private
       
   537   pulling from ../private
       
   538   searching for changes
       
   539   adding changesets
       
   540   adding manifests
       
   541   adding file changes
       
   542   added 2 changesets with 2 changes to 2 files
       
   543   2 new obsolescence markers
       
   544   new changesets 502e73736632:2352021b3785
       
   545   (run 'hg update' to get a working copy)
       
   546   $ hg push ../public
       
   547   pushing to ../public
       
   548   searching for changes
       
   549   adding changesets
       
   550   adding manifests
       
   551   adding file changes
       
   552   added 1 changesets with 1 changes to 1 files
       
   553 
       
   554 Alice like always dont care about Bob existence and rebases her changeset and
       
   555 then pull from public repo creating phase divergence
       
   556 
       
   557   $ cd ../alice
       
   558   $ hg rebase -r . -d .^^^
       
   559   rebasing 9:2352021b3785 "added x to x" (bm tip)
       
   560 
       
   561   $ hg pull ../public
       
   562   pulling from ../public
       
   563   searching for changes
       
   564   no changes found
       
   565   1 new phase-divergent changesets
       
   566 
       
   567   $ hg obslog -r .
       
   568   @  334e300d6db5 (10) added x to x
       
   569   |
       
   570   o  2352021b3785 (9) added x to x
       
   571        rewritten(parent) as 334e300d6db5 using rebase by test (Thu Jan 01 00:00:00 1970 +0000)
       
   572   
       
   573   $ hg glog -r .^::
       
   574   @  10:334e300d6db5 added x to x
       
   575   |   (bm) draft
       
   576   | o  9:2352021b3785 added x to x
       
   577   | |   () public
       
   578   | o  8:502e73736632 phase-divergent update to b756eb10ea73:
       
   579   | |   () public
       
   580   | o  6:b756eb10ea73 added bar to bar
       
   581   |/    () public
       
   582   o  5:3d62500c673d phase-divergent update to aa071e5554e3:
       
   583   |   () public
       
   584   ~
       
   585 
       
   586 Using `hg evolve` to resolve phase-divergence
       
   587 ---------------------------------------------
       
   588 
       
   589   $ hg evolve --phase-divergent
       
   590   recreate:[10] added x to x
       
   591   atop:[9] added x to x
       
   592   rebasing to destination parent: 502e73736632
       
   593   (leaving bookmark bm)
       
   594   computing new diff
       
   595   committed as 2352021b3785
       
   596   working directory is now at 2352021b3785
       
   597 
       
   598 XXX: we should move bookmark here
       
   599   $ hg glog
       
   600   @  9:2352021b3785 added x to x
       
   601   |   (bm) public
       
   602   o  8:502e73736632 phase-divergent update to b756eb10ea73:
       
   603   |   () public
       
   604   o  6:b756eb10ea73 added bar to bar
       
   605   |   () public
       
   606   o  5:3d62500c673d phase-divergent update to aa071e5554e3:
       
   607   |   () public
       
   608   o  3:aa071e5554e3 added foo to foo
       
   609   |   () public
       
   610   o  1:4d1169d82e47 modify a
       
   611   |   () public
       
   612   o  0:d3873e73d99e init
       
   613       () public
       
   614 
       
   615   $ hg obslog -r . b1a0e143e32b --all --hidden
       
   616   x  b1a0e143e32b (11) added x to x
       
   617   |    pruned using evolve by test (Thu Jan 01 00:00:00 1970 +0000)
       
   618   |
       
   619   x  334e300d6db5 (10) added x to x
       
   620   |    rewritten(parent) as b1a0e143e32b using evolve by test (Thu Jan 01 00:00:00 1970 +0000)
       
   621   |
       
   622   @  2352021b3785 (9) added x to x
       
   623        rewritten(parent) as 334e300d6db5 using rebase by test (Thu Jan 01 00:00:00 1970 +0000)
       
   624   
       
   625 
       
   626   $ hg exp
       
   627   # HG changeset patch
       
   628   # User test
       
   629   # Date 0 0
       
   630   #      Thu Jan 01 00:00:00 1970 +0000
       
   631   # Node ID 2352021b37851be226ebed109b0eb6eada918566
       
   632   # Parent  502e737366322886cf628276aa0a2796904453b4
       
   633   added x to x
       
   634   
       
   635   diff -r 502e73736632 -r 2352021b3785 x
       
   636   --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
       
   637   +++ b/x	Thu Jan 01 00:00:00 1970 +0000
       
   638   @@ -0,0 +1,1 @@
       
   639   +x
       
   640 
       
   641 Creating divergence with parent and content change both but not resulting in
       
   642 conflicts
       
   643 -----------------------------------------------------------------------------
       
   644 
       
   645 Alice is tired of pushing and pulling and will create phase-divergence locally
       
   646 
       
   647   $ hg glog
       
   648   @  9:2352021b3785 added x to x
       
   649   |   (bm) public
       
   650   o  8:502e73736632 phase-divergent update to b756eb10ea73:
       
   651   |   () public
       
   652   o  6:b756eb10ea73 added bar to bar
       
   653   |   () public
       
   654   o  5:3d62500c673d phase-divergent update to aa071e5554e3:
       
   655   |   () public
       
   656   o  3:aa071e5554e3 added foo to foo
       
   657   |   () public
       
   658   o  1:4d1169d82e47 modify a
       
   659   |   () public
       
   660   o  0:d3873e73d99e init
       
   661       () public
       
   662 
       
   663   $ echo y > y
       
   664   $ echo foobar >> foo
       
   665   $ hg add y
       
   666   $ hg ci -m "y to y and foobar to foo"
       
   667   $ hg rebase -r . -d .^^^
       
   668   rebasing 12:dc88f5aa9bc9 "y to y and foobar to foo" (tip)
       
   669 
       
   670   $ echo foo > y
       
   671   $ hg amend
       
   672 
       
   673 Alice making the old changeset public to have content-divergence
       
   674 
       
   675   $ hg phase -r dc88f5aa9bc9 --public --hidden
       
   676   1 new phase-divergent changesets
       
   677   $ hg glog
       
   678   @  14:13015a180eee y to y and foobar to foo
       
   679   |   () draft
       
   680   | o  12:dc88f5aa9bc9 y to y and foobar to foo
       
   681   | |   () public
       
   682   | o  9:2352021b3785 added x to x
       
   683   | |   (bm) public
       
   684   | o  8:502e73736632 phase-divergent update to b756eb10ea73:
       
   685   |/    () public
       
   686   o  6:b756eb10ea73 added bar to bar
       
   687   |   () public
       
   688   o  5:3d62500c673d phase-divergent update to aa071e5554e3:
       
   689   |   () public
       
   690   o  3:aa071e5554e3 added foo to foo
       
   691   |   () public
       
   692   o  1:4d1169d82e47 modify a
       
   693   |   () public
       
   694   o  0:d3873e73d99e init
       
   695       () public
       
   696 
       
   697   $ hg obslog -r .
       
   698   @  13015a180eee (14) y to y and foobar to foo
       
   699   |
       
   700   x  211ab84d1689 (13) y to y and foobar to foo
       
   701   |    rewritten(content) as 13015a180eee using amend by test (Thu Jan 01 00:00:00 1970 +0000)
       
   702   |
       
   703   o  dc88f5aa9bc9 (12) y to y and foobar to foo
       
   704        rewritten(parent) as 211ab84d1689 using rebase by test (Thu Jan 01 00:00:00 1970 +0000)
       
   705   
       
   706 Resolving divergence using `hg evolve`
       
   707 -------------------------------------
       
   708 
       
   709   $ hg evolve --phase-divergent
       
   710   recreate:[14] y to y and foobar to foo
       
   711   atop:[12] y to y and foobar to foo
       
   712   rebasing to destination parent: 2352021b3785
       
   713   computing new diff
       
   714   committed as 8c2bb6fb44e9
       
   715   working directory is now at 8c2bb6fb44e9
       
   716 
       
   717   $ hg exp
       
   718   # HG changeset patch
       
   719   # User test
       
   720   # Date 0 0
       
   721   #      Thu Jan 01 00:00:00 1970 +0000
       
   722   # Node ID 8c2bb6fb44e9443c64b3a2a3d061272c8e25e6ce
       
   723   # Parent  dc88f5aa9bc90a6418899d267d9524205dfb429b
       
   724   phase-divergent update to dc88f5aa9bc9:
       
   725   
       
   726   y to y and foobar to foo
       
   727   
       
   728   diff -r dc88f5aa9bc9 -r 8c2bb6fb44e9 y
       
   729   --- a/y	Thu Jan 01 00:00:00 1970 +0000
       
   730   +++ b/y	Thu Jan 01 00:00:00 1970 +0000
       
   731   @@ -1,1 +1,1 @@
       
   732   -y
       
   733   +foo
       
   734 
       
   735   $ hg glog
       
   736   @  16:8c2bb6fb44e9 phase-divergent update to dc88f5aa9bc9:
       
   737   |   () draft
       
   738   o  12:dc88f5aa9bc9 y to y and foobar to foo
       
   739   |   () public
       
   740   o  9:2352021b3785 added x to x
       
   741   |   (bm) public
       
   742   o  8:502e73736632 phase-divergent update to b756eb10ea73:
       
   743   |   () public
       
   744   o  6:b756eb10ea73 added bar to bar
       
   745   |   () public
       
   746   o  5:3d62500c673d phase-divergent update to aa071e5554e3:
       
   747   |   () public
       
   748   o  3:aa071e5554e3 added foo to foo
       
   749   |   () public
       
   750   o  1:4d1169d82e47 modify a
       
   751   |   () public
       
   752   o  0:d3873e73d99e init
       
   753       () public
       
   754 
       
   755 Creating divergence with parent and content change both which results in
       
   756 conflicts while rebasing on parent
       
   757 -----------------------------------------------------------------------------
       
   758 
       
   759   $ echo l > l
       
   760   $ hg ci -Aqm "added l to l"
       
   761   $ hg rebase -r . -d .^^^^
       
   762   rebasing 17:f3794e5a91dc "added l to l" (tip)
       
   763   $ echo kl > l
       
   764   $ echo foo > x
       
   765   $ hg add x
       
   766   $ hg amend
       
   767 
       
   768   $ hg obslog -r .
       
   769   @  5fd38c0de46e (19) added l to l
       
   770   |
       
   771   x  2bfd56949cf0 (18) added l to l
       
   772   |    rewritten(content) as 5fd38c0de46e using amend by test (Thu Jan 01 00:00:00 1970 +0000)
       
   773   |
       
   774   x  f3794e5a91dc (17) added l to l
       
   775        rewritten(parent) as 2bfd56949cf0 using rebase by test (Thu Jan 01 00:00:00 1970 +0000)
       
   776   
       
   777 
       
   778   $ hg phase -r f3794e5a91dc --public --hidden
       
   779   1 new phase-divergent changesets
       
   780 
       
   781 Resolution using `hg evolve --phase-divergent`
       
   782 ----------------------------------------------
       
   783 
       
   784   $ hg evolve --phase-divergent
       
   785   recreate:[19] added l to l
       
   786   atop:[17] added l to l
       
   787   rebasing to destination parent: 8c2bb6fb44e9
       
   788   merging x
       
   789   warning: conflicts while merging x! (edit, then use 'hg resolve --mark')
       
   790   evolution failed!
       
   791   fix conflict then run 'hg evolve --continue' or use `hg evolve --abort`
       
   792   abort: unresolved merge conflicts (see hg help resolve)
       
   793   [255]
       
   794 
       
   795   $ hg diff
       
   796   diff -r 8c2bb6fb44e9 l
       
   797   --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
       
   798   +++ b/l	Thu Jan 01 00:00:00 1970 +0000
       
   799   @@ -0,0 +1,1 @@
       
   800   +kl
       
   801   diff -r 8c2bb6fb44e9 x
       
   802   --- a/x	Thu Jan 01 00:00:00 1970 +0000
       
   803   +++ b/x	Thu Jan 01 00:00:00 1970 +0000
       
   804   @@ -1,1 +1,5 @@
       
   805   +<<<<<<< destination: 8c2bb6fb44e9 - test: phase-divergent update to dc88f5aa9...
       
   806    x
       
   807   +=======
       
   808   +foo
       
   809   +>>>>>>> evolving:    5fd38c0de46e - test: added l to l
       
   810 
       
   811   $ echo foo > x
       
   812 
       
   813   $ hg resolve -m
       
   814   (no more unresolved files)
       
   815   continue: hg evolve --continue
       
   816 
       
   817   $ hg evolve --continue
       
   818   evolving 19:5fd38c0de46e "added l to l"
       
   819   computing new diff
       
   820   committed as e3090241a10c
       
   821   working directory is now at e3090241a10c
       
   822 
       
   823   $ hg glog
       
   824   @  21:e3090241a10c phase-divergent update to f3794e5a91dc:
       
   825   |   () draft
       
   826   o  17:f3794e5a91dc added l to l
       
   827   |   () public
       
   828   o  16:8c2bb6fb44e9 phase-divergent update to dc88f5aa9bc9:
       
   829   |   () public
       
   830   o  12:dc88f5aa9bc9 y to y and foobar to foo
       
   831   |   () public
       
   832   o  9:2352021b3785 added x to x
       
   833   |   (bm) public
       
   834   o  8:502e73736632 phase-divergent update to b756eb10ea73:
       
   835   |   () public
       
   836   o  6:b756eb10ea73 added bar to bar
       
   837   |   () public
       
   838   o  5:3d62500c673d phase-divergent update to aa071e5554e3:
       
   839   |   () public
       
   840   o  3:aa071e5554e3 added foo to foo
       
   841   |   () public
       
   842   o  1:4d1169d82e47 modify a
       
   843   |   () public
       
   844   o  0:d3873e73d99e init
       
   845       () public
       
   846 
       
   847   $ hg exp
       
   848   # HG changeset patch
       
   849   # User test
       
   850   # Date 0 0
       
   851   #      Thu Jan 01 00:00:00 1970 +0000
       
   852   # Node ID e3090241a10c320b6132e4673915fd6b19c0de39
       
   853   # Parent  f3794e5a91dc1d4d36fee5c423386b19433a1f48
       
   854   phase-divergent update to f3794e5a91dc:
       
   855   
       
   856   added l to l
       
   857   
       
   858   diff -r f3794e5a91dc -r e3090241a10c l
       
   859   --- a/l	Thu Jan 01 00:00:00 1970 +0000
       
   860   +++ b/l	Thu Jan 01 00:00:00 1970 +0000
       
   861   @@ -1,1 +1,1 @@
       
   862   -l
       
   863   +kl
       
   864   diff -r f3794e5a91dc -r e3090241a10c x
       
   865   --- a/x	Thu Jan 01 00:00:00 1970 +0000
       
   866   +++ b/x	Thu Jan 01 00:00:00 1970 +0000
       
   867   @@ -1,1 +1,1 @@
       
   868   -x
       
   869   +foo
       
   870 
       
   871 Creating phase divergence when couple of changesets are folded into one
       
   872 ------------------------------------------------------------------------
       
   873 
       
   874   $ hg glog -r .
       
   875   @  21:e3090241a10c phase-divergent update to f3794e5a91dc:
       
   876   |   () draft
       
   877   ~
       
   878   $ echo f > f
       
   879   $ hg ci -Aqm "added f"
       
   880   $ echo g > g
       
   881   $ hg ci -Aqm "added g"
       
   882 
       
   883   $ hg fold -r . -r .^ --exact
       
   884   2 changesets folded
       
   885   0 files updated, 0 files merged, 0 files removed, 0 files unresolved
       
   886 
       
   887   $ hg evolve --list
       
   888 
       
   889   $ hg phase -r 428f7900a969 --public --hidden
       
   890   1 new phase-divergent changesets
       
   891 
       
   892   $ hg glog -r f3794e5a91dc::
       
   893   @  24:e450d05b7d27 added g
       
   894   |   () draft
       
   895   | o  23:428f7900a969 added g
       
   896   | |   () public
       
   897   | o  22:21ae52e414e6 added f
       
   898   |/    () public
       
   899   o  21:e3090241a10c phase-divergent update to f3794e5a91dc:
       
   900   |   () public
       
   901   o  17:f3794e5a91dc added l to l
       
   902   |   () public
       
   903   ~
       
   904 
       
   905   $ hg evolve --list
       
   906   e450d05b7d27: added g
       
   907     phase-divergent: 21ae52e414e6 (immutable precursor)
       
   908     phase-divergent: 428f7900a969 (immutable precursor)
       
   909   
       
   910 Resolving phase divergence using `hg evolve`
       
   911 
       
   912   $ hg evolve --phase-divergent --all
       
   913   recreate:[24] added g
       
   914   atop:[23] added g
       
   915   rebasing to destination parent: 21ae52e414e6
       
   916   computing new diff
       
   917   committed as 428f7900a969
       
   918   working directory is now at 428f7900a969
       
   919 
       
   920   $ hg glog -r f3794e5a91dc::
       
   921   @  23:428f7900a969 added g
       
   922   |   () public
       
   923   o  22:21ae52e414e6 added f
       
   924   |   () public
       
   925   o  21:e3090241a10c phase-divergent update to f3794e5a91dc:
       
   926   |   () public
       
   927   o  17:f3794e5a91dc added l to l
       
   928   |   () public
       
   929   ~
       
   930 
       
   931 When the public changesets is splitted causing phase-divergence
       
   932 ---------------------------------------------------------------
       
   933 
       
   934   $ echo m > m
       
   935   $ echo n > n
       
   936   $ hg ci -Aqm "added m and n"
       
   937 
       
   938   $ hg glog -r 21ae52e414e6::
       
   939   @  26:849cee0a874b added m and n
       
   940   |   () draft
       
   941   o  23:428f7900a969 added g
       
   942   |   () public
       
   943   o  22:21ae52e414e6 added f
       
   944   |   () public
       
   945   ~
       
   946 
       
   947   $ hg prev
       
   948   0 files updated, 0 files merged, 2 files removed, 0 files unresolved
       
   949   [23] added g
       
   950   $ echo m > m
       
   951   $ hg ci -Aqm "added m"
       
   952   $ echo n > n
       
   953   $ hg ci -Aqm "added n"
       
   954 
       
   955   $ hg glog -r 428f7900a969::
       
   956   @  28:63ccb8ea7cae added n
       
   957   |   () draft
       
   958   o  27:f313e2b90e70 added m
       
   959   |   () draft
       
   960   | o  26:849cee0a874b added m and n
       
   961   |/    () draft
       
   962   o  23:428f7900a969 added g
       
   963   |   () public
       
   964   ~
       
   965 
       
   966   $ hg prune -r 849cee0a874b --succ f313e2b90e70 --succ 63ccb8ea7cae --split
       
   967   1 changesets pruned
       
   968 
       
   969   $ hg phase -r 849cee0a874b --hidden --public
       
   970   2 new phase-divergent changesets
       
   971 
       
   972   $ hg glog -r 428f7900a969::
       
   973   @  28:63ccb8ea7cae added n
       
   974   |   () draft
       
   975   *  27:f313e2b90e70 added m
       
   976   |   () draft
       
   977   | o  26:849cee0a874b added m and n
       
   978   |/    () public
       
   979   o  23:428f7900a969 added g
       
   980   |   () public
       
   981   ~
       
   982 
       
   983   $ hg evolve --all --phase-divergent
       
   984   recreate:[27] added m
       
   985   atop:[26] added m and n
       
   986   computing new diff
       
   987   committed as 870e1c3eddc3
       
   988   1 new orphan changesets
       
   989   recreate:[28] added n
       
   990   atop:[26] added m and n
       
   991   rebasing to destination parent: 428f7900a969
       
   992   computing new diff
       
   993   committed as 154b0179fb9b
       
   994   working directory is now at 154b0179fb9b
       
   995 
       
   996 XXX: this is messy, we should solve things in better way
       
   997   $ hg glog -r 428f7900a969:: --hidden
       
   998   @  31:154b0179fb9b phase-divergent update to 849cee0a874b:
       
   999   |   () draft
       
  1000   | x  30:1ebf33547a82 added n
       
  1001   | |   () draft
       
  1002   +---o  29:870e1c3eddc3 phase-divergent update to 849cee0a874b:
       
  1003   | |     () draft
       
  1004   | | x  28:63ccb8ea7cae added n
       
  1005   | | |   () draft
       
  1006   | | x  27:f313e2b90e70 added m
       
  1007   | |/    () draft
       
  1008   o |  26:849cee0a874b added m and n
       
  1009   |/    () public
       
  1010   o  23:428f7900a969 added g
       
  1011   |   () public
       
  1012   ~
       
  1013 
       
  1014 XXX: not sure this is the correct
       
  1015   $ hg exp 154b0179fb9b
       
  1016   # HG changeset patch
       
  1017   # User test
       
  1018   # Date 0 0
       
  1019   #      Thu Jan 01 00:00:00 1970 +0000
       
  1020   # Node ID 154b0179fb9b53d2f853d6ba04740bb3d7a5cabe
       
  1021   # Parent  849cee0a874be7c4e75dfacb5ad72aa5696951ba
       
  1022   phase-divergent update to 849cee0a874b:
       
  1023   
       
  1024   added n
       
  1025   
       
  1026   diff -r 849cee0a874b -r 154b0179fb9b m
       
  1027   --- a/m	Thu Jan 01 00:00:00 1970 +0000
       
  1028   +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
       
  1029   @@ -1,1 +0,0 @@
       
  1030   -m
       
  1031 
       
  1032 XXX: not sure this is correct
       
  1033   $ hg exp 870e1c3eddc3
       
  1034   # HG changeset patch
       
  1035   # User test
       
  1036   # Date 0 0
       
  1037   #      Thu Jan 01 00:00:00 1970 +0000
       
  1038   # Node ID 870e1c3eddc34cc475e8e13d2fe1934210c1937e
       
  1039   # Parent  849cee0a874be7c4e75dfacb5ad72aa5696951ba
       
  1040   phase-divergent update to 849cee0a874b:
       
  1041   
       
  1042   added m
       
  1043   
       
  1044   diff -r 849cee0a874b -r 870e1c3eddc3 n
       
  1045   --- a/n	Thu Jan 01 00:00:00 1970 +0000
       
  1046   +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
       
  1047   @@ -1,1 +0,0 @@
       
  1048   -n
       
  1049 
       
  1050 When the public changeset is splitted across various branches
       
  1051 --------------------------------------------------------------
       
  1052 
       
  1053   $ echo p > p
       
  1054   $ echo q > q
       
  1055   $ hg ci -Aqm "added p and q"
       
  1056 
       
  1057   $ hg prev
       
  1058   0 files updated, 0 files merged, 2 files removed, 0 files unresolved
       
  1059   [31] phase-divergent update to 849cee0a874b:
       
  1060   $ echo p > p
       
  1061   $ hg ci -Aqm "added p"
       
  1062   $ hg prev
       
  1063   0 files updated, 0 files merged, 1 files removed, 0 files unresolved
       
  1064   [31] phase-divergent update to 849cee0a874b:
       
  1065   $ echo q > q
       
  1066   $ hg ci -Aqm "added q"
       
  1067 
       
  1068   $ hg glog -r 154b0179fb9b::
       
  1069   @  34:e046341aa97c added q
       
  1070   |   () draft
       
  1071   | o  33:6f8c250eecff added p
       
  1072   |/    () draft
       
  1073   | o  32:8a70f55b2af3 added p and q
       
  1074   |/    () draft
       
  1075   o  31:154b0179fb9b phase-divergent update to 849cee0a874b:
       
  1076   |   () draft
       
  1077   ~
       
  1078 
       
  1079   $ hg prune -r 8a70f55b2af3 --succ 6f8c250eecff --succ e046341aa97c --split
       
  1080   1 changesets pruned
       
  1081 
       
  1082   $ hg phase -r 8a70f55b2af3 --public --hidden
       
  1083   2 new phase-divergent changesets
       
  1084 
       
  1085   $ hg glog -r 154b0179fb9b::
       
  1086   @  34:e046341aa97c added q
       
  1087   |   () draft
       
  1088   | *  33:6f8c250eecff added p
       
  1089   |/    () draft
       
  1090   | o  32:8a70f55b2af3 added p and q
       
  1091   |/    () public
       
  1092   o  31:154b0179fb9b phase-divergent update to 849cee0a874b:
       
  1093   |   () public
       
  1094   ~
       
  1095 
       
  1096   $ hg evolve --list
       
  1097   6f8c250eecff: added p
       
  1098     phase-divergent: 8a70f55b2af3 (immutable precursor)
       
  1099   
       
  1100   e046341aa97c: added q
       
  1101     phase-divergent: 8a70f55b2af3 (immutable precursor)
       
  1102   
       
  1103   $ hg evolve --all --phase-divergent
       
  1104   recreate:[33] added p
       
  1105   atop:[32] added p and q
       
  1106   computing new diff
       
  1107   committed as f3e41d89b3c5
       
  1108   recreate:[34] added q
       
  1109   atop:[32] added p and q
       
  1110   computing new diff
       
  1111   committed as 605c306d4f87
       
  1112   working directory is now at 605c306d4f87
       
  1113 
       
  1114   $ hg glog -r 154b0179fb9b:: --hidden
       
  1115   @  36:605c306d4f87 phase-divergent update to 8a70f55b2af3:
       
  1116   |   () draft
       
  1117   | o  35:f3e41d89b3c5 phase-divergent update to 8a70f55b2af3:
       
  1118   |/    () draft
       
  1119   | x  34:e046341aa97c added q
       
  1120   | |   () draft
       
  1121   | | x  33:6f8c250eecff added p
       
  1122   | |/    () draft
       
  1123   o |  32:8a70f55b2af3 added p and q
       
  1124   |/    () public
       
  1125   o  31:154b0179fb9b phase-divergent update to 849cee0a874b:
       
  1126   |   () public
       
  1127   ~
       
  1128 
       
  1129 XXX: not sure this is correct
       
  1130   $ hg exp 605c306d4f87
       
  1131   # HG changeset patch
       
  1132   # User test
       
  1133   # Date 0 0
       
  1134   #      Thu Jan 01 00:00:00 1970 +0000
       
  1135   # Node ID 605c306d4f87fccfdb5e7dd1c750b6d4f813defb
       
  1136   # Parent  8a70f55b2af35452916dc89401a5ecf6553646a5
       
  1137   phase-divergent update to 8a70f55b2af3:
       
  1138   
       
  1139   added q
       
  1140   
       
  1141   diff -r 8a70f55b2af3 -r 605c306d4f87 p
       
  1142   --- a/p	Thu Jan 01 00:00:00 1970 +0000
       
  1143   +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
       
  1144   @@ -1,1 +0,0 @@
       
  1145   -p
       
  1146 
       
  1147 XXX: not sure this is correct
       
  1148   $ hg exp f3e41d89b3c5
       
  1149   # HG changeset patch
       
  1150   # User test
       
  1151   # Date 0 0
       
  1152   #      Thu Jan 01 00:00:00 1970 +0000
       
  1153   # Node ID f3e41d89b3c5f6ee49ccc734045856d7b025f048
       
  1154   # Parent  8a70f55b2af35452916dc89401a5ecf6553646a5
       
  1155   phase-divergent update to 8a70f55b2af3:
       
  1156   
       
  1157   added p
       
  1158   
       
  1159   diff -r 8a70f55b2af3 -r f3e41d89b3c5 q
       
  1160   --- a/q	Thu Jan 01 00:00:00 1970 +0000
       
  1161   +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
       
  1162   @@ -1,1 +0,0 @@
       
  1163   -q
       
  1164 
       
  1165 Testing the evolution of a phase-divergent merge with no conflicts
       
  1166 ------------------------------------------------------------------
       
  1167 
       
  1168   $ hg glog -r 154b0179fb9b::
       
  1169   @  36:605c306d4f87 phase-divergent update to 8a70f55b2af3:
       
  1170   |   () draft
       
  1171   | o  35:f3e41d89b3c5 phase-divergent update to 8a70f55b2af3:
       
  1172   |/    () draft
       
  1173   o  32:8a70f55b2af3 added p and q
       
  1174   |   () public
       
  1175   o  31:154b0179fb9b phase-divergent update to 849cee0a874b:
       
  1176   |   () public
       
  1177   ~
       
  1178 
       
  1179   $ echo h > h
       
  1180   $ hg ci -Aqm "added h"
       
  1181   $ hg prev
       
  1182   0 files updated, 0 files merged, 1 files removed, 0 files unresolved
       
  1183   [36] phase-divergent update to 8a70f55b2af3:
       
  1184   $ echo i > i
       
  1185   $ hg ci -Aqm "added i"
       
  1186   $ hg merge -r ef8c23f37b55
       
  1187   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
       
  1188   (branch merge, don't forget to commit)
       
  1189   $ hg ci -m "merge h and i"
       
  1190 
       
  1191   $ hg glog -r 605c306d4f87::
       
  1192   @    39:12ebe0d625d7 merge h and i
       
  1193   |\    () draft
       
  1194   | o  38:9bb561db4230 added i
       
  1195   | |   () draft
       
  1196   o |  37:ef8c23f37b55 added h
       
  1197   |/    () draft
       
  1198   o  36:605c306d4f87 phase-divergent update to 8a70f55b2af3:
       
  1199   |   () draft
       
  1200   ~
       
  1201 
       
  1202   $ hg up ef8c23f37b55
       
  1203   0 files updated, 0 files merged, 1 files removed, 0 files unresolved
       
  1204   $ hg merge -r 9bb561db4230
       
  1205   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
       
  1206   (branch merge, don't forget to commit)
       
  1207   $ hg ci -m "merge h and i successor"
       
  1208   created new head
       
  1209   $ hg glog -r 605c306d4f87::
       
  1210   @    40:d2aeda868461 merge h and i successor
       
  1211   |\    () draft
       
  1212   +---o  39:12ebe0d625d7 merge h and i
       
  1213   | |/    () draft
       
  1214   | o  38:9bb561db4230 added i
       
  1215   | |   () draft
       
  1216   o |  37:ef8c23f37b55 added h
       
  1217   |/    () draft
       
  1218   o  36:605c306d4f87 phase-divergent update to 8a70f55b2af3:
       
  1219   |   () draft
       
  1220   ~
       
  1221 
       
  1222   $ hg prune -r 12ebe0d625d7 --succ .
       
  1223   1 changesets pruned
       
  1224 
       
  1225   $ hg phase 12ebe0d625d7 --hidden --public
       
  1226   1 new phase-divergent changesets
       
  1227 
       
  1228 Resolution of phase-divergent merge commit using `hg evolve`
       
  1229 
       
  1230 XXX: we should handle phase-divergent merges
       
  1231   $ hg evolve --phase-divergent
       
  1232   skipping d2aeda868461 : we do not handle merge yet