test-convert-hg-svn: make it more windows friendly
authorPatrick Mezard <pmezard@gmail.com>
Sat, 05 Jan 2008 17:36:16 +0100
changeset 5809 34c4131abdf9
parent 5808 80e40ef3d8b8
child 5810 124577de40a7
test-convert-hg-svn: make it more windows friendly
tests/test-convert-hg-svn
--- a/tests/test-convert-hg-svn	Sat Jan 05 17:36:16 2008 +0100
+++ b/tests/test-convert-hg-svn	Sat Jan 05 17:36:16 2008 +0100
@@ -10,7 +10,7 @@
 echo "[extensions]" >> $HGRCPATH
 echo "convert = " >> $HGRCPATH
 
-svnpath=`pwd`/svn-repo
+svnpath=`pwd | fix_path`/svn-repo
 svnadmin create $svnpath
 
 cat > $svnpath/hooks/pre-revprop-change <<'EOF'
@@ -31,7 +31,14 @@
 EOF
 chmod +x $svnpath/hooks/pre-revprop-change
 
-svnurl=file://$svnpath
+# SVN wants all paths to start with a slash. Unfortunately,
+# Windows ones don't. Handle that.
+svnurl=$svnpath
+expr $svnurl : "\/" > /dev/null
+if [ $? -ne 0 ]; then
+    svnurl='/'$svnurl
+fi
+svnurl=file://$svnurl
 svn co $svnurl $svnpath-wc
 
 cd $svnpath-wc