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