tests/test-convert-svn-branches
author Matt Mackall <mpm@selenic.com>
Mon, 16 Nov 2009 14:50:24 -0600
changeset 9870 f6a2dbbb0776
parent 9587 d80a251baf9a
child 10119 bb5ea66789e3
permissions -rwxr-xr-x
Added tag 1.4 for changeset 31ec469f9b55

#!/bin/sh

"$TESTDIR/hghave" svn svn-bindings || exit 80

fix_path()
{
    tr '\\' /
}

echo "[extensions]" >> $HGRCPATH
echo "convert = " >> $HGRCPATH
echo "hgext.graphlog =" >> $HGRCPATH

svnadmin create svn-repo
cat "$TESTDIR/svn/branches.svndump" | svnadmin load svn-repo > /dev/null

echo % convert trunk and branches
cat >branchmap <<EOF
old3 newbranch
EOF
hg convert --branchmap=branchmap --datesort -r 10 svn-repo A-hg

echo % convert again
hg convert --branchmap=branchmap --datesort svn-repo A-hg

cd A-hg
hg glog --template 'branch={branches} {rev} {desc|firstline} files: {files}\n'
hg branches | sed 's/:.*/:/'
hg tags -q
cd ..

echo '% test hg failing to call itself'
HG=foobar hg convert svn-repo B-hg 2>&1 | grep -v foobar