tests/test-import
changeset 2831 0b9ac7dfcf56
parent 2773 871ca5b9d348
child 3988 9dcf9d45cab8
equal deleted inserted replaced
2830:49988d9f0758 2831:0b9ac7dfcf56
    70 grep -v '^email ' msg.patch | hg --cwd b import -
    70 grep -v '^email ' msg.patch | hg --cwd b import -
    71 rm -rf b
    71 rm -rf b
    72 
    72 
    73 echo % plain diff in email, no subject, no message body, should fail
    73 echo % plain diff in email, no subject, no message body, should fail
    74 hg clone -r0 a b
    74 hg clone -r0 a b
    75 grep -v '^\(Subject\|email\)' msg.patch | hg --cwd b import -
    75 egrep -v '^(Subject|email)' msg.patch | hg --cwd b import -
    76 rm -rf b
    76 rm -rf b
    77 
    77 
    78 echo % hg export in email, should use patch header
    78 echo % hg export in email, should use patch header
    79 hg clone -r0 a b
    79 hg clone -r0 a b
    80 hg --cwd a export tip > tip.patch
    80 hg --cwd a export tip > tip.patch
    87 echo line 2 >> a/d1/d2/a
    87 echo line 2 >> a/d1/d2/a
    88 hg --cwd a ci -u someoneelse -d '1 0' -m'subdir change'
    88 hg --cwd a ci -u someoneelse -d '1 0' -m'subdir change'
    89 echo % hg import in a subdirectory
    89 echo % hg import in a subdirectory
    90 hg clone -r0 a b
    90 hg clone -r0 a b
    91 hg --cwd a export tip | sed -e 's/d1\/d2\///' > tip.patch
    91 hg --cwd a export tip | sed -e 's/d1\/d2\///' > tip.patch
    92 pushd b/d1/d2 2>&1 > /dev/null
    92 dir=`pwd`
       
    93 cd b/d1/d2 2>&1 > /dev/null
    93 hg import  ../../../tip.patch
    94 hg import  ../../../tip.patch
    94 popd  2>&1 > /dev/null
    95 cd $dir
    95 echo "% message should be 'subdir change'"
    96 echo "% message should be 'subdir change'"
    96 hg --cwd b tip | grep 'subdir change'
    97 hg --cwd b tip | grep 'subdir change'
    97 echo "% committer should be 'someoneelse'"
    98 echo "% committer should be 'someoneelse'"
    98 hg --cwd b tip | grep someoneelse
    99 hg --cwd b tip | grep someoneelse
    99 echo "% should be empty"
   100 echo "% should be empty"