tests/test-rebase-obsolete.t
changeset 33703 644dddccc265
parent 33695 03039ff3082b
child 33704 855a1856466d
equal deleted inserted replaced
33702:9f862fe7a8bd 33703:644dddccc265
    11   > evolution=createmarkers,allowunstable
    11   > evolution=createmarkers,allowunstable
    12   > [phases]
    12   > [phases]
    13   > publish=False
    13   > publish=False
    14   > [extensions]
    14   > [extensions]
    15   > rebase=
    15   > rebase=
       
    16   > drawdag=$TESTDIR/drawdag.py
    16   > EOF
    17   > EOF
    17 
    18 
    18 Setup rebase canonical repo
    19 Setup rebase canonical repo
    19 
    20 
    20   $ hg init base
    21   $ hg init base
   894   rebasing 20:b82fb57ea638 "willconflict second version"
   895   rebasing 20:b82fb57ea638 "willconflict second version"
   895   note: not rebasing 21:8b31da3c4919 "dummy change", already in destination as 19:601db7a18f51 "dummy change successor"
   896   note: not rebasing 21:8b31da3c4919 "dummy change", already in destination as 19:601db7a18f51 "dummy change successor"
   896   rebasing 22:7bdc8a87673d "dummy change" (tip)
   897   rebasing 22:7bdc8a87673d "dummy change" (tip)
   897   $ cd ..
   898   $ cd ..
   898 
   899 
   899 rebase source is obsoleted (issue5198)
   900 Rebase merge where successor of one parent is equal to destination (issue5198)
   900 ---------------------------------
   901 
   901 
   902   $ hg init p1-succ-is-dest
   902   $ hg clone base amended
   903   $ cd p1-succ-is-dest
   903   updating to branch default
   904 
   904   3 files updated, 0 files merged, 0 files removed, 0 files unresolved
   905   $ hg debugdrawdag <<EOF
   905   $ cd amended
   906   >   F
   906   $ hg up 9520eea781bc
   907   >  /|
   907   1 files updated, 0 files merged, 2 files removed, 0 files unresolved
   908   > E D B # replace: D -> B
   908   $ echo 1 >> E
   909   >  \|/
   909   $ hg commit --amend -m "E'" -d "0 0"
   910   >   A
   910   $ hg log -G
   911   > EOF
   911   @  9:69abe8906104 E'
   912 
   912   |
   913   $ hg rebase -d B -s D
   913   | o  7:02de42196ebe H
   914   note: not rebasing 2:b18e25de2cf5 "D" (D), already in destination as 1:112478962961 "B"
   914   | |
   915   rebasing 4:66f1a38021c9 "F" (F tip)
   915   | | o  6:eea13746799a G
   916   $ hg log -G
       
   917   o    5:50e9d60b99c6 F
       
   918   |\
       
   919   | | x  4:66f1a38021c9 F
   916   | |/|
   920   | |/|
   917   | o |  5:24b6387c8c8c F
   921   | o |  3:7fb047a69f22 E
       
   922   | | |
       
   923   | | x  2:b18e25de2cf5 D
       
   924   | |/
       
   925   o |  1:112478962961 B
       
   926   |/
       
   927   o  0:426bada5c675 A
       
   928   
       
   929   $ cd ..
       
   930 
       
   931 Rebase merge where successor of other parent is equal to destination
       
   932 
       
   933   $ hg init p2-succ-is-dest
       
   934   $ cd p2-succ-is-dest
       
   935 
       
   936   $ hg debugdrawdag <<EOF
       
   937   >   F
       
   938   >  /|
       
   939   > E D B # replace: E -> B
       
   940   >  \|/
       
   941   >   A
       
   942   > EOF
       
   943 
       
   944 BROKEN: Raises an exception
       
   945   $ hg rebase -d B -s E 2>&1 | grep AssertionError:
       
   946   AssertionError: no base found to rebase on (defineparents called wrong)
       
   947   $ hg log -G
       
   948   o    4:66f1a38021c9 F
       
   949   |\
       
   950   | x  3:7fb047a69f22 E
       
   951   | |
       
   952   o |  2:b18e25de2cf5 D
       
   953   |/
       
   954   | o  1:112478962961 B
       
   955   |/
       
   956   o  0:426bada5c675 A
       
   957   
       
   958   $ cd ..
       
   959 
       
   960 Rebase merge where successor of one parent is ancestor of destination
       
   961 
       
   962   $ hg init p1-succ-in-dest
       
   963   $ cd p1-succ-in-dest
       
   964 
       
   965   $ hg debugdrawdag <<EOF
       
   966   >   F C
       
   967   >  /| |
       
   968   > E D B # replace: D -> B
       
   969   >  \|/
       
   970   >   A
       
   971   > EOF
       
   972 
       
   973   $ hg rebase -d C -s D
       
   974   note: not rebasing 2:b18e25de2cf5 "D" (D), already in destination as 1:112478962961 "B"
       
   975   rebasing 5:66f1a38021c9 "F" (F tip)
       
   976 BROKEN: not rebased on top of requested destination (C)
       
   977   $ hg log -G
       
   978   o    6:50e9d60b99c6 F
       
   979   |\
       
   980   | | x  5:66f1a38021c9 F
       
   981   | |/|
       
   982   +-----o  4:26805aba1e60 C
       
   983   | | |
       
   984   | o |  3:7fb047a69f22 E
       
   985   | | |
       
   986   | | x  2:b18e25de2cf5 D
       
   987   | |/
       
   988   o |  1:112478962961 B
       
   989   |/
       
   990   o  0:426bada5c675 A
       
   991   
       
   992   $ cd ..
       
   993 
       
   994 Rebase merge where successor of other parent is ancestor of destination
       
   995 
       
   996   $ hg init p2-succ-in-dest
       
   997   $ cd p2-succ-in-dest
       
   998 
       
   999   $ hg debugdrawdag <<EOF
       
  1000   >   F C
       
  1001   >  /| |
       
  1002   > E D B # replace: E -> B
       
  1003   >  \|/
       
  1004   >   A
       
  1005   > EOF
       
  1006 
       
  1007 BROKEN: Raises an exception
       
  1008   $ hg rebase -d C -s E 2>&1 | grep AssertionError:
       
  1009   AssertionError: no base found to rebase on (defineparents called wrong)
       
  1010   $ hg log -G
       
  1011   o    5:66f1a38021c9 F
       
  1012   |\
       
  1013   | | o  4:26805aba1e60 C
       
  1014   | | |
       
  1015   | x |  3:7fb047a69f22 E
       
  1016   | | |
       
  1017   o | |  2:b18e25de2cf5 D
   918   |/ /
  1018   |/ /
   919   | x  4:9520eea781bc E
  1019   | o  1:112478962961 B
   920   |/
  1020   |/
   921   | o  3:32af7686d403 D
  1021   o  0:426bada5c675 A
   922   | |
  1022   
   923   | o  2:5fddd98957c8 C
  1023   $ cd ..
   924   | |
  1024 
   925   | o  1:42ccdea3bb16 B
  1025 Rebase merge where successor of one parent is ancestor of destination
   926   |/
  1026 
   927   o  0:cd010b8cd998 A
  1027   $ hg init p1-succ-in-dest-b
   928   
  1028   $ cd p1-succ-in-dest-b
   929   $ hg rebase -d . -s 9520eea781bc
  1029 
   930   note: not rebasing 4:9520eea781bc "E", already in destination as 9:69abe8906104 "E'"
  1030   $ hg debugdrawdag <<EOF
   931   rebasing 6:eea13746799a "G"
  1031   >   F C
   932   $ hg log -G
  1032   >  /| |
   933   o    10:17be06e82e95 G
  1033   > E D B # replace: E -> B
       
  1034   >  \|/
       
  1035   >   A
       
  1036   > EOF
       
  1037 
       
  1038   $ hg rebase -d C -b F
       
  1039   rebasing 2:b18e25de2cf5 "D" (D)
       
  1040   note: not rebasing 3:7fb047a69f22 "E" (E), already in destination as 1:112478962961 "B"
       
  1041   rebasing 5:66f1a38021c9 "F" (F tip)
       
  1042   $ hg log -G
       
  1043   o  7:9ed45af61fa0 F
       
  1044   |
       
  1045   o  6:8f47515dda15 D
       
  1046   |
       
  1047   | x    5:66f1a38021c9 F
       
  1048   | |\
       
  1049   o | |  4:26805aba1e60 C
       
  1050   | | |
       
  1051   | | x  3:7fb047a69f22 E
       
  1052   | | |
       
  1053   | x |  2:b18e25de2cf5 D
       
  1054   | |/
       
  1055   o /  1:112478962961 B
       
  1056   |/
       
  1057   o  0:426bada5c675 A
       
  1058   
       
  1059   $ cd ..
       
  1060 
       
  1061 Rebase merge where successor of other parent is ancestor of destination
       
  1062 
       
  1063   $ hg init p2-succ-in-dest-b
       
  1064   $ cd p2-succ-in-dest-b
       
  1065 
       
  1066   $ hg debugdrawdag <<EOF
       
  1067   >   F C
       
  1068   >  /| |
       
  1069   > E D B # replace: D -> B
       
  1070   >  \|/
       
  1071   >   A
       
  1072   > EOF
       
  1073 
       
  1074   $ hg rebase -d C -b F
       
  1075   note: not rebasing 2:b18e25de2cf5 "D" (D), already in destination as 1:112478962961 "B"
       
  1076   rebasing 3:7fb047a69f22 "E" (E)
       
  1077   rebasing 5:66f1a38021c9 "F" (F tip)
       
  1078 BROKEN: This should have resulted in a rebased F with one parent, just like in
       
  1079 the test case above
       
  1080   $ hg log -G
       
  1081   o    7:c1e6f26e339d F
   934   |\
  1082   |\
   935   | @  9:69abe8906104 E'
  1083   | o  6:533690786a86 E
   936   | |
  1084   |/
   937   +---o  7:02de42196ebe H
  1085   | x    5:66f1a38021c9 F
   938   | |
  1086   | |\
   939   o |  5:24b6387c8c8c F
  1087   o | |  4:26805aba1e60 C
   940   |/
  1088   | | |
   941   | o  3:32af7686d403 D
  1089   | | x  3:7fb047a69f22 E
   942   | |
  1090   | | |
   943   | o  2:5fddd98957c8 C
  1091   | x |  2:b18e25de2cf5 D
   944   | |
  1092   | |/
   945   | o  1:42ccdea3bb16 B
  1093   o /  1:112478962961 B
   946   |/
  1094   |/
   947   o  0:cd010b8cd998 A
  1095   o  0:426bada5c675 A
   948   
  1096   
   949   $ cd ..
  1097   $ cd ..
   950 
  1098 
   951 Test that bookmark is moved and working dir is updated when all changesets have
  1099 Test that bookmark is moved and working dir is updated when all changesets have
   952 equivalents in destination
  1100 equivalents in destination