tests/test-convert-hg-svn
changeset 5809 34c4131abdf9
parent 5554 2147a734dcf9
child 10051 a02d43acbc04
--- 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