##// END OF EJS Templates
convert: svn -- fix 'exists'...
convert: svn -- fix 'exists' Previously 'exists' erroneously returned False for empty dirictories. This is wrong since we want to detect even empty 'branches/' or 'tags/'.

File last commit:

r5382:d7d395fb default
r5461:ab4d2e9f default
Show More
test-convert-svn
60 lines | 1.0 KiB | text/plain | TextLexer
Patrick Mezard
Test svn repository conversion
r5255 #!/bin/sh
"$TESTDIR/hghave" svn svn-bindings || exit 80
fix_path()
{
tr '\\' /
}
echo "[extensions]" >> $HGRCPATH
echo "convert = " >> $HGRCPATH
svnadmin create svn-repo
echo % initial svn import
mkdir t
cd t
echo a > a
cd ..
Thomas Arendsen Hein
Fix \ inside ` problem in test-convert-svn (avoids code duplication, too)
r5275 svnpath=`pwd | fix_path`
Patrick Mezard
Test svn repository conversion
r5255 # SVN wants all paths to start with a slash. Unfortunately,
# Windows ones don't. Handle that.
expr $svnpath : "\/" > /dev/null
if [ $? -ne 0 ]; then
svnpath='/'$svnpath
fi
svnurl=file://$svnpath/svn-repo/trunk
svn import -m init t $svnurl | fix_path
echo % update svn repository
svn co $svnurl t2 | fix_path
cd t2
echo b >> a
echo b > b
svn add b
svn ci -m changea
cd ..
echo % convert to hg once
hg convert $svnurl
echo % update svn repository again
cd t2
echo c >> a
echo c >> b
svn ci -m changeb
cd ..
echo % test incremental conversion
hg convert $svnurl
Alexis S. L. Carvalho
convert_svn: add --filemap support
r5382 echo % test filemap
echo 'include b' > filemap
hg convert --filemap filemap $svnurl fmap
echo '[extensions]' >> $HGRCPATH
echo 'hgext.graphlog =' >> $HGRCPATH
hg glog -R fmap --template '#rev# #desc|firstline# files: #files#\n'