tests/test-rename-merge2
changeset 4659 7a7d4937272b
parent 4296 c2c8491a30d6
equal deleted inserted replaced
4658:17f5d2069551 4659:7a7d4937272b
    10 f.close()
    10 f.close()
    11 EOF
    11 EOF
    12 HGMERGE="python ../merge"; export HGMERGE
    12 HGMERGE="python ../merge"; export HGMERGE
    13 
    13 
    14 # perform a test merge with possible renaming
    14 # perform a test merge with possible renaming
    15 # 
    15 #
    16 # args:
    16 # args:
    17 # $1 = action in local branch
    17 # $1 = action in local branch
    18 # $2 = action in remote branch
    18 # $2 = action in remote branch
    19 # $3 = action in working dir
    19 # $3 = action in working dir
    20 # $4 = expected result
    20 # $4 = expected result
    55 
    55 
    56     echo "--------------"
    56     echo "--------------"
    57     hg status -camC -X rev
    57     hg status -camC -X rev
    58 
    58 
    59     hg ci -m "merge" -d "0 0"
    59     hg ci -m "merge" -d "0 0"
    60     
    60 
    61     echo "--------------"
    61     echo "--------------"
    62     echo
    62     echo
    63 
    63 
    64     cd ..
    64     cd ..
    65     rm -r t
    65     rm -r t
    66 }
    66 }
    67 
    67 
    68 up() { 
    68 up() {
    69     cp rev $1
    69     cp rev $1
    70     hg add $1 2> /dev/null
    70     hg add $1 2> /dev/null
    71     if [ "$2" != "" ] ; then 
    71     if [ "$2" != "" ] ; then
    72 	cp rev $2
    72 	cp rev $2
    73 	hg add $2 2> /dev/null
    73 	hg add $2 2> /dev/null
    74     fi
    74     fi
    75 }
    75 }
    76 
    76 
    93 tm "nc a b" "up b  " "      " "12 merge b no ancestor"
    93 tm "nc a b" "up b  " "      " "12 merge b no ancestor"
    94 tm "up b  " "nm a b" "      " "13 merge b no ancestor"
    94 tm "up b  " "nm a b" "      " "13 merge b no ancestor"
    95 tm "nc a b" "up a b" "      " "14 merge b no ancestor"
    95 tm "nc a b" "up a b" "      " "14 merge b no ancestor"
    96 tm "up b  " "nm a b" "      " "15 merge b no ancestor, remove a"
    96 tm "up b  " "nm a b" "      " "15 merge b no ancestor, remove a"
    97 tm "nc a b" "up a b" "      " "16 get a, merge b no ancestor"
    97 tm "nc a b" "up a b" "      " "16 get a, merge b no ancestor"
    98 tm "up a b" "nc a b" "      " "17 keep a, merge b no ancestor" 
    98 tm "up a b" "nc a b" "      " "17 keep a, merge b no ancestor"
    99 tm "nm a b" "up a b" "      " "18 merge b no ancestor"
    99 tm "nm a b" "up a b" "      " "18 merge b no ancestor"
   100 tm "up a b" "nm a b" "      " "19 merge b no ancestor, prompt remove a"
   100 tm "up a b" "nm a b" "      " "19 merge b no ancestor, prompt remove a"
   101 tm "up a  " "um a b" "      " "20 merge a and b to b, remove a"
   101 tm "up a  " "um a b" "      " "20 merge a and b to b, remove a"
   102 tm "um a b" "up a  " "      " "21 merge a and b to b"
   102 tm "um a b" "up a  " "      " "21 merge a and b to b"
   103 #tm "nm a b" "um x a" "      " "22 get a, keep b"
   103 #tm "nm a b" "um x a" "      " "22 get a, keep b"