tests/test-evolve-content-divergent-basic.t
changeset 4493 32446b7a6e7c
parent 4492 91e0d05e06c6
child 4513 d70db7e455dc
child 4578 75e76141cba2
equal deleted inserted replaced
4492:91e0d05e06c6 4493:32446b7a6e7c
   662   +some
   662   +some
   663   +less
   663   +less
   664   +conflict
   664   +conflict
   665   +babar
   665   +babar
   666   $ cd ..
   666   $ cd ..
       
   667 
       
   668 Check case where one side undo some of the common predecessors change
       
   669 ---------------------------------------------------------------------
       
   670 
       
   671 The goal is to make sure we merge using the right base.
       
   672 
       
   673   $ hg init predecessors-as-merge-base
       
   674   $ cd predecessors-as-merge-base
       
   675   $ cat << EOF > numbers
       
   676   > 1
       
   677   > 2
       
   678   > 3
       
   679   > 4
       
   680   > 5
       
   681   > 6
       
   682   > 7
       
   683   > 8
       
   684   > 9
       
   685   > EOF
       
   686   $ cat << EOF > letters
       
   687   > a
       
   688   > b
       
   689   > c
       
   690   > d
       
   691   > e
       
   692   > f
       
   693   > g
       
   694   > h
       
   695   > i
       
   696   > EOF
       
   697   $ cat << EOF > romans
       
   698   > I
       
   699   > II
       
   700   > III
       
   701   > IV
       
   702   > V
       
   703   > VI
       
   704   > VII
       
   705   > VIII
       
   706   > IX
       
   707   > EOF
       
   708   $ hg add numbers letters romans
       
   709   $ hg commit -m root
       
   710   $ cat << EOF > numbers
       
   711   > 1
       
   712   > 2
       
   713   > 3
       
   714   > four
       
   715   > 5
       
   716   > 6
       
   717   > 7
       
   718   > 8
       
   719   > 9
       
   720   > EOF
       
   721   $ cat << EOF > letters
       
   722   > a
       
   723   > b
       
   724   > c
       
   725   > D
       
   726   > e
       
   727   > f
       
   728   > g
       
   729   > h
       
   730   > i
       
   731   > EOF
       
   732   $ hg commit -m E1
       
   733   $ cat << EOF > numbers
       
   734   > 1
       
   735   > 2
       
   736   > 3
       
   737   > 4
       
   738   > 5
       
   739   > 6
       
   740   > seven
       
   741   > 8
       
   742   > 9
       
   743   > EOF
       
   744   $ cat << EOF > romans
       
   745   > I
       
   746   > II
       
   747   > III
       
   748   > IV
       
   749   > V
       
   750   > vi
       
   751   > VII
       
   752   > VIII
       
   753   > IX
       
   754   > EOF
       
   755   $ hg commit --amend -m E2
       
   756   $ hg --hidden update -r 'desc(E1)'
       
   757   2 files updated, 0 files merged, 0 files removed, 0 files unresolved
       
   758   updated to hidden changeset 4a250e5bd992
       
   759   (hidden revision '4a250e5bd992' was rewritten as: 084ae625fa51)
       
   760   working directory parent is obsolete! (4a250e5bd992)
       
   761   (use 'hg evolve' to update to its successor: 084ae625fa51)
       
   762   $ cat << EOF > numbers
       
   763   > one
       
   764   > 2
       
   765   > 3
       
   766   > four
       
   767   > 5
       
   768   > 6
       
   769   > 7
       
   770   > 8
       
   771   > 9
       
   772   > EOF
       
   773   $ cat << EOF > letters
       
   774   > a
       
   775   > b
       
   776   > c
       
   777   > d
       
   778   > e
       
   779   > f
       
   780   > g
       
   781   > h
       
   782   > i
       
   783   > EOF
       
   784   $ cat << EOF > romans
       
   785   > I
       
   786   > ii
       
   787   > III
       
   788   > IV
       
   789   > V
       
   790   > VI
       
   791   > VII
       
   792   > VIII
       
   793   > IX
       
   794   > EOF
       
   795   $ hg commit --amend -m E3
       
   796   2 new content-divergent changesets
       
   797   $ hg log -G --patch --hidden
       
   798   @  3:19ed1bf64a2c@default(draft) E3 [content-divergent]
       
   799   |  diff --git a/numbers b/numbers
       
   800   |  --- a/numbers
       
   801   |  +++ b/numbers
       
   802   |  @@ -1,1 +1,1 @@
       
   803   |  -1
       
   804   |  +one
       
   805   |  @@ -4,1 +4,1 @@
       
   806   |  -4
       
   807   |  +four
       
   808   |  diff --git a/romans b/romans
       
   809   |  --- a/romans
       
   810   |  +++ b/romans
       
   811   |  @@ -2,1 +2,1 @@
       
   812   |  -II
       
   813   |  +ii
       
   814   |
       
   815   | *  2:084ae625fa51@default(draft) E2 [content-divergent]
       
   816   |/   diff --git a/letters b/letters
       
   817   |    --- a/letters
       
   818   |    +++ b/letters
       
   819   |    @@ -4,1 +4,1 @@
       
   820   |    -d
       
   821   |    +D
       
   822   |    diff --git a/numbers b/numbers
       
   823   |    --- a/numbers
       
   824   |    +++ b/numbers
       
   825   |    @@ -7,1 +7,1 @@
       
   826   |    -7
       
   827   |    +seven
       
   828   |    diff --git a/romans b/romans
       
   829   |    --- a/romans
       
   830   |    +++ b/romans
       
   831   |    @@ -6,1 +6,1 @@
       
   832   |    -VI
       
   833   |    +vi
       
   834   |
       
   835   | x  1:4a250e5bd992@default(draft) E1 []
       
   836   |/   diff --git a/letters b/letters
       
   837   |    --- a/letters
       
   838   |    +++ b/letters
       
   839   |    @@ -4,1 +4,1 @@
       
   840   |    -d
       
   841   |    +D
       
   842   |    diff --git a/numbers b/numbers
       
   843   |    --- a/numbers
       
   844   |    +++ b/numbers
       
   845   |    @@ -4,1 +4,1 @@
       
   846   |    -4
       
   847   |    +four
       
   848   |
       
   849   o  0:6d1fdf6de7e2@default(draft) root []
       
   850      diff --git a/letters b/letters
       
   851      new file mode 100644
       
   852      --- /dev/null
       
   853      +++ b/letters
       
   854      @@ -0,0 +1,9 @@
       
   855      +a
       
   856      +b
       
   857      +c
       
   858      +d
       
   859      +e
       
   860      +f
       
   861      +g
       
   862      +h
       
   863      +i
       
   864      diff --git a/numbers b/numbers
       
   865      new file mode 100644
       
   866      --- /dev/null
       
   867      +++ b/numbers
       
   868      @@ -0,0 +1,9 @@
       
   869      +1
       
   870      +2
       
   871      +3
       
   872      +4
       
   873      +5
       
   874      +6
       
   875      +7
       
   876      +8
       
   877      +9
       
   878      diff --git a/romans b/romans
       
   879      new file mode 100644
       
   880      --- /dev/null
       
   881      +++ b/romans
       
   882      @@ -0,0 +1,9 @@
       
   883      +I
       
   884      +II
       
   885      +III
       
   886      +IV
       
   887      +V
       
   888      +VI
       
   889      +VII
       
   890      +VIII
       
   891      +IX
       
   892   
       
   893   $ hg evolve --list
       
   894   084ae625fa51: E2
       
   895     content-divergent: 19ed1bf64a2c (draft) (precursor 4a250e5bd992)
       
   896   
       
   897   19ed1bf64a2c: E3
       
   898     content-divergent: 084ae625fa51 (draft) (precursor 4a250e5bd992)
       
   899   
       
   900   $ hg obslog --all --patch
       
   901   *  084ae625fa51 (2) E2
       
   902   |
       
   903   | @  19ed1bf64a2c (3) E3
       
   904   |/
       
   905   x  4a250e5bd992 (1) E1
       
   906        rewritten(description, content) as 084ae625fa51 using amend by test (Thu Jan 01 00:00:00 1970 +0000)
       
   907          diff -r 4a250e5bd992 -r 084ae625fa51 changeset-description
       
   908          --- a/changeset-description
       
   909          +++ b/changeset-description
       
   910          @@ -1,1 +1,1 @@
       
   911          -E1
       
   912          +E2
       
   913   
       
   914          diff --git a/numbers b/numbers
       
   915          --- a/numbers
       
   916          +++ b/numbers
       
   917          @@ -4,1 +4,1 @@
       
   918          -four
       
   919          +4
       
   920          @@ -7,1 +7,1 @@
       
   921          -7
       
   922          +seven
       
   923          diff --git a/romans b/romans
       
   924          --- a/romans
       
   925          +++ b/romans
       
   926          @@ -6,1 +6,1 @@
       
   927          -VI
       
   928          +vi
       
   929   
       
   930        rewritten(description, content) as 19ed1bf64a2c using amend by test (Thu Jan 01 00:00:00 1970 +0000)
       
   931          diff -r 4a250e5bd992 -r 19ed1bf64a2c changeset-description
       
   932          --- a/changeset-description
       
   933          +++ b/changeset-description
       
   934          @@ -1,1 +1,1 @@
       
   935          -E1
       
   936          +E3
       
   937   
       
   938          diff --git a/letters b/letters
       
   939          --- a/letters
       
   940          +++ b/letters
       
   941          @@ -4,1 +4,1 @@
       
   942          -D
       
   943          +d
       
   944          diff --git a/numbers b/numbers
       
   945          --- a/numbers
       
   946          +++ b/numbers
       
   947          @@ -1,1 +1,1 @@
       
   948          -1
       
   949          +one
       
   950          diff --git a/romans b/romans
       
   951          --- a/romans
       
   952          +++ b/romans
       
   953          @@ -2,1 +2,1 @@
       
   954          -II
       
   955          +ii
       
   956   
       
   957   
       
   958 
       
   959   $ hg evolve --content-divergent --rev 'desc("E3")'
       
   960   merge:[2] E2
       
   961   with: [3] E3
       
   962   base: [1] E1
       
   963   updating to "local" side of the conflict: 084ae625fa51
       
   964   merging "other" content-divergent changeset '19ed1bf64a2c'
       
   965   merging numbers
       
   966   merging romans
       
   967   1 files updated, 2 files merged, 0 files removed, 0 files unresolved
       
   968   working directory is now at aae293050980
       
   969   $ hg status
       
   970   $ hg amend -m 'E4'
       
   971   $ hg export
       
   972   # HG changeset patch
       
   973   # User test
       
   974   # Date 0 0
       
   975   #      Thu Jan 01 00:00:00 1970 +0000
       
   976   # Node ID 8c2a6aae4bc5c1cc00c68276017dcef3d468e895
       
   977   # Parent  6d1fdf6de7e2d9fc9b098aa286b60785bbeaab7a
       
   978   E4
       
   979   
       
   980   diff --git a/numbers b/numbers
       
   981   --- a/numbers
       
   982   +++ b/numbers
       
   983   @@ -1,1 +1,1 @@
       
   984   -1
       
   985   +one
       
   986   @@ -7,1 +7,1 @@
       
   987   -7
       
   988   +seven
       
   989   diff --git a/romans b/romans
       
   990   --- a/romans
       
   991   +++ b/romans
       
   992   @@ -2,1 +2,1 @@
       
   993   -II
       
   994   +ii
       
   995   @@ -6,1 +6,1 @@
       
   996   -VI
       
   997   +vi
       
   998   $ hg log -G
       
   999   @  5:8c2a6aae4bc5@default(draft) E4 []
       
  1000   |
       
  1001   o  0:6d1fdf6de7e2@default(draft) root []
       
  1002   
       
  1003   $ hg obslog --patch
       
  1004   @  8c2a6aae4bc5 (5) E4
       
  1005   |
       
  1006   x    aae293050980 (4) <<<<<<< divergent
       
  1007   |\     rewritten(description) as 8c2a6aae4bc5 using amend by test (Thu Jan 01 00:00:00 1970 +0000)
       
  1008   | |      diff -r aae293050980 -r 8c2a6aae4bc5 changeset-description
       
  1009   | |      --- a/changeset-description
       
  1010   | |      +++ b/changeset-description
       
  1011   | |      @@ -1,4 +1,1 @@
       
  1012   | |      -<<<<<<< divergent
       
  1013   | |      -E2||||||| base
       
  1014   | |      -E1=======
       
  1015   | |      -E3>>>>>>> other
       
  1016   | |      +E4
       
  1017   | |
       
  1018   | |
       
  1019   x |  084ae625fa51 (2) E2
       
  1020   | |    rewritten(description, content) as aae293050980 using evolve by test (Thu Jan 01 00:00:00 1970 +0000)
       
  1021   | |      diff -r 084ae625fa51 -r aae293050980 changeset-description
       
  1022   | |      --- a/changeset-description
       
  1023   | |      +++ b/changeset-description
       
  1024   | |      @@ -1,1 +1,4 @@
       
  1025   | |      -E2
       
  1026   | |      +<<<<<<< divergent
       
  1027   | |      +E2||||||| base
       
  1028   | |      +E1=======
       
  1029   | |      +E3>>>>>>> other
       
  1030   | |
       
  1031   | |      diff --git a/letters b/letters
       
  1032   | |      --- a/letters
       
  1033   | |      +++ b/letters
       
  1034   | |      @@ -4,1 +4,1 @@
       
  1035   | |      -D
       
  1036   | |      +d
       
  1037   | |      diff --git a/numbers b/numbers
       
  1038   | |      --- a/numbers
       
  1039   | |      +++ b/numbers
       
  1040   | |      @@ -1,1 +1,1 @@
       
  1041   | |      -1
       
  1042   | |      +one
       
  1043   | |      diff --git a/romans b/romans
       
  1044   | |      --- a/romans
       
  1045   | |      +++ b/romans
       
  1046   | |      @@ -2,1 +2,1 @@
       
  1047   | |      -II
       
  1048   | |      +ii
       
  1049   | |
       
  1050   | |
       
  1051   | x  19ed1bf64a2c (3) E3
       
  1052   |/     rewritten(description, content) as aae293050980 using evolve by test (Thu Jan 01 00:00:00 1970 +0000)
       
  1053   |        diff -r 19ed1bf64a2c -r aae293050980 changeset-description
       
  1054   |        --- a/changeset-description
       
  1055   |        +++ b/changeset-description
       
  1056   |        @@ -1,1 +1,4 @@
       
  1057   |        -E3
       
  1058   |        +<<<<<<< divergent
       
  1059   |        +E2||||||| base
       
  1060   |        +E1=======
       
  1061   |        +E3>>>>>>> other
       
  1062   |
       
  1063   |        diff --git a/numbers b/numbers
       
  1064   |        --- a/numbers
       
  1065   |        +++ b/numbers
       
  1066   |        @@ -4,1 +4,1 @@
       
  1067   |        -four
       
  1068   |        +4
       
  1069   |        @@ -7,1 +7,1 @@
       
  1070   |        -7
       
  1071   |        +seven
       
  1072   |        diff --git a/romans b/romans
       
  1073   |        --- a/romans
       
  1074   |        +++ b/romans
       
  1075   |        @@ -6,1 +6,1 @@
       
  1076   |        -VI
       
  1077   |        +vi
       
  1078   |
       
  1079   |
       
  1080   x  4a250e5bd992 (1) E1
       
  1081        rewritten(description, content) as 084ae625fa51 using amend by test (Thu Jan 01 00:00:00 1970 +0000)
       
  1082          diff -r 4a250e5bd992 -r 084ae625fa51 changeset-description
       
  1083          --- a/changeset-description
       
  1084          +++ b/changeset-description
       
  1085          @@ -1,1 +1,1 @@
       
  1086          -E1
       
  1087          +E2
       
  1088   
       
  1089          diff --git a/numbers b/numbers
       
  1090          --- a/numbers
       
  1091          +++ b/numbers
       
  1092          @@ -4,1 +4,1 @@
       
  1093          -four
       
  1094          +4
       
  1095          @@ -7,1 +7,1 @@
       
  1096          -7
       
  1097          +seven
       
  1098          diff --git a/romans b/romans
       
  1099          --- a/romans
       
  1100          +++ b/romans
       
  1101          @@ -6,1 +6,1 @@
       
  1102          -VI
       
  1103          +vi
       
  1104   
       
  1105        rewritten(description, content) as 19ed1bf64a2c using amend by test (Thu Jan 01 00:00:00 1970 +0000)
       
  1106          diff -r 4a250e5bd992 -r 19ed1bf64a2c changeset-description
       
  1107          --- a/changeset-description
       
  1108          +++ b/changeset-description
       
  1109          @@ -1,1 +1,1 @@
       
  1110          -E1
       
  1111          +E3
       
  1112   
       
  1113          diff --git a/letters b/letters
       
  1114          --- a/letters
       
  1115          +++ b/letters
       
  1116          @@ -4,1 +4,1 @@
       
  1117          -D
       
  1118          +d
       
  1119          diff --git a/numbers b/numbers
       
  1120          --- a/numbers
       
  1121          +++ b/numbers
       
  1122          @@ -1,1 +1,1 @@
       
  1123          -1
       
  1124          +one
       
  1125          diff --git a/romans b/romans
       
  1126          --- a/romans
       
  1127          +++ b/romans
       
  1128          @@ -2,1 +2,1 @@
       
  1129          -II
       
  1130          +ii
       
  1131   
       
  1132