tests/test-rebase-mq
changeset 6931 02f4a0bcfdce
parent 6906 808f03f61ebe
child 7955 c3d4ff03ec72
equal deleted inserted replaced
6930:a58a611c320f 6931:02f4a0bcfdce
     2 
     2 
     3 echo "[extensions]" >> $HGRCPATH
     3 echo "[extensions]" >> $HGRCPATH
     4 echo "graphlog=" >> $HGRCPATH
     4 echo "graphlog=" >> $HGRCPATH
     5 echo "rebase=" >> $HGRCPATH
     5 echo "rebase=" >> $HGRCPATH
     6 echo "mq=" >> $HGRCPATH
     6 echo "mq=" >> $HGRCPATH
       
     7 
       
     8 filterpatch()
       
     9 {
       
    10     sed -e "s/^\(# Date\).*/\1/" \
       
    11         -e "s/^\(# Node ID\).*/\1/" \
       
    12         -e "s/^\(# Parent\).*/\1/" \
       
    13         -e "s/^\(diff -r \)\([a-f0-9]* \)\(-r \)\([a-f0-9]* \)/\1x \3y /" \
       
    14         -e "s/\(--- [a-zA-Z0-9_/.-]*\).*/\1/" \
       
    15         -e "s/\(+++ [a-zA-Z0-9_/.-]*\).*/\1/"
       
    16 }
     7 
    17 
     8 hg init a
    18 hg init a
     9 cd a
    19 cd a
    10 hg qinit -c # This must work even with a managed mq queue
    20 hg qinit -c # This must work even with a managed mq queue
    11 
    21 
    52 echo '% Update to qbase'
    62 echo '% Update to qbase'
    53 hg up qbase
    63 hg up qbase
    54 echo '% f correctly reflects the merge result'
    64 echo '% f correctly reflects the merge result'
    55 cat f
    65 cat f
    56 echo '% And the patch is correct'
    66 echo '% And the patch is correct'
    57 cat .hg/patches/f.patch | sed -e "s/^\(# \(Date\|Node ID\|Parent\)\).*/\1/" \
    67 cat .hg/patches/f.patch | filterpatch
    58         -e  "s/^\(diff -r \)\([a-f0-9]* \)\(-r \)\([a-f0-9]* \)/\1x \3y /" \
       
    59         -e  "s/\(\(---\|+++\) [a-zA-Z0-9_/.-]*\).*/\1/"
       
    60 
    68 
    61 echo
    69 echo
    62 echo '% Update to qtip'
    70 echo '% Update to qtip'
    63 hg up qtip
    71 hg up qtip
    64 echo '% f correctly reflects the merge result'
    72 echo '% f correctly reflects the merge result'
    65 cat f
    73 cat f
    66 echo '% And the patch is correct'
    74 echo '% And the patch is correct'
    67 cat .hg/patches/f2.patch | sed -e "s/^\(# \(Date\|Node ID\|Parent\)\).*/\1/" \
    75 cat .hg/patches/f2.patch | filterpatch
    68         -e  "s/^\(diff -r \)\([a-f0-9]* \)\(-r \)\([a-f0-9]* \)/\1x \3y /" \
    76 
    69         -e  "s/\(\(---\|+++\) [a-zA-Z0-9_/.-]*\).*/\1/"