tests/test-evolve-content-divergent-relocation.t
branchmercurial-4.7
changeset 5367 cb5983c0287f
parent 5349 e8660b28bfee
child 5368 844b1ad5b34b
equal deleted inserted replaced
5283:02cc51ca6795 5367:cb5983c0287f
    68   merge:[5] added b
    68   merge:[5] added b
    69   with: [6] added b
    69   with: [6] added b
    70   base: [2] added b
    70   base: [2] added b
    71   rebasing "other" content-divergent changeset da4b96f4a8d6 on c7586e2a9264
    71   rebasing "other" content-divergent changeset da4b96f4a8d6 on c7586e2a9264
    72   0 files updated, 0 files merged, 0 files removed, 0 files unresolved
    72   0 files updated, 0 files merged, 0 files removed, 0 files unresolved
    73   working directory is now at 171614c9a791
    73   working directory is now at e7fdc662d630
    74 
    74 
    75   $ hg glog
    75   $ hg glog
    76   @  8:171614c9a791 added b
    76   @  8:e7fdc662d630 added b
    77   |   () [default] draft
    77   |   () [default] draft
    78   | *  4:c41c793e0ef1 added d
    78   | *  4:c41c793e0ef1 added d
    79   | |   () [default] draft
    79   | |   () [default] draft
    80   | *  3:ca1b80f7960a added c
    80   | *  3:ca1b80f7960a added c
    81   | |   () [default] draft
    81   | |   () [default] draft
    89   $ hg exp
    89   $ hg exp
    90   # HG changeset patch
    90   # HG changeset patch
    91   # User test
    91   # User test
    92   # Date 0 0
    92   # Date 0 0
    93   #      Thu Jan 01 00:00:00 1970 +0000
    93   #      Thu Jan 01 00:00:00 1970 +0000
    94   # Node ID 171614c9a7914c53f531373b95632323fdbbac8d
    94   # Node ID e7fdc662d6305fee2908c3f1630e0b20d6f4689a
    95   # Parent  c7586e2a92645e473645847a7b69a6dc52be4276
    95   # Parent  c7586e2a92645e473645847a7b69a6dc52be4276
    96   added b
    96   added b
    97   
    97   
    98   diff -r c7586e2a9264 -r 171614c9a791 b
    98   diff -r c7586e2a9264 -r e7fdc662d630 b
    99   --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    99   --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   100   +++ b/b	Thu Jan 01 00:00:00 1970 +0000
   100   +++ b/b	Thu Jan 01 00:00:00 1970 +0000
   101   @@ -0,0 +1,1 @@
   101   @@ -0,0 +1,1 @@
   102   +bar
   102   +bar
   103 
   103 
       
   104   $ hg debugobsolete
       
   105   b1661037fa25511d0b7ccddf405e336f9d7d3424 7ed0642d644bb9ad93d252dd9ffe7b4729febe48 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '8', 'operation': 'amend', 'user': 'test'}
       
   106   b1661037fa25511d0b7ccddf405e336f9d7d3424 da4b96f4a8d610a85b225583138f681d67e275dd 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'}
       
   107   da4b96f4a8d610a85b225583138f681d67e275dd 11f849d7159fa30a63dbbc1a6d251a8d996baeb5 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'evolve', 'user': 'test'}
       
   108   7ed0642d644bb9ad93d252dd9ffe7b4729febe48 e7fdc662d6305fee2908c3f1630e0b20d6f4689a 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'evolve', 'user': 'test'}
       
   109   11f849d7159fa30a63dbbc1a6d251a8d996baeb5 e7fdc662d6305fee2908c3f1630e0b20d6f4689a 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '8', 'operation': 'evolve', 'user': 'test'}
       
   110   $ hg obslog --all
       
   111   @    e7fdc662d630 (8) added b
       
   112   |\     amended(content) from 11f849d7159f using evolve by test (Thu Jan 01 00:00:00 1970 +0000)
       
   113   | |    rewritten from 7ed0642d644b using evolve by test (Thu Jan 01 00:00:00 1970 +0000)
       
   114   | |
       
   115   x |  11f849d7159f (7) added b
       
   116   | |    rebased(parent) from da4b96f4a8d6 using evolve by test (Thu Jan 01 00:00:00 1970 +0000)
       
   117   | |
       
   118   | x  7ed0642d644b (5) added b
       
   119   | |    amended(content) from b1661037fa25 using amend by test (Thu Jan 01 00:00:00 1970 +0000)
       
   120   | |
       
   121   x |  da4b96f4a8d6 (6) added b
       
   122   |/     rebased(parent) from b1661037fa25 using rebase by test (Thu Jan 01 00:00:00 1970 +0000)
       
   123   |
       
   124   x  b1661037fa25 (2) added b
       
   125   
       
   126 
   104 Resolving orphans to get back to a normal graph
   127 Resolving orphans to get back to a normal graph
   105 
   128 
   106   $ hg evolve --all
   129   $ hg evolve --all
   107   move:[3] added c
   130   move:[3] added c
   108   atop:[8] added b
   131   atop:[8] added b
   109   move:[4] added d
   132   move:[4] added d
   110   $ hg glog
   133   $ hg glog
   111   o  10:4ae4427ee9f8 added d
   134   o  10:be5a8b9faa8a added d
   112   |   () [default] draft
   135   |   () [default] draft
   113   o  9:917281f93fcb added c
   136   o  9:e2ce33033e42 added c
   114   |   () [default] draft
   137   |   () [default] draft
   115   @  8:171614c9a791 added b
   138   @  8:e7fdc662d630 added b
   116   |   () [default] draft
   139   |   () [default] draft
   117   o  1:c7586e2a9264 added a
   140   o  1:c7586e2a9264 added a
   118   |   () [default] draft
   141   |   () [default] draft
   119   o  0:8fa14d15e168 added hgignore
   142   o  0:8fa14d15e168 added hgignore
   120       () [default] draft
   143       () [default] draft
   122 More testing!
   145 More testing!
   123 
   146 
   124   $ echo x > x
   147   $ echo x > x
   125   $ hg ci -Aqm "added x"
   148   $ hg ci -Aqm "added x"
   126   $ hg glog -r .
   149   $ hg glog -r .
   127   @  11:71a392c714b5 added x
   150   @  11:801b5920c7ea added x
   128   |   () [default] draft
   151   |   () [default] draft
   129   ~
   152   ~
   130 
   153 
   131   $ echo foo > x
   154   $ echo foo > x
   132   $ hg branch bar
   155   $ hg branch bar
   133   marked working directory as branch bar
   156   marked working directory as branch bar
   134   (branches are permanent and global, did you want a bookmark?)
   157   (branches are permanent and global, did you want a bookmark?)
   135   $ hg amend -m "added foo to x"
   158   $ hg amend -m "added foo to x"
   136 
   159 
   137   $ hg up 71a392c714b5 --hidden
   160   $ hg up 'predecessors(.)' --hidden
   138   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
   161   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
   139   updated to hidden changeset 71a392c714b5
   162   updated to hidden changeset 801b5920c7ea
   140   (hidden revision '71a392c714b5' was rewritten as: 1e1a50385a7d)
   163   (hidden revision '801b5920c7ea' was rewritten as: 5cf74a13db18)
   141   working directory parent is obsolete! (71a392c714b5)
   164   working directory parent is obsolete! (801b5920c7ea)
   142   (use 'hg evolve' to update to its successor: 1e1a50385a7d)
   165   (use 'hg evolve' to update to its successor: 5cf74a13db18)
   143   $ hg rebase -r . -d 4ae4427ee9f8 --config experimental.evolution.allowdivergence=True
   166   $ hg rebase -r . -d 'desc("added d")' --config experimental.evolution.allowdivergence=True
   144   rebasing 11:71a392c714b5 "added x"
   167   rebasing 11:801b5920c7ea "added x"
   145   2 new content-divergent changesets
   168   2 new content-divergent changesets
   146 
   169 
   147   $ hg glog
   170   $ hg glog
   148   @  13:1e4f6b3bb39b added x
   171   @  13:45e15d6e88f5 added x
   149   |   () [default] draft
   172   |   () [default] draft
   150   | *  12:1e1a50385a7d added foo to x
   173   | *  12:5cf74a13db18 added foo to x
   151   | |   () [bar] draft
   174   | |   () [bar] draft
   152   o |  10:4ae4427ee9f8 added d
   175   o |  10:be5a8b9faa8a added d
   153   | |   () [default] draft
   176   | |   () [default] draft
   154   o |  9:917281f93fcb added c
   177   o |  9:e2ce33033e42 added c
   155   |/    () [default] draft
   178   |/    () [default] draft
   156   o  8:171614c9a791 added b
   179   o  8:e7fdc662d630 added b
   157   |   () [default] draft
   180   |   () [default] draft
   158   o  1:c7586e2a9264 added a
   181   o  1:c7586e2a9264 added a
   159   |   () [default] draft
   182   |   () [default] draft
   160   o  0:8fa14d15e168 added hgignore
   183   o  0:8fa14d15e168 added hgignore
   161       () [default] draft
   184       () [default] draft
   162 
   185 
   163   $ hg evolve --content-divergent
   186   $ hg evolve --content-divergent
   164   merge:[13] added x
   187   merge:[13] added x
   165   with: [12] added foo to x
   188   with: [12] added foo to x
   166   base: [11] added x
   189   base: [11] added x
   167   rebasing "other" content-divergent changeset 1e1a50385a7d on 4ae4427ee9f8
   190   rebasing "other" content-divergent changeset 5cf74a13db18 on be5a8b9faa8a
   168   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
   191   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
   169   working directory is now at b006cf317e0e
   192   working directory is now at 4e844ab5e814
   170 
   193 
   171   $ hg exp
   194   $ hg exp
   172   # HG changeset patch
   195   # HG changeset patch
   173   # User test
   196   # User test
   174   # Date 0 0
   197   # Date 0 0
   175   #      Thu Jan 01 00:00:00 1970 +0000
   198   #      Thu Jan 01 00:00:00 1970 +0000
   176   # Branch bar
   199   # Branch bar
   177   # Node ID b006cf317e0ed16dbe786c439577475580f645f1
   200   # Node ID 4e844ab5e8142d26fb1f0990486379f2410b0358
   178   # Parent  4ae4427ee9f8f0935211fd66360948b77ab5aee9
   201   # Parent  be5a8b9faa8af54f115aa168a2c8564acb40c37d
   179   added foo to x
   202   added foo to x
   180   
   203   
   181   diff -r 4ae4427ee9f8 -r b006cf317e0e x
   204   diff -r be5a8b9faa8a -r 4e844ab5e814 x
   182   --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   205   --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   183   +++ b/x	Thu Jan 01 00:00:00 1970 +0000
   206   +++ b/x	Thu Jan 01 00:00:00 1970 +0000
   184   @@ -0,0 +1,1 @@
   207   @@ -0,0 +1,1 @@
   185   +foo
   208   +foo
   186 
   209 
   187 The above `hg exp` and the following log call demonstrates that message, content
   210 The above `hg exp` and the following log call demonstrates that message, content
   188 and branch change is preserved in case of relocation
   211 and branch change is preserved in case of relocation
   189   $ hg glog
   212   $ hg glog
   190   @  15:b006cf317e0e added foo to x
   213   @  15:4e844ab5e814 added foo to x
   191   |   () [bar] draft
   214   |   () [bar] draft
   192   o  10:4ae4427ee9f8 added d
   215   o  10:be5a8b9faa8a added d
   193   |   () [default] draft
   216   |   () [default] draft
   194   o  9:917281f93fcb added c
   217   o  9:e2ce33033e42 added c
   195   |   () [default] draft
   218   |   () [default] draft
   196   o  8:171614c9a791 added b
   219   o  8:e7fdc662d630 added b
   197   |   () [default] draft
   220   |   () [default] draft
   198   o  1:c7586e2a9264 added a
   221   o  1:c7586e2a9264 added a
   199   |   () [default] draft
   222   |   () [default] draft
   200   o  0:8fa14d15e168 added hgignore
   223   o  0:8fa14d15e168 added hgignore
   201       () [default] draft
   224       () [default] draft
       
   225 
       
   226   $ hg debugobsolete
       
   227   b1661037fa25511d0b7ccddf405e336f9d7d3424 7ed0642d644bb9ad93d252dd9ffe7b4729febe48 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '8', 'operation': 'amend', 'user': 'test'}
       
   228   b1661037fa25511d0b7ccddf405e336f9d7d3424 da4b96f4a8d610a85b225583138f681d67e275dd 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'}
       
   229   da4b96f4a8d610a85b225583138f681d67e275dd 11f849d7159fa30a63dbbc1a6d251a8d996baeb5 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'evolve', 'user': 'test'}
       
   230   7ed0642d644bb9ad93d252dd9ffe7b4729febe48 e7fdc662d6305fee2908c3f1630e0b20d6f4689a 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'evolve', 'user': 'test'}
       
   231   11f849d7159fa30a63dbbc1a6d251a8d996baeb5 e7fdc662d6305fee2908c3f1630e0b20d6f4689a 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '8', 'operation': 'evolve', 'user': 'test'}
       
   232   ca1b80f7960aae2306287bab52b4090c59af8c29 e2ce33033e42db2e61a5f71c6dfb52a33efeaf6a 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'evolve', 'user': 'test'}
       
   233   c41c793e0ef1ddb463e85ea9491e377d01127ba2 be5a8b9faa8af54f115aa168a2c8564acb40c37d 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'evolve', 'user': 'test'}
       
   234   801b5920c7ea8d4ebdbc9cfc1e79e665dea2f211 5cf74a13db180e33dc2df8cd2aa70b21252a2a64 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '73', 'operation': 'amend', 'user': 'test'}
       
   235   801b5920c7ea8d4ebdbc9cfc1e79e665dea2f211 45e15d6e88f5bd23ba360dff0c7591eca2d99f43 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'}
       
   236   5cf74a13db180e33dc2df8cd2aa70b21252a2a64 911c21adca136894a2b35f0a58fae7ee94fa5e61 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'evolve', 'user': 'test'}
       
   237   45e15d6e88f5bd23ba360dff0c7591eca2d99f43 4e844ab5e8142d26fb1f0990486379f2410b0358 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '73', 'operation': 'evolve', 'user': 'test'}
       
   238   911c21adca136894a2b35f0a58fae7ee94fa5e61 4e844ab5e8142d26fb1f0990486379f2410b0358 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'evolve', 'user': 'test'}
       
   239   $ hg obslog --all
       
   240   @    4e844ab5e814 (15) added foo to x
       
   241   |\     rewritten(description, branch, content) from 45e15d6e88f5 using evolve by test (Thu Jan 01 00:00:00 1970 +0000)
       
   242   | |    rewritten from 911c21adca13 using evolve by test (Thu Jan 01 00:00:00 1970 +0000)
       
   243   | |
       
   244   x |  45e15d6e88f5 (13) added x
       
   245   | |    rebased(parent) from 801b5920c7ea using rebase by test (Thu Jan 01 00:00:00 1970 +0000)
       
   246   | |
       
   247   | x  911c21adca13 (14) added foo to x
       
   248   | |    rebased(parent) from 5cf74a13db18 using evolve by test (Thu Jan 01 00:00:00 1970 +0000)
       
   249   | |
       
   250   | x  5cf74a13db18 (12) added foo to x
       
   251   |/     rewritten(description, branch, content) from 801b5920c7ea using amend by test (Thu Jan 01 00:00:00 1970 +0000)
       
   252   |
       
   253   x  801b5920c7ea (11) added x
       
   254   
   202 
   255 
   203 Testing when both the content-divergence are on different parents and resolution
   256 Testing when both the content-divergence are on different parents and resolution
   204 will lead to conflicts
   257 will lead to conflicts
   205 ---------------------------------------------------------------------------------
   258 ---------------------------------------------------------------------------------
   206 
   259 
   208   0 files updated, 0 files merged, 3 files removed, 0 files unresolved
   261   0 files updated, 0 files merged, 3 files removed, 0 files unresolved
   209 
   262 
   210   $ echo y > y
   263   $ echo y > y
   211   $ hg ci -Aqm "added y"
   264   $ hg ci -Aqm "added y"
   212   $ hg glog -r .
   265   $ hg glog -r .
   213   @  16:fc6ad2bac162 added y
   266   @  16:ecf1d3992eb4 added y
   214   |   () [default] draft
   267   |   () [default] draft
   215   ~
   268   ~
   216 
   269 
   217   $ echo bar > y
   270   $ echo bar > y
   218   $ hg amend
   271   $ hg amend
   219 
   272 
   220   $ hg up fc6ad2bac162 --hidden
   273   $ hg up 'predecessors(.)' --hidden
   221   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
   274   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
   222   updated to hidden changeset fc6ad2bac162
   275   updated to hidden changeset ecf1d3992eb4
   223   (hidden revision 'fc6ad2bac162' was rewritten as: 2a9f6ccbdeba)
   276   (hidden revision 'ecf1d3992eb4' was rewritten as: 9c32d35206fb)
   224   working directory parent is obsolete! (fc6ad2bac162)
   277   working directory parent is obsolete! (ecf1d3992eb4)
   225   (use 'hg evolve' to update to its successor: 2a9f6ccbdeba)
   278   (use 'hg evolve' to update to its successor: 9c32d35206fb)
   226   $ hg rebase -r . -d b006cf317e0e --config experimental.evolution.allowdivergence=True
   279   $ hg rebase -r . -d 'desc("added foo to x")' --config experimental.evolution.allowdivergence=True
   227   rebasing 16:fc6ad2bac162 "added y"
   280   rebasing 16:ecf1d3992eb4 "added y"
   228   2 new content-divergent changesets
   281   2 new content-divergent changesets
   229   $ echo wat > y
   282   $ echo wat > y
   230   $ hg amend
   283   $ hg amend
   231 
   284 
   232   $ hg glog
   285   $ hg glog
   233   @  19:b4575ed6fcfc added y
   286   @  19:0faa43228ee7 added y
   234   |   () [bar] draft
   287   |   () [bar] draft
   235   | *  17:2a9f6ccbdeba added y
   288   | *  17:9c32d35206fb added y
   236   | |   () [default] draft
   289   | |   () [default] draft
   237   o |  15:b006cf317e0e added foo to x
   290   o |  15:4e844ab5e814 added foo to x
   238   | |   () [bar] draft
   291   | |   () [bar] draft
   239   o |  10:4ae4427ee9f8 added d
   292   o |  10:be5a8b9faa8a added d
   240   | |   () [default] draft
   293   | |   () [default] draft
   241   o |  9:917281f93fcb added c
   294   o |  9:e2ce33033e42 added c
   242   |/    () [default] draft
   295   |/    () [default] draft
   243   o  8:171614c9a791 added b
   296   o  8:e7fdc662d630 added b
   244   |   () [default] draft
   297   |   () [default] draft
   245   o  1:c7586e2a9264 added a
   298   o  1:c7586e2a9264 added a
   246   |   () [default] draft
   299   |   () [default] draft
   247   o  0:8fa14d15e168 added hgignore
   300   o  0:8fa14d15e168 added hgignore
   248       () [default] draft
   301       () [default] draft
   249 
   302 
   250   $ hg evolve --content-divergent
   303   $ hg evolve --content-divergent
   251   merge:[19] added y
   304   merge:[19] added y
   252   with: [17] added y
   305   with: [17] added y
   253   base: [16] added y
   306   base: [16] added y
   254   rebasing "other" content-divergent changeset 2a9f6ccbdeba on b006cf317e0e
   307   rebasing "other" content-divergent changeset 9c32d35206fb on 4e844ab5e814
   255   merging y
   308   merging y
   256   warning: conflicts while merging y! (edit, then use 'hg resolve --mark')
   309   warning: conflicts while merging y! (edit, then use 'hg resolve --mark')
   257   0 files updated, 0 files merged, 0 files removed, 1 files unresolved
   310   0 files updated, 0 files merged, 0 files removed, 1 files unresolved
   258   unresolved merge conflicts
   311   unresolved merge conflicts
   259   (see 'hg help evolve.interrupted')
   312   (see 'hg help evolve.interrupted')
   262   $ echo watbar > y
   315   $ echo watbar > y
   263   $ hg resolve -m
   316   $ hg resolve -m
   264   (no more unresolved files)
   317   (no more unresolved files)
   265   continue: hg evolve --continue
   318   continue: hg evolve --continue
   266   $ hg evolve --continue
   319   $ hg evolve --continue
   267   working directory is now at 7bbcf24ddecf
   320   working directory is now at ba11a9f47a2e
   268 
   321 
   269   $ hg glog
   322   $ hg glog
   270   @  21:7bbcf24ddecf added y
   323   @  21:ba11a9f47a2e added y
   271   |   () [bar] draft
   324   |   () [bar] draft
   272   o  15:b006cf317e0e added foo to x
   325   o  15:4e844ab5e814 added foo to x
   273   |   () [bar] draft
   326   |   () [bar] draft
   274   o  10:4ae4427ee9f8 added d
   327   o  10:be5a8b9faa8a added d
   275   |   () [default] draft
   328   |   () [default] draft
   276   o  9:917281f93fcb added c
   329   o  9:e2ce33033e42 added c
   277   |   () [default] draft
   330   |   () [default] draft
   278   o  8:171614c9a791 added b
   331   o  8:e7fdc662d630 added b
   279   |   () [default] draft
   332   |   () [default] draft
   280   o  1:c7586e2a9264 added a
   333   o  1:c7586e2a9264 added a
   281   |   () [default] draft
   334   |   () [default] draft
   282   o  0:8fa14d15e168 added hgignore
   335   o  0:8fa14d15e168 added hgignore
   283       () [default] draft
   336       () [default] draft
   284 
   337 
       
   338   $ hg debugobsolete
       
   339   b1661037fa25511d0b7ccddf405e336f9d7d3424 7ed0642d644bb9ad93d252dd9ffe7b4729febe48 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '8', 'operation': 'amend', 'user': 'test'}
       
   340   b1661037fa25511d0b7ccddf405e336f9d7d3424 da4b96f4a8d610a85b225583138f681d67e275dd 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'}
       
   341   da4b96f4a8d610a85b225583138f681d67e275dd 11f849d7159fa30a63dbbc1a6d251a8d996baeb5 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'evolve', 'user': 'test'}
       
   342   7ed0642d644bb9ad93d252dd9ffe7b4729febe48 e7fdc662d6305fee2908c3f1630e0b20d6f4689a 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'evolve', 'user': 'test'}
       
   343   11f849d7159fa30a63dbbc1a6d251a8d996baeb5 e7fdc662d6305fee2908c3f1630e0b20d6f4689a 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '8', 'operation': 'evolve', 'user': 'test'}
       
   344   ca1b80f7960aae2306287bab52b4090c59af8c29 e2ce33033e42db2e61a5f71c6dfb52a33efeaf6a 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'evolve', 'user': 'test'}
       
   345   c41c793e0ef1ddb463e85ea9491e377d01127ba2 be5a8b9faa8af54f115aa168a2c8564acb40c37d 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'evolve', 'user': 'test'}
       
   346   801b5920c7ea8d4ebdbc9cfc1e79e665dea2f211 5cf74a13db180e33dc2df8cd2aa70b21252a2a64 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '73', 'operation': 'amend', 'user': 'test'}
       
   347   801b5920c7ea8d4ebdbc9cfc1e79e665dea2f211 45e15d6e88f5bd23ba360dff0c7591eca2d99f43 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'}
       
   348   5cf74a13db180e33dc2df8cd2aa70b21252a2a64 911c21adca136894a2b35f0a58fae7ee94fa5e61 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'evolve', 'user': 'test'}
       
   349   45e15d6e88f5bd23ba360dff0c7591eca2d99f43 4e844ab5e8142d26fb1f0990486379f2410b0358 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '73', 'operation': 'evolve', 'user': 'test'}
       
   350   911c21adca136894a2b35f0a58fae7ee94fa5e61 4e844ab5e8142d26fb1f0990486379f2410b0358 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'evolve', 'user': 'test'}
       
   351   ecf1d3992eb4d9700d441013fc4e89014692b461 9c32d35206fb5c3bf0ac814d410914d54a959a87 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '8', 'operation': 'amend', 'user': 'test'}
       
   352   ecf1d3992eb4d9700d441013fc4e89014692b461 1bb9315961377c18863281be7634ec8ff9b73ea9 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '68', 'operation': 'rebase', 'user': 'test'}
       
   353   1bb9315961377c18863281be7634ec8ff9b73ea9 0faa43228ee7fb9c993f076cef7e2ac14c85954b 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '8', 'operation': 'amend', 'user': 'test'}
       
   354   9c32d35206fb5c3bf0ac814d410914d54a959a87 0fc12918c8daa12ca83ce1e2a38e252b063b6276 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'evolve', 'user': 'test'}
       
   355   0faa43228ee7fb9c993f076cef7e2ac14c85954b ba11a9f47a2e4a3380c4d5f80f64de41645a6681 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '8', 'operation': 'evolve', 'user': 'test'}
       
   356   0fc12918c8daa12ca83ce1e2a38e252b063b6276 ba11a9f47a2e4a3380c4d5f80f64de41645a6681 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '72', 'operation': 'evolve', 'user': 'test'}
   285   $ hg obslog -r . --all
   357   $ hg obslog -r . --all
   286   @    7bbcf24ddecf (21) added y
   358   @    ba11a9f47a2e (21) added y
   287   |\
   359   |\     amended(content) from 0faa43228ee7 using evolve by test (Thu Jan 01 00:00:00 1970 +0000)
   288   x |  48f745db3f53 (20) added y
   360   | |    rewritten(branch, content) from 0fc12918c8da using evolve by test (Thu Jan 01 00:00:00 1970 +0000)
   289   | |    rewritten(branch, content) as 7bbcf24ddecf using evolve by test (Thu Jan 01 00:00:00 1970 +0000)
   361   | |
   290   | |
   362   x |  0faa43228ee7 (19) added y
   291   | x  b4575ed6fcfc (19) added y
   363   | |    amended(content) from 1bb931596137 using amend by test (Thu Jan 01 00:00:00 1970 +0000)
   292   | |    amended(content) as 7bbcf24ddecf using evolve by test (Thu Jan 01 00:00:00 1970 +0000)
   364   | |
   293   | |
   365   | x  0fc12918c8da (20) added y
   294   x |  2a9f6ccbdeba (17) added y
   366   | |    rebased(parent) from 9c32d35206fb using evolve by test (Thu Jan 01 00:00:00 1970 +0000)
   295   | |    rebased(parent) as 48f745db3f53 using evolve by test (Thu Jan 01 00:00:00 1970 +0000)
   367   | |
   296   | |
   368   x |  1bb931596137 (18) added y
   297   | x  96b677f01b81 (18) added y
   369   | |    rewritten(branch, parent) from ecf1d3992eb4 using rebase by test (Thu Jan 01 00:00:00 1970 +0000)
   298   |/     amended(content) as b4575ed6fcfc using amend by test (Thu Jan 01 00:00:00 1970 +0000)
   370   | |
       
   371   | x  9c32d35206fb (17) added y
       
   372   |/     amended(content) from ecf1d3992eb4 using amend by test (Thu Jan 01 00:00:00 1970 +0000)
   299   |
   373   |
   300   x  fc6ad2bac162 (16) added y
   374   x  ecf1d3992eb4 (16) added y
   301        amended(content) as 2a9f6ccbdeba using amend by test (Thu Jan 01 00:00:00 1970 +0000)
       
   302        rewritten(branch, parent) as 96b677f01b81 using rebase by test (Thu Jan 01 00:00:00 1970 +0000)
       
   303   
   375   
   304 
   376 
   305 checking that relocated commit is there
   377 checking that relocated commit is there
   306   $ hg exp 48f745db3f53 --hidden
   378   $ hg exp 20 --hidden
   307   # HG changeset patch
   379   # HG changeset patch
   308   # User test
   380   # User test
   309   # Date 0 0
   381   # Date 0 0
   310   #      Thu Jan 01 00:00:00 1970 +0000
   382   #      Thu Jan 01 00:00:00 1970 +0000
   311   # Node ID 48f745db3f5300363ca248b9aeab20ff2a55fbb3
   383   # Node ID 0fc12918c8daa12ca83ce1e2a38e252b063b6276
   312   # Parent  b006cf317e0ed16dbe786c439577475580f645f1
   384   # Parent  4e844ab5e8142d26fb1f0990486379f2410b0358
   313   added y
   385   added y
   314   
   386   
   315   diff -r b006cf317e0e -r 48f745db3f53 y
   387   diff -r 4e844ab5e814 -r 0fc12918c8da y
   316   --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   388   --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   317   +++ b/y	Thu Jan 01 00:00:00 1970 +0000
   389   +++ b/y	Thu Jan 01 00:00:00 1970 +0000
   318   @@ -0,0 +1,1 @@
   390   @@ -0,0 +1,1 @@
   319   +bar
   391   +bar
   320 
   392 
   321 Testing when the relocation will result in conflicts and merging also:
   393 Testing when the relocation will result in conflicts and merging also:
   322 ----------------------------------------------------------------------
   394 ----------------------------------------------------------------------
   323 
   395 
   324   $ hg glog
   396   $ hg glog
   325   @  21:7bbcf24ddecf added y
   397   @  21:ba11a9f47a2e added y
   326   |   () [bar] draft
   398   |   () [bar] draft
   327   o  15:b006cf317e0e added foo to x
   399   o  15:4e844ab5e814 added foo to x
   328   |   () [bar] draft
   400   |   () [bar] draft
   329   o  10:4ae4427ee9f8 added d
   401   o  10:be5a8b9faa8a added d
   330   |   () [default] draft
   402   |   () [default] draft
   331   o  9:917281f93fcb added c
   403   o  9:e2ce33033e42 added c
   332   |   () [default] draft
   404   |   () [default] draft
   333   o  8:171614c9a791 added b
   405   o  8:e7fdc662d630 added b
   334   |   () [default] draft
   406   |   () [default] draft
   335   o  1:c7586e2a9264 added a
   407   o  1:c7586e2a9264 added a
   336   |   () [default] draft
   408   |   () [default] draft
   337   o  0:8fa14d15e168 added hgignore
   409   o  0:8fa14d15e168 added hgignore
   338       () [default] draft
   410       () [default] draft
   341   0 files updated, 0 files merged, 4 files removed, 0 files unresolved
   413   0 files updated, 0 files merged, 4 files removed, 0 files unresolved
   342 
   414 
   343   $ echo z > z
   415   $ echo z > z
   344   $ hg ci -Aqm "added z"
   416   $ hg ci -Aqm "added z"
   345   $ hg glog -r .
   417   $ hg glog -r .
   346   @  22:daf1de08f3b0 added z
   418   @  22:2048a66e8834 added z
   347   |   () [default] draft
   419   |   () [default] draft
   348   ~
   420   ~
   349 
   421 
   350   $ echo foo > y
   422   $ echo foo > y
   351   $ hg add y
   423   $ hg add y
   352   $ hg amend
   424   $ hg amend
   353 
   425 
   354   $ hg up daf1de08f3b0 --hidden
   426   $ hg up 'predecessors(.)' --hidden
   355   0 files updated, 0 files merged, 1 files removed, 0 files unresolved
   427   0 files updated, 0 files merged, 1 files removed, 0 files unresolved
   356   updated to hidden changeset daf1de08f3b0
   428   updated to hidden changeset 2048a66e8834
   357   (hidden revision 'daf1de08f3b0' was rewritten as: 3f7a1f693080)
   429   (hidden revision '2048a66e8834' was rewritten as: 9bc2ace42175)
   358   working directory parent is obsolete! (daf1de08f3b0)
   430   working directory parent is obsolete! (2048a66e8834)
   359   (use 'hg evolve' to update to its successor: 3f7a1f693080)
   431   (use 'hg evolve' to update to its successor: 9bc2ace42175)
   360   $ hg rebase -r . -d 7bbcf24ddecf --config experimental.evolution.allowdivergence=True
   432   $ hg rebase -r . -d 'desc("added y")' --config experimental.evolution.allowdivergence=True
   361   rebasing 22:daf1de08f3b0 "added z"
   433   rebasing 22:2048a66e8834 "added z"
   362   2 new content-divergent changesets
   434   2 new content-divergent changesets
   363   $ echo bar > z
   435   $ echo bar > z
   364   $ hg amend
   436   $ hg amend
   365 
   437 
   366   $ hg glog
   438   $ hg glog
   367   @  25:53242575ffa9 added z
   439   @  25:ad2ec16eca1e added z
   368   |   () [bar] draft
   440   |   () [bar] draft
   369   | *  23:3f7a1f693080 added z
   441   | *  23:9bc2ace42175 added z
   370   | |   () [default] draft
   442   | |   () [default] draft
   371   o |  21:7bbcf24ddecf added y
   443   o |  21:ba11a9f47a2e added y
   372   | |   () [bar] draft
   444   | |   () [bar] draft
   373   o |  15:b006cf317e0e added foo to x
   445   o |  15:4e844ab5e814 added foo to x
   374   | |   () [bar] draft
   446   | |   () [bar] draft
   375   o |  10:4ae4427ee9f8 added d
   447   o |  10:be5a8b9faa8a added d
   376   | |   () [default] draft
   448   | |   () [default] draft
   377   o |  9:917281f93fcb added c
   449   o |  9:e2ce33033e42 added c
   378   |/    () [default] draft
   450   |/    () [default] draft
   379   o  8:171614c9a791 added b
   451   o  8:e7fdc662d630 added b
   380   |   () [default] draft
   452   |   () [default] draft
   381   o  1:c7586e2a9264 added a
   453   o  1:c7586e2a9264 added a
   382   |   () [default] draft
   454   |   () [default] draft
   383   o  0:8fa14d15e168 added hgignore
   455   o  0:8fa14d15e168 added hgignore
   384       () [default] draft
   456       () [default] draft
   385 
   457 
   386   $ hg evolve --content-divergent --any
   458   $ hg evolve --content-divergent --any
   387   merge:[25] added z
   459   merge:[25] added z
   388   with: [23] added z
   460   with: [23] added z
   389   base: [22] added z
   461   base: [22] added z
   390   rebasing "other" content-divergent changeset 3f7a1f693080 on 7bbcf24ddecf
   462   rebasing "other" content-divergent changeset 9bc2ace42175 on ba11a9f47a2e
   391   merging y
   463   merging y
   392   warning: conflicts while merging y! (edit, then use 'hg resolve --mark')
   464   warning: conflicts while merging y! (edit, then use 'hg resolve --mark')
   393   unresolved merge conflicts
   465   unresolved merge conflicts
   394   (see 'hg help evolve.interrupted')
   466   (see 'hg help evolve.interrupted')
   395   [1]
   467   [1]
   396 
   468 
   397   $ hg diff
   469   $ hg diff
   398   diff -r 7bbcf24ddecf y
   470   diff -r ba11a9f47a2e y
   399   --- a/y	Thu Jan 01 00:00:00 1970 +0000
   471   --- a/y	Thu Jan 01 00:00:00 1970 +0000
   400   +++ b/y	Thu Jan 01 00:00:00 1970 +0000
   472   +++ b/y	Thu Jan 01 00:00:00 1970 +0000
   401   @@ -1,1 +1,5 @@
   473   @@ -1,1 +1,5 @@
   402   +<<<<<<< destination: 7bbcf24ddecf bar - test: added y
   474   +<<<<<<< destination: ba11a9f47a2e bar - test: added y
   403    watbar
   475    watbar
   404   +=======
   476   +=======
   405   +foo
   477   +foo
   406   +>>>>>>> evolving:    3f7a1f693080 - test: added z
   478   +>>>>>>> evolving:    9bc2ace42175 - test: added z
   407   diff -r 7bbcf24ddecf z
   479   diff -r ba11a9f47a2e z
   408   --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   480   --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   409   +++ b/z	Thu Jan 01 00:00:00 1970 +0000
   481   +++ b/z	Thu Jan 01 00:00:00 1970 +0000
   410   @@ -0,0 +1,1 @@
   482   @@ -0,0 +1,1 @@
   411   +z
   483   +z
   412 
   484 
   414   $ hg resolve -m
   486   $ hg resolve -m
   415   (no more unresolved files)
   487   (no more unresolved files)
   416   continue: hg evolve --continue
   488   continue: hg evolve --continue
   417 
   489 
   418   $ hg evolve --continue
   490   $ hg evolve --continue
   419   evolving 23:3f7a1f693080 "added z"
   491   evolving 23:9bc2ace42175 "added z"
   420   merging y
   492   merging y
   421   warning: conflicts while merging y! (edit, then use 'hg resolve --mark')
   493   warning: conflicts while merging y! (edit, then use 'hg resolve --mark')
   422   0 files updated, 0 files merged, 0 files removed, 1 files unresolved
   494   0 files updated, 0 files merged, 0 files removed, 1 files unresolved
   423   unresolved merge conflicts
   495   unresolved merge conflicts
   424   (see 'hg help evolve.interrupted')
   496   (see 'hg help evolve.interrupted')
   425   [1]
   497   [1]
   426 
   498 
   427   $ hg diff
   499   $ hg diff
   428   diff -r 53242575ffa9 y
   500   diff -r ad2ec16eca1e y
   429   --- a/y	Thu Jan 01 00:00:00 1970 +0000
   501   --- a/y	Thu Jan 01 00:00:00 1970 +0000
   430   +++ b/y	Thu Jan 01 00:00:00 1970 +0000
   502   +++ b/y	Thu Jan 01 00:00:00 1970 +0000
   431   @@ -1,1 +1,5 @@
   503   @@ -1,1 +1,5 @@
   432   +<<<<<<< local: 53242575ffa9 bar - test: added z
   504   +<<<<<<< local: ad2ec16eca1e bar - test: added z
   433    watbar
   505    watbar
   434   +=======
   506   +=======
   435   +foo
   507   +foo
   436   +>>>>>>> other: cdb0643c69fc - test: added z
   508   +>>>>>>> other: a7326a078527 - test: added z
   437 
   509 
   438   $ echo foo > y
   510   $ echo foo > y
   439   $ hg resolve -m
   511   $ hg resolve -m
   440   (no more unresolved files)
   512   (no more unresolved files)
   441   continue: hg evolve --continue
   513   continue: hg evolve --continue
   442   $ hg evolve --continue
   514   $ hg evolve --continue
   443   working directory is now at 6fc7d9682de6
   515   working directory is now at 45e55c9ab3d0
   444 
   516 
   445   $ hg glog
   517   $ hg glog
   446   @  27:6fc7d9682de6 added z
   518   @  27:45e55c9ab3d0 added z
   447   |   () [bar] draft
   519   |   () [bar] draft
   448   o  21:7bbcf24ddecf added y
   520   o  21:ba11a9f47a2e added y
   449   |   () [bar] draft
   521   |   () [bar] draft
   450   o  15:b006cf317e0e added foo to x
   522   o  15:4e844ab5e814 added foo to x
   451   |   () [bar] draft
   523   |   () [bar] draft
   452   o  10:4ae4427ee9f8 added d
   524   o  10:be5a8b9faa8a added d
   453   |   () [default] draft
   525   |   () [default] draft
   454   o  9:917281f93fcb added c
   526   o  9:e2ce33033e42 added c
   455   |   () [default] draft
   527   |   () [default] draft
   456   o  8:171614c9a791 added b
   528   o  8:e7fdc662d630 added b
   457   |   () [default] draft
   529   |   () [default] draft
   458   o  1:c7586e2a9264 added a
   530   o  1:c7586e2a9264 added a
   459   |   () [default] draft
   531   |   () [default] draft
   460   o  0:8fa14d15e168 added hgignore
   532   o  0:8fa14d15e168 added hgignore
   461       () [default] draft
   533       () [default] draft
   464   # HG changeset patch
   536   # HG changeset patch
   465   # User test
   537   # User test
   466   # Date 0 0
   538   # Date 0 0
   467   #      Thu Jan 01 00:00:00 1970 +0000
   539   #      Thu Jan 01 00:00:00 1970 +0000
   468   # Branch bar
   540   # Branch bar
   469   # Node ID 6fc7d9682de6e3bee6c8b1266b756ed7d522b7e4
   541   # Node ID 45e55c9ab3d0b4746161fcbe5b6c062eb4647fdb
   470   # Parent  7bbcf24ddecfe97d7c2ac6fa8c07c155c8fda47b
   542   # Parent  ba11a9f47a2e4a3380c4d5f80f64de41645a6681
   471   added z
   543   added z
   472   
   544   
   473   diff -r 7bbcf24ddecf -r 6fc7d9682de6 y
   545   diff -r ba11a9f47a2e -r 45e55c9ab3d0 y
   474   --- a/y	Thu Jan 01 00:00:00 1970 +0000
   546   --- a/y	Thu Jan 01 00:00:00 1970 +0000
   475   +++ b/y	Thu Jan 01 00:00:00 1970 +0000
   547   +++ b/y	Thu Jan 01 00:00:00 1970 +0000
   476   @@ -1,1 +1,1 @@
   548   @@ -1,1 +1,1 @@
   477   -watbar
   549   -watbar
   478   +foo
   550   +foo
   479   diff -r 7bbcf24ddecf -r 6fc7d9682de6 z
   551   diff -r ba11a9f47a2e -r 45e55c9ab3d0 z
   480   --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   552   --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   481   +++ b/z	Thu Jan 01 00:00:00 1970 +0000
   553   +++ b/z	Thu Jan 01 00:00:00 1970 +0000
   482   @@ -0,0 +1,1 @@
   554   @@ -0,0 +1,1 @@
   483   +bar
   555   +bar
   484 
   556 
       
   557   $ hg debugobsolete
       
   558   b1661037fa25511d0b7ccddf405e336f9d7d3424 7ed0642d644bb9ad93d252dd9ffe7b4729febe48 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '8', 'operation': 'amend', 'user': 'test'}
       
   559   b1661037fa25511d0b7ccddf405e336f9d7d3424 da4b96f4a8d610a85b225583138f681d67e275dd 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'}
       
   560   da4b96f4a8d610a85b225583138f681d67e275dd 11f849d7159fa30a63dbbc1a6d251a8d996baeb5 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'evolve', 'user': 'test'}
       
   561   7ed0642d644bb9ad93d252dd9ffe7b4729febe48 e7fdc662d6305fee2908c3f1630e0b20d6f4689a 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'evolve', 'user': 'test'}
       
   562   11f849d7159fa30a63dbbc1a6d251a8d996baeb5 e7fdc662d6305fee2908c3f1630e0b20d6f4689a 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '8', 'operation': 'evolve', 'user': 'test'}
       
   563   ca1b80f7960aae2306287bab52b4090c59af8c29 e2ce33033e42db2e61a5f71c6dfb52a33efeaf6a 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'evolve', 'user': 'test'}
       
   564   c41c793e0ef1ddb463e85ea9491e377d01127ba2 be5a8b9faa8af54f115aa168a2c8564acb40c37d 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'evolve', 'user': 'test'}
       
   565   801b5920c7ea8d4ebdbc9cfc1e79e665dea2f211 5cf74a13db180e33dc2df8cd2aa70b21252a2a64 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '73', 'operation': 'amend', 'user': 'test'}
       
   566   801b5920c7ea8d4ebdbc9cfc1e79e665dea2f211 45e15d6e88f5bd23ba360dff0c7591eca2d99f43 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'}
       
   567   5cf74a13db180e33dc2df8cd2aa70b21252a2a64 911c21adca136894a2b35f0a58fae7ee94fa5e61 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'evolve', 'user': 'test'}
       
   568   45e15d6e88f5bd23ba360dff0c7591eca2d99f43 4e844ab5e8142d26fb1f0990486379f2410b0358 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '73', 'operation': 'evolve', 'user': 'test'}
       
   569   911c21adca136894a2b35f0a58fae7ee94fa5e61 4e844ab5e8142d26fb1f0990486379f2410b0358 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'evolve', 'user': 'test'}
       
   570   ecf1d3992eb4d9700d441013fc4e89014692b461 9c32d35206fb5c3bf0ac814d410914d54a959a87 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '8', 'operation': 'amend', 'user': 'test'}
       
   571   ecf1d3992eb4d9700d441013fc4e89014692b461 1bb9315961377c18863281be7634ec8ff9b73ea9 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '68', 'operation': 'rebase', 'user': 'test'}
       
   572   1bb9315961377c18863281be7634ec8ff9b73ea9 0faa43228ee7fb9c993f076cef7e2ac14c85954b 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '8', 'operation': 'amend', 'user': 'test'}
       
   573   9c32d35206fb5c3bf0ac814d410914d54a959a87 0fc12918c8daa12ca83ce1e2a38e252b063b6276 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'evolve', 'user': 'test'}
       
   574   0faa43228ee7fb9c993f076cef7e2ac14c85954b ba11a9f47a2e4a3380c4d5f80f64de41645a6681 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '8', 'operation': 'evolve', 'user': 'test'}
       
   575   0fc12918c8daa12ca83ce1e2a38e252b063b6276 ba11a9f47a2e4a3380c4d5f80f64de41645a6681 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '72', 'operation': 'evolve', 'user': 'test'}
       
   576   2048a66e8834bda866dcc8c479f091897816833e 9bc2ace42175da7380251fca97730f62ff5b9185 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '8', 'operation': 'amend', 'user': 'test'}
       
   577   2048a66e8834bda866dcc8c479f091897816833e ee19d6cc67048a1a7469268068a1413611720975 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '68', 'operation': 'rebase', 'user': 'test'}
       
   578   ee19d6cc67048a1a7469268068a1413611720975 ad2ec16eca1eac4cf5045b496efa6205652e9a02 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '8', 'operation': 'amend', 'user': 'test'}
       
   579   9bc2ace42175da7380251fca97730f62ff5b9185 a7326a0785271a7bef2e812a9a742fb4256b4a3c 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '12', 'operation': 'evolve', 'user': 'test'}
       
   580   ad2ec16eca1eac4cf5045b496efa6205652e9a02 45e55c9ab3d0b4746161fcbe5b6c062eb4647fdb 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '8', 'operation': 'evolve', 'user': 'test'}
       
   581   a7326a0785271a7bef2e812a9a742fb4256b4a3c 45e55c9ab3d0b4746161fcbe5b6c062eb4647fdb 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '72', 'operation': 'evolve', 'user': 'test'}
       
   582   $ hg obslog --all
       
   583   @    45e55c9ab3d0 (27) added z
       
   584   |\     rewritten(branch, content) from a7326a078527 using evolve by test (Thu Jan 01 00:00:00 1970 +0000)
       
   585   | |    amended(content) from ad2ec16eca1e using evolve by test (Thu Jan 01 00:00:00 1970 +0000)
       
   586   | |
       
   587   x |  a7326a078527 (26) added z
       
   588   | |    rewritten(parent, content) from 9bc2ace42175 using evolve by test (Thu Jan 01 00:00:00 1970 +0000)
       
   589   | |
       
   590   | x  ad2ec16eca1e (25) added z
       
   591   | |    amended(content) from ee19d6cc6704 using amend by test (Thu Jan 01 00:00:00 1970 +0000)
       
   592   | |
       
   593   x |  9bc2ace42175 (23) added z
       
   594   | |    amended(content) from 2048a66e8834 using amend by test (Thu Jan 01 00:00:00 1970 +0000)
       
   595   | |
       
   596   | x  ee19d6cc6704 (24) added z
       
   597   |/     rewritten(branch, parent) from 2048a66e8834 using rebase by test (Thu Jan 01 00:00:00 1970 +0000)
       
   598   |
       
   599   x  2048a66e8834 (22) added z
       
   600   
       
   601 
   485   $ cd ..
   602   $ cd ..
       
   603 
       
   604 Testing when relocation results in nothing to commit
       
   605 ----------------------------------------------------
       
   606 
       
   607 Set up a repo where relocation results in no changes to commit because the
       
   608 changes from the relocated node are already in the destination.
       
   609 
       
   610   $ hg init nothing-to-commit
       
   611   $ cd nothing-to-commit
       
   612   $ echo 0 > a
       
   613   $ hg ci -Aqm initial
       
   614   $ echo 1 > a
       
   615   $ hg ci -Aqm upstream
       
   616   $ hg prev -q
       
   617 
       
   618 Create the source of divergence.
       
   619   $ echo 0 > b
       
   620   $ hg ci -Aqm divergent
       
   621 
       
   622 The first side of the divergence get rebased on top of upstream.
       
   623   $ hg rebase -r . -d 'desc("upstream")'
       
   624   rebasing 2:898ddd4443b3 "divergent" (tip)
       
   625   $ hg --hidden co 2 -q
       
   626   updated to hidden changeset 898ddd4443b3
       
   627   (hidden revision '898ddd4443b3' was rewritten as: befae6138569)
       
   628   working directory parent is obsolete! (898ddd4443b3)
       
   629 
       
   630 The other side of the divergence gets amended so it matches upstream.
       
   631 Relocation (onto upstream) will therefore result in no changes to commit.
       
   632   $ hg revert -r 'desc("upstream")' --all
       
   633   reverting a
       
   634   removing b
       
   635   $ hg amend --config experimental.evolution.allowdivergence=True
       
   636   2 new content-divergent changesets
       
   637 
       
   638 Add a commit on top. This one should become an orphan. Evolving it later
       
   639 should put it on top of the other divergent side (the one that's on top of
       
   640 upstream)
       
   641   $ echo 0 > c
       
   642   $ hg ci -Aqm child
       
   643   $ hg co -q null
       
   644   $ hg glog
       
   645   o  5:88473f9137d1 child
       
   646   |   () [default] draft
       
   647   *  4:4cc21313ecee divergent
       
   648   |   () [default] draft
       
   649   | *  3:befae6138569 divergent
       
   650   | |   () [default] draft
       
   651   | o  1:33c576d20069 upstream
       
   652   |/    () [default] draft
       
   653   o  0:98a3f8f02ba7 initial
       
   654       () [default] draft
       
   655   $ hg evolve --content-divergent
       
   656   merge:[3] divergent
       
   657   with: [4] divergent
       
   658   base: [2] divergent
       
   659   rebasing "other" content-divergent changeset 4cc21313ecee on 33c576d20069
       
   660   0 files updated, 0 files merged, 1 files removed, 0 files unresolved
       
   661   1 new orphan changesets
       
   662   $ hg glog
       
   663   o  7:cc3d0c6117c7 divergent
       
   664   |   () [default] draft
       
   665   | *  5:88473f9137d1 child
       
   666   | |   () [default] draft
       
   667   | x  4:4cc21313ecee divergent
       
   668   | |   () [default] draft
       
   669   o |  1:33c576d20069 upstream
       
   670   |/    () [default] draft
       
   671   o  0:98a3f8f02ba7 initial
       
   672       () [default] draft
       
   673 
       
   674   $ hg evolve --any
       
   675   move:[5] child
       
   676   atop:[7] divergent
       
   677   $ hg glog
       
   678   o  8:916b4ec3b91f child
       
   679   |   () [default] draft
       
   680   o  7:cc3d0c6117c7 divergent
       
   681   |   () [default] draft
       
   682   o  1:33c576d20069 upstream
       
   683   |   () [default] draft
       
   684   o  0:98a3f8f02ba7 initial
       
   685       () [default] draft
       
   686   $ hg debugobsolete
       
   687   898ddd4443b3d5520bf48f22f9411d5a0751cf2e befae61385695f1ae4b78b030ad91075b2b523ef 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'}
       
   688   898ddd4443b3d5520bf48f22f9411d5a0751cf2e 4cc21313ecee97ce33265514a0596a192bfa6b3f 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '8', 'operation': 'amend', 'user': 'test'}
       
   689   4cc21313ecee97ce33265514a0596a192bfa6b3f bf4fe3a3afeb14c338094f41a35863921856592f 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '12', 'operation': 'evolve', 'user': 'test'}
       
   690   befae61385695f1ae4b78b030ad91075b2b523ef cc3d0c6117c7400995107497370fa4c2138399cd 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '8', 'operation': 'evolve', 'user': 'test'}
       
   691   bf4fe3a3afeb14c338094f41a35863921856592f cc3d0c6117c7400995107497370fa4c2138399cd 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'evolve', 'user': 'test'}
       
   692   88473f9137d12e90055d30bbb9b78dd786520870 916b4ec3b91fd03826bd4b179051ae3cee633b56 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'evolve', 'user': 'test'}
       
   693   $ hg obslog -r 'desc("divergent")' --all
       
   694   o    cc3d0c6117c7 (7) divergent
       
   695   |\     amended(content) from befae6138569 using evolve by test (Thu Jan 01 00:00:00 1970 +0000)
       
   696   | |    rewritten from bf4fe3a3afeb using evolve by test (Thu Jan 01 00:00:00 1970 +0000)
       
   697   | |
       
   698   x |  befae6138569 (3) divergent
       
   699   | |    rebased(parent) from 898ddd4443b3 using rebase by test (Thu Jan 01 00:00:00 1970 +0000)
       
   700   | |
       
   701   | x  bf4fe3a3afeb (6) divergent
       
   702   | |    rewritten(parent, content) from 4cc21313ecee using evolve by test (Thu Jan 01 00:00:00 1970 +0000)
       
   703   | |
       
   704   | x  4cc21313ecee (4) divergent
       
   705   |/     amended(content) from 898ddd4443b3 using amend by test (Thu Jan 01 00:00:00 1970 +0000)
       
   706   |
       
   707   x  898ddd4443b3 (2) divergent
       
   708   
       
   709   $ cd ..