tests/test-copies-chain-merge.t
changeset 46556 0ebfd02dafd5
parent 46555 46205a478a08
child 46557 067307d6589d
equal deleted inserted replaced
46555:46205a478a08 46556:0ebfd02dafd5
    84   adding h
    84   adding h
    85   adding p
    85   adding p
    86   adding q
    86   adding q
    87   adding r
    87   adding r
    88   $ hg mv a c
    88   $ hg mv a c
    89   $ hg ci -Am 'i-1: a -move-> c'
    89   $ hg mv p s
       
    90   $ hg ci -Am 'i-1: a -move-> c, p -move-> s'
    90   $ hg mv c d
    91   $ hg mv c d
    91   $ hg ci -Am 'i-2: c -move-> d'
    92   $ hg mv s t
       
    93   $ hg ci -Am 'i-2: c -move-> d, s -move-> t'
    92   $ hg log -G
    94   $ hg log -G
    93   @  i-2: c -move-> d
    95   @  i-2: c -move-> d, s -move-> t
    94   |
    96   |
    95   o  i-1: a -move-> c
    97   o  i-1: a -move-> c, p -move-> s
    96   |
    98   |
    97   o  i-0 initial commit: a b h
    99   o  i-0 initial commit: a b h
    98   
   100   
    99 
   101 
   100 And having another branch with renames on the other side
   102 And having another branch with renames on the other side
   106   $ hg log -G --rev '::.'
   108   $ hg log -G --rev '::.'
   107   @  a-2: e -move-> f
   109   @  a-2: e -move-> f
   108   |
   110   |
   109   o  a-1: d -move-> e
   111   o  a-1: d -move-> e
   110   |
   112   |
   111   o  i-2: c -move-> d
   113   o  i-2: c -move-> d, s -move-> t
   112   |
   114   |
   113   o  i-1: a -move-> c
   115   o  i-1: a -move-> c, p -move-> s
   114   |
   116   |
   115   o  i-0 initial commit: a b h
   117   o  i-0 initial commit: a b h
   116   
   118   
   117 
   119 
   118 Have a branching with nothing on one side
   120 Have a branching with nothing on one side
   123   $ hg ci -m 'b-1: b update'
   125   $ hg ci -m 'b-1: b update'
   124   created new head
   126   created new head
   125   $ hg log -G --rev '::.'
   127   $ hg log -G --rev '::.'
   126   @  b-1: b update
   128   @  b-1: b update
   127   |
   129   |
   128   o  i-2: c -move-> d
   130   o  i-2: c -move-> d, s -move-> t
   129   |
   131   |
   130   o  i-1: a -move-> c
   132   o  i-1: a -move-> c, p -move-> s
   131   |
   133   |
   132   o  i-0 initial commit: a b h
   134   o  i-0 initial commit: a b h
   133   
   135   
   134 
   136 
   135 Create a branch that delete a file previous renamed
   137 Create a branch that delete a file previous renamed
   140   $ hg ci -m 'c-1 delete d'
   142   $ hg ci -m 'c-1 delete d'
   141   created new head
   143   created new head
   142   $ hg log -G --rev '::.'
   144   $ hg log -G --rev '::.'
   143   @  c-1 delete d
   145   @  c-1 delete d
   144   |
   146   |
   145   o  i-2: c -move-> d
   147   o  i-2: c -move-> d, s -move-> t
   146   |
   148   |
   147   o  i-1: a -move-> c
   149   o  i-1: a -move-> c, p -move-> s
   148   |
   150   |
   149   o  i-0 initial commit: a b h
   151   o  i-0 initial commit: a b h
   150   
   152   
   151 
   153 
   152 Create a branch that delete a file previous renamed and recreate it
   154 Create a branch that delete a file previous renamed and recreate it
   162   $ hg log -G --rev '::.'
   164   $ hg log -G --rev '::.'
   163   @  d-2 re-add d
   165   @  d-2 re-add d
   164   |
   166   |
   165   o  d-1 delete d
   167   o  d-1 delete d
   166   |
   168   |
   167   o  i-2: c -move-> d
   169   o  i-2: c -move-> d, s -move-> t
   168   |
   170   |
   169   o  i-1: a -move-> c
   171   o  i-1: a -move-> c, p -move-> s
   170   |
   172   |
   171   o  i-0 initial commit: a b h
   173   o  i-0 initial commit: a b h
   172   
   174   
   173 
   175 
   174 Having another branch renaming a different file to the same filename as another
   176 Having another branch renaming a different file to the same filename as another
   183   $ hg log -G --rev '::.'
   185   $ hg log -G --rev '::.'
   184   @  e-2 g -move-> f
   186   @  e-2 g -move-> f
   185   |
   187   |
   186   o  e-1 b -move-> g
   188   o  e-1 b -move-> g
   187   |
   189   |
   188   o  i-2: c -move-> d
   190   o  i-2: c -move-> d, s -move-> t
   189   |
   191   |
   190   o  i-1: a -move-> c
   192   o  i-1: a -move-> c, p -move-> s
   191   |
   193   |
   192   o  i-0 initial commit: a b h
   194   o  i-0 initial commit: a b h
   193   
   195   
   194 
   196 
   195 Setup all merge
   197 Setup all merge
   228   | |
   230   | |
   229   o |  a-2: e -move-> f
   231   o |  a-2: e -move-> f
   230   | |
   232   | |
   231   o |  a-1: d -move-> e
   233   o |  a-1: d -move-> e
   232   |/
   234   |/
   233   o  i-2: c -move-> d
   235   o  i-2: c -move-> d, s -move-> t
   234   |
   236   |
   235   o  i-1: a -move-> c
   237   o  i-1: a -move-> c, p -move-> s
   236   |
   238   |
   237   o  i-0 initial commit: a b h
   239   o  i-0 initial commit: a b h
   238   
   240   
   239 
   241 
   240 
   242 
   278   | |/
   280   | |/
   279   | o  c-1 delete d
   281   | o  c-1 delete d
   280   | |
   282   | |
   281   o |  b-1: b update
   283   o |  b-1: b update
   282   |/
   284   |/
   283   o  i-2: c -move-> d
   285   o  i-2: c -move-> d, s -move-> t
   284   |
   286   |
   285   o  i-1: a -move-> c
   287   o  i-1: a -move-> c, p -move-> s
   286   |
   288   |
   287   o  i-0 initial commit: a b h
   289   o  i-0 initial commit: a b h
   288   
   290   
   289 
   291 
   290 Comparing with a merge re-adding the file afterward
   292 Comparing with a merge re-adding the file afterward
   318   | |
   320   | |
   319   | o  d-1 delete d
   321   | o  d-1 delete d
   320   | |
   322   | |
   321   o |  b-1: b update
   323   o |  b-1: b update
   322   |/
   324   |/
   323   o  i-2: c -move-> d
   325   o  i-2: c -move-> d, s -move-> t
   324   |
   326   |
   325   o  i-1: a -move-> c
   327   o  i-1: a -move-> c, p -move-> s
   326   |
   328   |
   327   o  i-0 initial commit: a b h
   329   o  i-0 initial commit: a b h
   328   
   330   
   329 
   331 
   330 
   332 
   366   | |
   368   | |
   367   o |  a-2: e -move-> f
   369   o |  a-2: e -move-> f
   368   | |
   370   | |
   369   o |  a-1: d -move-> e
   371   o |  a-1: d -move-> e
   370   |/
   372   |/
   371   o  i-2: c -move-> d
   373   o  i-2: c -move-> d, s -move-> t
   372   |
   374   |
   373   o  i-1: a -move-> c
   375   o  i-1: a -move-> c, p -move-> s
   374   |
   376   |
   375   o  i-0 initial commit: a b h
   377   o  i-0 initial commit: a b h
   376   
   378   
   377 
   379 
   378 Subcase: existing copy information overwritten on one branch
   380 Subcase: existing copy information overwritten on one branch
   421   | |
   423   | |
   422   | o  f-1: rename h -> i
   424   | o  f-1: rename h -> i
   423   | |
   425   | |
   424   o |  b-1: b update
   426   o |  b-1: b update
   425   |/
   427   |/
   426   o  i-2: c -move-> d
   428   o  i-2: c -move-> d, s -move-> t
   427   |
   429   |
   428   o  i-1: a -move-> c
   430   o  i-1: a -move-> c, p -move-> s
   429   |
   431   |
   430   o  i-0 initial commit: a b h
   432   o  i-0 initial commit: a b h
   431   
   433   
   432 
   434 
   433 
   435 
   473   | |
   475   | |
   474   o |  d-2 re-add d
   476   o |  d-2 re-add d
   475   | |
   477   | |
   476   o |  d-1 delete d
   478   o |  d-1 delete d
   477   |/
   479   |/
   478   o  i-2: c -move-> d
   480   o  i-2: c -move-> d, s -move-> t
   479   |
   481   |
   480   o  i-1: a -move-> c
   482   o  i-1: a -move-> c, p -move-> s
   481   |
   483   |
   482   o  i-0 initial commit: a b h
   484   o  i-0 initial commit: a b h
   483   
   485   
   484 
   486 
   485 Subcase: merging a change to a file with a "copy overwrite" to that file from another branch
   487 Subcase: merging a change to a file with a "copy overwrite" to that file from another branch
   528   | |
   530   | |
   529   o |  f-2: rename i -> d
   531   o |  f-2: rename i -> d
   530   | |
   532   | |
   531   o |  f-1: rename h -> i
   533   o |  f-1: rename h -> i
   532   |/
   534   |/
   533   o  i-2: c -move-> d
   535   o  i-2: c -move-> d, s -move-> t
   534   |
   536   |
   535   o  i-1: a -move-> c
   537   o  i-1: a -move-> c, p -move-> s
   536   |
   538   |
   537   o  i-0 initial commit: a b h
   539   o  i-0 initial commit: a b h
   538   
   540   
   539 
   541 
   540 
   542 
   586   | |/
   588   | |/
   587   | o  g-1: update d
   589   | o  g-1: update d
   588   | |
   590   | |
   589   o |  c-1 delete d
   591   o |  c-1 delete d
   590   |/
   592   |/
   591   o  i-2: c -move-> d
   593   o  i-2: c -move-> d, s -move-> t
   592   |
   594   |
   593   o  i-1: a -move-> c
   595   o  i-1: a -move-> c, p -move-> s
   594   |
   596   |
   595   o  i-0 initial commit: a b h
   597   o  i-0 initial commit: a b h
   596   
   598   
   597 
   599 
   598 
   600 
   635   | |/
   637   | |/
   636   | o  c-1 delete d
   638   | o  c-1 delete d
   637   | |
   639   | |
   638   o |  b-1: b update
   640   o |  b-1: b update
   639   |/
   641   |/
   640   o  i-2: c -move-> d
   642   o  i-2: c -move-> d, s -move-> t
   641   |
   643   |
   642   o  i-1: a -move-> c
   644   o  i-1: a -move-> c, p -move-> s
   643   |
   645   |
   644   o  i-0 initial commit: a b h
   646   o  i-0 initial commit: a b h
   645   
   647   
   646 
   648 
   647 
   649 
   662   $ hg mv b d
   664   $ hg mv b d
   663   $ hg ci -m "h-1: b -(move)-> d"
   665   $ hg ci -m "h-1: b -(move)-> d"
   664   created new head
   666   created new head
   665 
   667 
   666   $ hg up 'desc("c-1")'
   668   $ hg up 'desc("c-1")'
   667   1 files updated, 0 files merged, 2 files removed, 0 files unresolved
   669   2 files updated, 0 files merged, 3 files removed, 0 files unresolved
   668   $ hg merge 'desc("h-1")'
   670   $ hg merge 'desc("h-1")'
   669   1 files updated, 0 files merged, 1 files removed, 0 files unresolved
   671   1 files updated, 0 files merged, 1 files removed, 0 files unresolved
   670   (branch merge, don't forget to commit)
   672   (branch merge, don't forget to commit)
   671   $ hg ci -m "mCH-delete-before-conflict-m-0 $case_desc - one way"
   673   $ hg ci -m "mCH-delete-before-conflict-m-0 $case_desc - one way"
   672 
   674 
   673   $ hg up 'desc("h-1")'
   675   $ hg up 'desc("h-1")'
   674   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
   676   2 files updated, 0 files merged, 1 files removed, 0 files unresolved
   675   $ hg merge 'desc("c-1")'
   677   $ hg merge 'desc("c-1")'
   676   0 files updated, 0 files merged, 1 files removed, 0 files unresolved
   678   1 files updated, 0 files merged, 2 files removed, 0 files unresolved
   677   (branch merge, don't forget to commit)
   679   (branch merge, don't forget to commit)
   678   $ hg ci -m "mHC-delete-before-conflict-m-0 $case_desc - the other way"
   680   $ hg ci -m "mHC-delete-before-conflict-m-0 $case_desc - the other way"
   679   created new head
   681   created new head
   680   $ hg log -G --rev '::(desc("mCH-delete-before-conflict-m")+desc("mHC-delete-before-conflict-m"))'
   682   $ hg log -G --rev '::(desc("mCH-delete-before-conflict-m")+desc("mHC-delete-before-conflict-m"))'
   681   @    mHC-delete-before-conflict-m-0 simple merge - C side: d is the results of renames then deleted, H side: d is result of another rename (same content as the other branch) - the other way
   683   @    mHC-delete-before-conflict-m-0 simple merge - C side: d is the results of renames then deleted, H side: d is result of another rename (same content as the other branch) - the other way
   684   | |/
   686   | |/
   685   | o  h-1: b -(move)-> d
   687   | o  h-1: b -(move)-> d
   686   | |
   688   | |
   687   o |  c-1 delete d
   689   o |  c-1 delete d
   688   | |
   690   | |
   689   o |  i-2: c -move-> d
   691   o |  i-2: c -move-> d, s -move-> t
   690   | |
   692   | |
   691   o |  i-1: a -move-> c
   693   o |  i-1: a -move-> c, p -move-> s
   692   |/
   694   |/
   693   o  i-0 initial commit: a b h
   695   o  i-0 initial commit: a b h
   694   
   696   
   695 
   697 
   696 Variant of previous with extra changes introduced by the merge
   698 Variant of previous with extra changes introduced by the merge
   738   | |
   740   | |
   739   o |  a-2: e -move-> f
   741   o |  a-2: e -move-> f
   740   | |
   742   | |
   741   o |  a-1: d -move-> e
   743   o |  a-1: d -move-> e
   742   |/
   744   |/
   743   o  i-2: c -move-> d
   745   o  i-2: c -move-> d, s -move-> t
   744   |
   746   |
   745   o  i-1: a -move-> c
   747   o  i-1: a -move-> c, p -move-> s
   746   |
   748   |
   747   o  i-0 initial commit: a b h
   749   o  i-0 initial commit: a b h
   748   
   750   
   749 
   751 
   750 Decision from previous merge are properly chained with later merge
   752 Decision from previous merge are properly chained with later merge
   845   | |
   847   | |
   846   o |  a-2: e -move-> f
   848   o |  a-2: e -move-> f
   847   | |
   849   | |
   848   o |  a-1: d -move-> e
   850   o |  a-1: d -move-> e
   849   |/
   851   |/
   850   o  i-2: c -move-> d
   852   o  i-2: c -move-> d, s -move-> t
   851   |
   853   |
   852   o  i-1: a -move-> c
   854   o  i-1: a -move-> c, p -move-> s
   853   |
   855   |
   854   o  i-0 initial commit: a b h
   856   o  i-0 initial commit: a b h
   855   
   857   
   856 
   858 
   857 Subcase: chaining salvage information during a merge
   859 Subcase: chaining salvage information during a merge
   928   |/ /
   930   |/ /
   929   o |  c-1 delete d
   931   o |  c-1 delete d
   930   | |
   932   | |
   931   | o  b-1: b update
   933   | o  b-1: b update
   932   |/
   934   |/
   933   o  i-2: c -move-> d
   935   o  i-2: c -move-> d, s -move-> t
   934   |
   936   |
   935   o  i-1: a -move-> c
   937   o  i-1: a -move-> c, p -move-> s
   936   |
   938   |
   937   o  i-0 initial commit: a b h
   939   o  i-0 initial commit: a b h
   938   
   940   
   939 
   941 
   940 
   942 
  1024   | |
  1026   | |
  1025   o |  f-2: rename i -> d
  1027   o |  f-2: rename i -> d
  1026   | |
  1028   | |
  1027   o |  f-1: rename h -> i
  1029   o |  f-1: rename h -> i
  1028   |/
  1030   |/
  1029   o  i-2: c -move-> d
  1031   o  i-2: c -move-> d, s -move-> t
  1030   |
  1032   |
  1031   o  i-1: a -move-> c
  1033   o  i-1: a -move-> c, p -move-> s
  1032   |
  1034   |
  1033   o  i-0 initial commit: a b h
  1035   o  i-0 initial commit: a b h
  1034   
  1036   
  1035 
  1037 
  1036 Subcase: chaining conflicting rename resolution, with extra change during the merge
  1038 Subcase: chaining conflicting rename resolution, with extra change during the merge
  1107   | |
  1109   | |
  1108   o |  a-2: e -move-> f
  1110   o |  a-2: e -move-> f
  1109   | |
  1111   | |
  1110   o |  a-1: d -move-> e
  1112   o |  a-1: d -move-> e
  1111   |/
  1113   |/
  1112   o  i-2: c -move-> d
  1114   o  i-2: c -move-> d, s -move-> t
  1113   |
  1115   |
  1114   o  i-1: a -move-> c
  1116   o  i-1: a -move-> c, p -move-> s
  1115   |
  1117   |
  1116   o  i-0 initial commit: a b h
  1118   o  i-0 initial commit: a b h
  1117   
  1119   
  1118 
  1120 
  1119 Summary of all created cases
  1121 Summary of all created cases
  1135   f-1: rename h -> i
  1137   f-1: rename h -> i
  1136   f-2: rename i -> d
  1138   f-2: rename i -> d
  1137   g-1: update d
  1139   g-1: update d
  1138   h-1: b -(move)-> d
  1140   h-1: b -(move)-> d
  1139   i-0 initial commit: a b h
  1141   i-0 initial commit: a b h
  1140   i-1: a -move-> c
  1142   i-1: a -move-> c, p -move-> s
  1141   i-2: c -move-> d
  1143   i-2: c -move-> d, s -move-> t
  1142   j-1: unrelated changes (based on the "a" series of changes)
  1144   j-1: unrelated changes (based on the "a" series of changes)
  1143   k-1: unrelated changes (based on "e" changes)
  1145   k-1: unrelated changes (based on "e" changes)
  1144   l-1: unrelated changes (based on "c" changes)
  1146   l-1: unrelated changes (based on "c" changes)
  1145   mABm-0 simple merge - A side: multiple renames, B side: unrelated update - the other way
  1147   mABm-0 simple merge - A side: multiple renames, B side: unrelated update - the other way
  1146   mAE,Km: chained merges (conflict -> simple) - same content everywhere
  1148   mAE,Km: chained merges (conflict -> simple) - same content everywhere
  1254   added      : p, ;
  1256   added      : p, ;
  1255   added      : q, ;
  1257   added      : q, ;
  1256   added      : r, ;
  1258   added      : r, ;
  1257   ##### revision "i-1" #####
  1259   ##### revision "i-1" #####
  1258   1 sidedata entries
  1260   1 sidedata entries
  1259    entry-0014 size 24
  1261    entry-0014 size 44
  1260     '\x00\x00\x00\x02\x0c\x00\x00\x00\x01\x00\x00\x00\x00\x06\x00\x00\x00\x02\x00\x00\x00\x00ac'
  1262     '\x00\x00\x00\x04\x0c\x00\x00\x00\x01\x00\x00\x00\x00\x06\x00\x00\x00\x02\x00\x00\x00\x00\x0c\x00\x00\x00\x03\x00\x00\x00\x00\x06\x00\x00\x00\x04\x00\x00\x00\x02acps'
  1261   removed    : a, ;
  1263   removed    : a, ;
  1262   added    p1: c, a;
  1264   added    p1: c, a;
       
  1265   removed    : p, ;
       
  1266   added    p1: s, p;
  1263   ##### revision "i-2" #####
  1267   ##### revision "i-2" #####
  1264   1 sidedata entries
  1268   1 sidedata entries
  1265    entry-0014 size 24
  1269    entry-0014 size 44
  1266     '\x00\x00\x00\x02\x0c\x00\x00\x00\x01\x00\x00\x00\x00\x06\x00\x00\x00\x02\x00\x00\x00\x00cd'
  1270     '\x00\x00\x00\x04\x0c\x00\x00\x00\x01\x00\x00\x00\x00\x06\x00\x00\x00\x02\x00\x00\x00\x00\x0c\x00\x00\x00\x03\x00\x00\x00\x00\x06\x00\x00\x00\x04\x00\x00\x00\x02cdst'
  1267   removed    : c, ;
  1271   removed    : c, ;
  1268   added    p1: d, c;
  1272   added    p1: d, c;
       
  1273   removed    : s, ;
       
  1274   added    p1: t, s;
  1269   ##### revision "a-1" #####
  1275   ##### revision "a-1" #####
  1270   1 sidedata entries
  1276   1 sidedata entries
  1271    entry-0014 size 24
  1277    entry-0014 size 24
  1272     '\x00\x00\x00\x02\x0c\x00\x00\x00\x01\x00\x00\x00\x00\x06\x00\x00\x00\x02\x00\x00\x00\x00de'
  1278     '\x00\x00\x00\x02\x0c\x00\x00\x00\x01\x00\x00\x00\x00\x06\x00\x00\x00\x02\x00\x00\x00\x00de'
  1273   removed    : d, ;
  1279   removed    : d, ;
  1545 The two status call should give the same value for f
  1551 The two status call should give the same value for f
  1546 
  1552 
  1547   $ hg status --copies --rev 'desc("i-0")' --rev 'desc("a-2")'
  1553   $ hg status --copies --rev 'desc("i-0")' --rev 'desc("a-2")'
  1548   A f
  1554   A f
  1549     a
  1555     a
  1550   R a
  1556   A t
       
  1557     p
       
  1558   R a
       
  1559   R p
  1551   $ hg status --copies --rev 'desc("i-0")' --rev 'desc("a-2")' f
  1560   $ hg status --copies --rev 'desc("i-0")' --rev 'desc("a-2")' f
  1552   A f
  1561   A f
  1553     a (no-changeset no-compatibility !)
  1562     a (no-changeset no-compatibility !)
  1554 
  1563 
  1555 merging with unrelated change does not interfere with the renames
  1564 merging with unrelated change does not interfere with the renames
  1567   | |
  1576   | |
  1568   o |  a-2: e -move-> f
  1577   o |  a-2: e -move-> f
  1569   | |
  1578   | |
  1570   o |  a-1: d -move-> e
  1579   o |  a-1: d -move-> e
  1571   |/
  1580   |/
  1572   o  i-2: c -move-> d
  1581   o  i-2: c -move-> d, s -move-> t
  1573   |
  1582   |
  1574   o  i-1: a -move-> c
  1583   o  i-1: a -move-> c, p -move-> s
  1575   |
  1584   |
  1576   o  i-0 initial commit: a b h
  1585   o  i-0 initial commit: a b h
  1577   
  1586   
  1578 
  1587 
  1579   $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mABm")'
  1588   $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mABm")'
  1600   R d
  1609   R d
  1601   $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mABm")'
  1610   $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mABm")'
  1602   M b
  1611   M b
  1603   A f
  1612   A f
  1604     a
  1613     a
  1605   R a
  1614   A t
       
  1615     p
       
  1616   R a
       
  1617   R p
  1606   $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBAm")'
  1618   $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBAm")'
  1607   M b
  1619   M b
  1608   A f
  1620   A f
  1609     a
  1621     a
  1610   R a
  1622   A t
       
  1623     p
       
  1624   R a
       
  1625   R p
  1611 
  1626 
  1612 merging with the side having a delete
  1627 merging with the side having a delete
  1613 -------------------------------------
  1628 -------------------------------------
  1614 
  1629 
  1615 case summary:
  1630 case summary:
  1628   | |/
  1643   | |/
  1629   | o  c-1 delete d
  1644   | o  c-1 delete d
  1630   | |
  1645   | |
  1631   o |  b-1: b update
  1646   o |  b-1: b update
  1632   |/
  1647   |/
  1633   o  i-2: c -move-> d
  1648   o  i-2: c -move-> d, s -move-> t
  1634   |
  1649   |
  1635   o  i-1: a -move-> c
  1650   o  i-1: a -move-> c, p -move-> s
  1636   |
  1651   |
  1637   o  i-0 initial commit: a b h
  1652   o  i-0 initial commit: a b h
  1638   
  1653   
  1639 - comparing from the merge
  1654 - comparing from the merge
  1640 
  1655 
  1652   $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mCBm-0")'
  1667   $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mCBm-0")'
  1653   M b
  1668   M b
  1654   R d
  1669   R d
  1655   $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBCm-0")'
  1670   $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBCm-0")'
  1656   M b
  1671   M b
  1657   R a
  1672   A t
       
  1673     p
       
  1674   R a
       
  1675   R p
  1658   $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mCBm-0")'
  1676   $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mCBm-0")'
  1659   M b
  1677   M b
  1660   R a
  1678   A t
       
  1679     p
       
  1680   R a
       
  1681   R p
  1661 
  1682 
  1662 - comparing with the merge children re-adding the file
  1683 - comparing with the merge children re-adding the file
  1663 
  1684 
  1664   $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mBCm-1")'
  1685   $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mBCm-1")'
  1665   M d
  1686   M d
  1678   M b
  1699   M b
  1679   M d
  1700   M d
  1680   $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBCm-1")'
  1701   $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBCm-1")'
  1681   M b
  1702   M b
  1682   A d
  1703   A d
  1683   R a
  1704   A t
       
  1705     p
       
  1706   R a
       
  1707   R p
  1684   $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mCBm-1")'
  1708   $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mCBm-1")'
  1685   M b
  1709   M b
  1686   A d
  1710   A d
  1687   R a
  1711   A t
       
  1712     p
       
  1713   R a
       
  1714   R p
  1688 
  1715 
  1689 Comparing with a merge re-adding the file afterward
  1716 Comparing with a merge re-adding the file afterward
  1690 ---------------------------------------------------
  1717 ---------------------------------------------------
  1691 
  1718 
  1692 Merge:
  1719 Merge:
  1702   | |
  1729   | |
  1703   | o  d-1 delete d
  1730   | o  d-1 delete d
  1704   | |
  1731   | |
  1705   o |  b-1: b update
  1732   o |  b-1: b update
  1706   |/
  1733   |/
  1707   o  i-2: c -move-> d
  1734   o  i-2: c -move-> d, s -move-> t
  1708   |
  1735   |
  1709   o  i-1: a -move-> c
  1736   o  i-1: a -move-> c, p -move-> s
  1710   |
  1737   |
  1711   o  i-0 initial commit: a b h
  1738   o  i-0 initial commit: a b h
  1712   
  1739   
  1713   $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mBDm-0")'
  1740   $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mBDm-0")'
  1714   M d
  1741   M d
  1758   ~
  1785   ~
  1759 
  1786 
  1760   $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBDm-0")'
  1787   $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBDm-0")'
  1761   M b
  1788   M b
  1762   A d
  1789   A d
  1763   R a
  1790   A t
       
  1791     p
       
  1792   R a
       
  1793   R p
  1764   $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mDBm-0")'
  1794   $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mDBm-0")'
  1765   M b
  1795   M b
  1766   A d
  1796   A d
  1767   R a
  1797   A t
       
  1798     p
       
  1799   R a
       
  1800   R p
  1768 
  1801 
  1769 
  1802 
  1770 Comparing with a merge with colliding rename
  1803 Comparing with a merge with colliding rename
  1771 --------------------------------------------
  1804 --------------------------------------------
  1772 
  1805 
  1787   | |
  1820   | |
  1788   o |  a-2: e -move-> f
  1821   o |  a-2: e -move-> f
  1789   | |
  1822   | |
  1790   o |  a-1: d -move-> e
  1823   o |  a-1: d -move-> e
  1791   |/
  1824   |/
  1792   o  i-2: c -move-> d
  1825   o  i-2: c -move-> d, s -move-> t
  1793   |
  1826   |
  1794   o  i-1: a -move-> c
  1827   o  i-1: a -move-> c, p -move-> s
  1795   |
  1828   |
  1796   o  i-0 initial commit: a b h
  1829   o  i-0 initial commit: a b h
  1797   
  1830   
  1798 #if no-changeset
  1831 #if no-changeset
  1799   $ hg manifest --debug --rev 'desc("mAEm-0")' | grep '644   f'
  1832   $ hg manifest --debug --rev 'desc("mAEm-0")' | grep '644   f'
  1879   R b
  1912   R b
  1880   R d
  1913   R d
  1881   $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mAEm-0")'
  1914   $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mAEm-0")'
  1882   A f
  1915   A f
  1883     a
  1916     a
       
  1917   A t
       
  1918     p
  1884   R a
  1919   R a
  1885   R b
  1920   R b
       
  1921   R p
  1886   $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mEAm-0")'
  1922   $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mEAm-0")'
  1887   A f
  1923   A f
  1888     a (filelog !)
  1924     a (filelog !)
  1889     b (no-filelog !)
  1925     b (no-filelog !)
       
  1926   A t
       
  1927     p
  1890   R a
  1928   R a
  1891   R b
  1929   R b
       
  1930   R p
  1892 
  1931 
  1893 
  1932 
  1894 Subcase: existing copy information overwritten on one branch
  1933 Subcase: existing copy information overwritten on one branch
  1895 ````````````````````````````````````````````````````````````
  1934 ````````````````````````````````````````````````````````````
  1896 
  1935 
  1912   | |
  1951   | |
  1913   | o  f-1: rename h -> i
  1952   | o  f-1: rename h -> i
  1914   | |
  1953   | |
  1915   o |  b-1: b update
  1954   o |  b-1: b update
  1916   |/
  1955   |/
  1917   o  i-2: c -move-> d
  1956   o  i-2: c -move-> d, s -move-> t
  1918   |
  1957   |
  1919   o  i-1: a -move-> c
  1958   o  i-1: a -move-> c, p -move-> s
  1920   |
  1959   |
  1921   o  i-0 initial commit: a b h
  1960   o  i-0 initial commit: a b h
  1922   
  1961   
  1923   $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBFm-0")'
  1962   $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBFm-0")'
  1924   M b
  1963   M b
  1925   A d
  1964   A d
  1926     h
  1965     h
       
  1966   A t
       
  1967     p
  1927   R a
  1968   R a
  1928   R h
  1969   R h
       
  1970   R p
  1929   $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mFBm-0")'
  1971   $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mFBm-0")'
  1930   M b
  1972   M b
  1931   A d
  1973   A d
  1932     h
  1974     h
       
  1975   A t
       
  1976     p
  1933   R a
  1977   R a
  1934   R h
  1978   R h
       
  1979   R p
  1935   $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mBFm-0")'
  1980   $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mBFm-0")'
  1936   M d (no-changeset !)
  1981   M d (no-changeset !)
  1937     h (no-filelog no-changeset !)
  1982     h (no-filelog no-changeset !)
  1938   R h
  1983   R h
  1939   $ hg status --copies --rev 'desc("f-2")' --rev 'desc("mBFm-0")'
  1984   $ hg status --copies --rev 'desc("f-2")' --rev 'desc("mBFm-0")'
  1964   o  i-0 initial commit: a b h
  2009   o  i-0 initial commit: a b h
  1965   
  2010   
  1966 #else
  2011 #else
  1967 BROKEN: `hg log --follow <file>` relies on filelog metadata to work
  2012 BROKEN: `hg log --follow <file>` relies on filelog metadata to work
  1968   $ hg log -Gfr 'desc("mBFm-0")' d
  2013   $ hg log -Gfr 'desc("mBFm-0")' d
  1969   o  i-2: c -move-> d
  2014   o  i-2: c -move-> d, s -move-> t
  1970   |
  2015   |
  1971   ~
  2016   ~
  1972 #endif
  2017 #endif
  1973 
  2018 
  1974 #if no-changeset
  2019 #if no-changeset
  1980   o  i-0 initial commit: a b h
  2025   o  i-0 initial commit: a b h
  1981   
  2026   
  1982 #else
  2027 #else
  1983 BROKEN: `hg log --follow <file>` relies on filelog metadata to work
  2028 BROKEN: `hg log --follow <file>` relies on filelog metadata to work
  1984   $ hg log -Gfr 'desc("mFBm-0")' d
  2029   $ hg log -Gfr 'desc("mFBm-0")' d
  1985   o  i-2: c -move-> d
  2030   o  i-2: c -move-> d, s -move-> t
  1986   |
  2031   |
  1987   ~
  2032   ~
  1988 #endif
  2033 #endif
  1989 
  2034 
  1990 Subcase: reset of the copy history on one side
  2035 Subcase: reset of the copy history on one side
  2006   | |
  2051   | |
  2007   o |  d-2 re-add d
  2052   o |  d-2 re-add d
  2008   | |
  2053   | |
  2009   o |  d-1 delete d
  2054   o |  d-1 delete d
  2010   |/
  2055   |/
  2011   o  i-2: c -move-> d
  2056   o  i-2: c -move-> d, s -move-> t
  2012   |
  2057   |
  2013   o  i-1: a -move-> c
  2058   o  i-1: a -move-> c, p -move-> s
  2014   |
  2059   |
  2015   o  i-0 initial commit: a b h
  2060   o  i-0 initial commit: a b h
  2016   
  2061   
  2017 One side of the merge have a long history with rename. The other side of the
  2062 One side of the merge have a long history with rename. The other side of the
  2018 merge point to a new file with a smaller history. Each side is "valid".
  2063 merge point to a new file with a smaller history. Each side is "valid".
  2021 revision numbers)
  2066 revision numbers)
  2022 
  2067 
  2023   $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mDGm-0")'
  2068   $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mDGm-0")'
  2024   A d
  2069   A d
  2025     a (filelog !)
  2070     a (filelog !)
  2026   R a
  2071   A t
       
  2072     p
       
  2073   R a
       
  2074   R p
  2027   $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mGDm-0")'
  2075   $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mGDm-0")'
  2028   A d
  2076   A d
  2029     a
  2077     a
  2030   R a
  2078   A t
       
  2079     p
       
  2080   R a
       
  2081   R p
  2031   $ hg status --copies --rev 'desc("d-2")' --rev 'desc("mDGm-0")'
  2082   $ hg status --copies --rev 'desc("d-2")' --rev 'desc("mDGm-0")'
  2032   M d
  2083   M d
  2033   $ hg status --copies --rev 'desc("d-2")' --rev 'desc("mGDm-0")'
  2084   $ hg status --copies --rev 'desc("d-2")' --rev 'desc("mGDm-0")'
  2034   M d
  2085   M d
  2035   $ hg status --copies --rev 'desc("g-1")' --rev 'desc("mDGm-0")'
  2086   $ hg status --copies --rev 'desc("g-1")' --rev 'desc("mDGm-0")'
  2043   |\
  2094   |\
  2044   | o  g-1: update d
  2095   | o  g-1: update d
  2045   | |
  2096   | |
  2046   o |  d-2 re-add d
  2097   o |  d-2 re-add d
  2047   |/
  2098   |/
  2048   o  i-2: c -move-> d
  2099   o  i-2: c -move-> d, s -move-> t
  2049   |
  2100   |
  2050   o  i-1: a -move-> c
  2101   o  i-1: a -move-> c, p -move-> s
  2051   |
  2102   |
  2052   o  i-0 initial commit: a b h
  2103   o  i-0 initial commit: a b h
  2053   
  2104   
  2054 #else
  2105 #else
  2055 BROKEN: `hg log --follow <file>` relies on filelog metadata to work
  2106 BROKEN: `hg log --follow <file>` relies on filelog metadata to work
  2058   |\
  2109   |\
  2059   | o  g-1: update d
  2110   | o  g-1: update d
  2060   | |
  2111   | |
  2061   o |  d-2 re-add d
  2112   o |  d-2 re-add d
  2062   |/
  2113   |/
  2063   o  i-2: c -move-> d
  2114   o  i-2: c -move-> d, s -move-> t
  2064   |
  2115   |
  2065   ~
  2116   ~
  2066 #endif
  2117 #endif
  2067 
  2118 
  2068 
  2119 
  2072   |\
  2123   |\
  2073   | o  g-1: update d
  2124   | o  g-1: update d
  2074   | |
  2125   | |
  2075   o |  d-2 re-add d
  2126   o |  d-2 re-add d
  2076   |/
  2127   |/
  2077   o  i-2: c -move-> d
  2128   o  i-2: c -move-> d, s -move-> t
  2078   |
  2129   |
  2079   o  i-1: a -move-> c
  2130   o  i-1: a -move-> c, p -move-> s
  2080   |
  2131   |
  2081   o  i-0 initial commit: a b h
  2132   o  i-0 initial commit: a b h
  2082   
  2133   
  2083 #else
  2134 #else
  2084 BROKEN: `hg log --follow <file>` relies on filelog metadata to work
  2135 BROKEN: `hg log --follow <file>` relies on filelog metadata to work
  2087   |\
  2138   |\
  2088   | o  g-1: update d
  2139   | o  g-1: update d
  2089   | |
  2140   | |
  2090   o |  d-2 re-add d
  2141   o |  d-2 re-add d
  2091   |/
  2142   |/
  2092   o  i-2: c -move-> d
  2143   o  i-2: c -move-> d, s -move-> t
  2093   |
  2144   |
  2094   ~
  2145   ~
  2095 #endif
  2146 #endif
  2096 
  2147 
  2097 Subcase: merging a change to a file with a "copy overwrite" to that file from another branch
  2148 Subcase: merging a change to a file with a "copy overwrite" to that file from another branch
  2114   | |
  2165   | |
  2115   o |  f-2: rename i -> d
  2166   o |  f-2: rename i -> d
  2116   | |
  2167   | |
  2117   o |  f-1: rename h -> i
  2168   o |  f-1: rename h -> i
  2118   |/
  2169   |/
  2119   o  i-2: c -move-> d
  2170   o  i-2: c -move-> d, s -move-> t
  2120   |
  2171   |
  2121   o  i-1: a -move-> c
  2172   o  i-1: a -move-> c, p -move-> s
  2122   |
  2173   |
  2123   o  i-0 initial commit: a b h
  2174   o  i-0 initial commit: a b h
  2124   
  2175   
  2125 
  2176 
  2126 Note:
  2177 Note:
  2151 
  2202 
  2152   $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mFGm-0")'
  2203   $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mFGm-0")'
  2153   A d
  2204   A d
  2154     h (no-filelog !)
  2205     h (no-filelog !)
  2155     a (filelog !)
  2206     a (filelog !)
       
  2207   A t
       
  2208     p
  2156   R a
  2209   R a
  2157   R h
  2210   R h
       
  2211   R p
  2158   $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mGFm-0")'
  2212   $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mGFm-0")'
  2159   A d
  2213   A d
  2160     a (no-changeset !)
  2214     a (no-changeset !)
  2161     h (changeset !)
  2215     h (changeset !)
       
  2216   A t
       
  2217     p
  2162   R a
  2218   R a
  2163   R h
  2219   R h
       
  2220   R p
  2164   $ hg status --copies --rev 'desc("f-2")' --rev 'desc("mFGm-0")'
  2221   $ hg status --copies --rev 'desc("f-2")' --rev 'desc("mFGm-0")'
  2165   M d
  2222   M d
  2166   $ hg status --copies --rev 'desc("f-2")' --rev 'desc("mGFm-0")'
  2223   $ hg status --copies --rev 'desc("f-2")' --rev 'desc("mGFm-0")'
  2167   M d
  2224   M d
  2168   $ hg status --copies --rev 'desc("f-1")' --rev 'desc("mFGm-0")'
  2225   $ hg status --copies --rev 'desc("f-1")' --rev 'desc("mFGm-0")'
  2190   | |
  2247   | |
  2191   o |  f-2: rename i -> d
  2248   o |  f-2: rename i -> d
  2192   | |
  2249   | |
  2193   o |  f-1: rename h -> i
  2250   o |  f-1: rename h -> i
  2194   |/
  2251   |/
  2195   o  i-2: c -move-> d
  2252   o  i-2: c -move-> d, s -move-> t
  2196   |
  2253   |
  2197   o  i-1: a -move-> c
  2254   o  i-1: a -move-> c, p -move-> s
  2198   |
  2255   |
  2199   o  i-0 initial commit: a b h
  2256   o  i-0 initial commit: a b h
  2200   
  2257   
  2201 #else
  2258 #else
  2202 BROKEN: `hg log --follow <file>` relies on filelog metadata to work
  2259 BROKEN: `hg log --follow <file>` relies on filelog metadata to work
  2203   $ hg log -Gfr 'desc("mFGm-0")' d
  2260   $ hg log -Gfr 'desc("mFGm-0")' d
  2204   o  g-1: update d
  2261   o  g-1: update d
  2205   |
  2262   |
  2206   o  i-2: c -move-> d
  2263   o  i-2: c -move-> d, s -move-> t
  2207   |
  2264   |
  2208   ~
  2265   ~
  2209 #endif
  2266 #endif
  2210 
  2267 
  2211 #if no-changeset
  2268 #if no-changeset
  2216   | |
  2273   | |
  2217   o |  f-2: rename i -> d
  2274   o |  f-2: rename i -> d
  2218   | |
  2275   | |
  2219   o |  f-1: rename h -> i
  2276   o |  f-1: rename h -> i
  2220   |/
  2277   |/
  2221   o  i-2: c -move-> d
  2278   o  i-2: c -move-> d, s -move-> t
  2222   |
  2279   |
  2223   o  i-1: a -move-> c
  2280   o  i-1: a -move-> c, p -move-> s
  2224   |
  2281   |
  2225   o  i-0 initial commit: a b h
  2282   o  i-0 initial commit: a b h
  2226   
  2283   
  2227 #else
  2284 #else
  2228 BROKEN: `hg log --follow <file>` relies on filelog metadata to work
  2285 BROKEN: `hg log --follow <file>` relies on filelog metadata to work
  2229   $ hg log -Gfr 'desc("mGFm-0")' d
  2286   $ hg log -Gfr 'desc("mGFm-0")' d
  2230   o  g-1: update d
  2287   o  g-1: update d
  2231   |
  2288   |
  2232   o  i-2: c -move-> d
  2289   o  i-2: c -move-> d, s -move-> t
  2233   |
  2290   |
  2234   ~
  2291   ~
  2235 #endif
  2292 #endif
  2236 
  2293 
  2237 
  2294 
  2253   | |/
  2310   | |/
  2254   | o  g-1: update d
  2311   | o  g-1: update d
  2255   | |
  2312   | |
  2256   o |  c-1 delete d
  2313   o |  c-1 delete d
  2257   |/
  2314   |/
  2258   o  i-2: c -move-> d
  2315   o  i-2: c -move-> d, s -move-> t
  2259   |
  2316   |
  2260   o  i-1: a -move-> c
  2317   o  i-1: a -move-> c, p -move-> s
  2261   |
  2318   |
  2262   o  i-0 initial commit: a b h
  2319   o  i-0 initial commit: a b h
  2263   
  2320   
  2264 
  2321 
  2265 'a' is the copy source of 'd'
  2322 'a' is the copy source of 'd'
  2266 
  2323 
  2267   $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mCGm-0")'
  2324   $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mCGm-0")'
  2268   A d
  2325   A d
  2269     a (no-compatibility no-changeset !)
  2326     a (no-compatibility no-changeset !)
  2270   R a
  2327   A t
       
  2328     p
       
  2329   R a
       
  2330   R p
  2271   $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mGCm-0")'
  2331   $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mGCm-0")'
  2272   A d
  2332   A d
  2273     a (no-compatibility no-changeset !)
  2333     a (no-compatibility no-changeset !)
  2274   R a
  2334   A t
       
  2335     p
       
  2336   R a
       
  2337   R p
  2275   $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mCGm-0")'
  2338   $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mCGm-0")'
  2276   A d
  2339   A d
  2277   $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mGCm-0")'
  2340   $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mGCm-0")'
  2278   A d
  2341   A d
  2279   $ hg status --copies --rev 'desc("g-1")' --rev 'desc("mCGm-0")'
  2342   $ hg status --copies --rev 'desc("g-1")' --rev 'desc("mCGm-0")'
  2298   | |/
  2361   | |/
  2299   | o  c-1 delete d
  2362   | o  c-1 delete d
  2300   | |
  2363   | |
  2301   o |  b-1: b update
  2364   o |  b-1: b update
  2302   |/
  2365   |/
  2303   o  i-2: c -move-> d
  2366   o  i-2: c -move-> d, s -move-> t
  2304   |
  2367   |
  2305   o  i-1: a -move-> c
  2368   o  i-1: a -move-> c, p -move-> s
  2306   |
  2369   |
  2307   o  i-0 initial commit: a b h
  2370   o  i-0 initial commit: a b h
  2308   
  2371   
  2309 
  2372 
  2310 'a' is the the copy source of 'd'
  2373 'a' is the the copy source of 'd'
  2311 
  2374 
  2312   $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mCB-revert-m-0")'
  2375   $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mCB-revert-m-0")'
  2313   M b
  2376   M b
  2314   A d
  2377   A d
  2315     a (no-compatibility no-changeset !)
  2378     a (no-compatibility no-changeset !)
  2316   R a
  2379   A t
       
  2380     p
       
  2381   R a
       
  2382   R p
  2317   $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBC-revert-m-0")'
  2383   $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBC-revert-m-0")'
  2318   M b
  2384   M b
  2319   A d
  2385   A d
  2320     a (no-compatibility no-changeset !)
  2386     a (no-compatibility no-changeset !)
  2321   R a
  2387   A t
       
  2388     p
       
  2389   R a
       
  2390   R p
  2322   $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mCB-revert-m-0")'
  2391   $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mCB-revert-m-0")'
  2323   M b
  2392   M b
  2324   A d
  2393   A d
  2325   $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mBC-revert-m-0")'
  2394   $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mBC-revert-m-0")'
  2326   M b
  2395   M b
  2344   | |/
  2413   | |/
  2345   | o  h-1: b -(move)-> d
  2414   | o  h-1: b -(move)-> d
  2346   | |
  2415   | |
  2347   o |  c-1 delete d
  2416   o |  c-1 delete d
  2348   | |
  2417   | |
  2349   o |  i-2: c -move-> d
  2418   o |  i-2: c -move-> d, s -move-> t
  2350   | |
  2419   | |
  2351   o |  i-1: a -move-> c
  2420   o |  i-1: a -move-> c, p -move-> s
  2352   |/
  2421   |/
  2353   o  i-0 initial commit: a b h
  2422   o  i-0 initial commit: a b h
  2354   
  2423   
  2355 
  2424 
  2356   $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mCH-delete-before-conflict-m")'
  2425   $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mCH-delete-before-conflict-m")'
  2357   A d
  2426   A d
  2358     b (no-compatibility no-changeset !)
  2427     b (no-compatibility no-changeset !)
       
  2428   A t
       
  2429     p
  2359   R a
  2430   R a
  2360   R b
  2431   R b
       
  2432   R p
  2361   $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mHC-delete-before-conflict-m")'
  2433   $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mHC-delete-before-conflict-m")'
  2362   A d
  2434   A d
  2363     b
  2435     b
       
  2436   A t
       
  2437     p
  2364   R a
  2438   R a
  2365   R b
  2439   R b
       
  2440   R p
  2366   $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mCH-delete-before-conflict-m")'
  2441   $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mCH-delete-before-conflict-m")'
  2367   A d
  2442   A d
  2368     b
  2443     b
  2369   R b
  2444   R b
  2370   $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mHC-delete-before-conflict-m")'
  2445   $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mHC-delete-before-conflict-m")'
  2371   A d
  2446   A d
  2372     b
  2447     b
  2373   R b
  2448   R b
  2374   $ hg status --copies --rev 'desc("h-1")' --rev 'desc("mCH-delete-before-conflict-m")'
  2449   $ hg status --copies --rev 'desc("h-1")' --rev 'desc("mCH-delete-before-conflict-m")'
  2375   R a
  2450   A t
       
  2451     p
       
  2452   R a
       
  2453   R p
  2376   $ hg status --copies --rev 'desc("h-1")' --rev 'desc("mHC-delete-before-conflict-m")'
  2454   $ hg status --copies --rev 'desc("h-1")' --rev 'desc("mHC-delete-before-conflict-m")'
  2377   R a
  2455   A t
       
  2456     p
       
  2457   R a
       
  2458   R p
  2378 
  2459 
  2379 Variant of previous with extra changes introduced by the merge
  2460 Variant of previous with extra changes introduced by the merge
  2380 --------------------------------------------------------------
  2461 --------------------------------------------------------------
  2381 
  2462 
  2382 (see case declaration for details)
  2463 (see case declaration for details)
  2399   | |
  2480   | |
  2400   o |  a-2: e -move-> f
  2481   o |  a-2: e -move-> f
  2401   | |
  2482   | |
  2402   o |  a-1: d -move-> e
  2483   o |  a-1: d -move-> e
  2403   |/
  2484   |/
  2404   o  i-2: c -move-> d
  2485   o  i-2: c -move-> d, s -move-> t
  2405   |
  2486   |
  2406   o  i-1: a -move-> c
  2487   o  i-1: a -move-> c, p -move-> s
  2407   |
  2488   |
  2408   o  i-0 initial commit: a b h
  2489   o  i-0 initial commit: a b h
  2409   
  2490   
  2410 #if no-changeset
  2491 #if no-changeset
  2411   $ hg manifest --debug --rev 'desc("mAE-change-m-0")' | grep '644   f'
  2492   $ hg manifest --debug --rev 'desc("mAE-change-m-0")' | grep '644   f'
  2491   R b
  2572   R b
  2492   R d
  2573   R d
  2493   $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mAE-change-m-0")'
  2574   $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mAE-change-m-0")'
  2494   A f
  2575   A f
  2495     a
  2576     a
       
  2577   A t
       
  2578     p
  2496   R a
  2579   R a
  2497   R b
  2580   R b
       
  2581   R p
  2498   $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mEA-change-m-0")'
  2582   $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mEA-change-m-0")'
  2499   A f
  2583   A f
  2500     a (filelog !)
  2584     a (filelog !)
  2501     b (no-filelog !)
  2585     b (no-filelog !)
       
  2586   A t
       
  2587     p
  2502   R a
  2588   R a
  2503   R b
  2589   R b
       
  2590   R p
  2504 
  2591 
  2505 
  2592 
  2506 Decision from previous merge are properly chained with later merge
  2593 Decision from previous merge are properly chained with later merge
  2507 ------------------------------------------------------------------
  2594 ------------------------------------------------------------------
  2508 
  2595 
  2573   M b
  2660   M b
  2574   A d
  2661   A d
  2575     a (filelog !)
  2662     a (filelog !)
  2576     a (sidedata !)
  2663     a (sidedata !)
  2577     a (upgraded !)
  2664     a (upgraded !)
  2578   R a
  2665   A t
       
  2666     p
       
  2667   R a
       
  2668   R p
  2579   $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBC-revert-m-0")'
  2669   $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBC-revert-m-0")'
  2580   M b
  2670   M b
  2581   A d
  2671   A d
  2582     a (filelog !)
  2672     a (filelog !)
  2583     a (sidedata !)
  2673     a (sidedata !)
  2584     a (upgraded !)
  2674     a (upgraded !)
  2585   R a
  2675   A t
       
  2676     p
       
  2677   R a
       
  2678   R p
  2586 
  2679 
  2587 chained output
  2680 chained output
  2588 
  2681 
  2589   $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBC+revert,Lm")'
  2682   $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBC+revert,Lm")'
  2590   M b
  2683   M b
  2591   A d
  2684   A d
  2592     a (filelog !)
  2685     a (filelog !)
  2593     a (missing-correct-output sidedata !)
  2686     a (missing-correct-output sidedata !)
  2594     a (missing-correct-output upgraded !)
  2687     a (missing-correct-output upgraded !)
       
  2688   A t
       
  2689     p
  2595   A unrelated-l
  2690   A unrelated-l
  2596   R a
  2691   R a
       
  2692   R p
  2597   $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mCB+revert,Lm")'
  2693   $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mCB+revert,Lm")'
  2598   M b
  2694   M b
  2599   A d
  2695   A d
  2600     a (filelog !)
  2696     a (filelog !)
  2601     a (missing-correct-output sidedata !)
  2697     a (missing-correct-output sidedata !)
  2602     a (missing-correct-output upgraded !)
  2698     a (missing-correct-output upgraded !)
       
  2699   A t
       
  2700     p
  2603   A unrelated-l
  2701   A unrelated-l
  2604   R a
  2702   R a
       
  2703   R p
  2605   $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mL,BC+revertm")'
  2704   $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mL,BC+revertm")'
  2606   M b
  2705   M b
  2607   A d
  2706   A d
  2608     a (filelog !)
  2707     a (filelog !)
  2609     a (missing-correct-output sidedata !)
  2708     a (missing-correct-output sidedata !)
  2610     a (missing-correct-output upgraded !)
  2709     a (missing-correct-output upgraded !)
       
  2710   A t
       
  2711     p
  2611   A unrelated-l
  2712   A unrelated-l
  2612   R a
  2713   R a
       
  2714   R p
  2613   $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mL,CB+revertm")'
  2715   $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mL,CB+revertm")'
  2614   M b
  2716   M b
  2615   A d
  2717   A d
  2616     a (filelog !)
  2718     a (filelog !)
  2617     a (missing-correct-output sidedata !)
  2719     a (missing-correct-output sidedata !)
  2618     a (missing-correct-output upgraded !)
  2720     a (missing-correct-output upgraded !)
       
  2721   A t
       
  2722     p
  2619   A unrelated-l
  2723   A unrelated-l
  2620   R a
  2724   R a
       
  2725   R p
  2621 
  2726 
  2622 Subcase: chaining "merged" information during a merge
  2727 Subcase: chaining "merged" information during a merge
  2623 ``````````````````````````````````````````````````````
  2728 ``````````````````````````````````````````````````````
  2624 
  2729 
  2625 When a non-rename change are merged with a copy overwrite, the merge pick the copy source from (p1) as the reference. We should preserve this information in subsequent merges.
  2730 When a non-rename change are merged with a copy overwrite, the merge pick the copy source from (p1) as the reference. We should preserve this information in subsequent merges.