summaryrefslogtreecommitdiff
path: root/tests/test-convert-svn-move.t
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test-convert-svn-move.t')
-rw-r--r--tests/test-convert-svn-move.t27
1 files changed, 16 insertions, 11 deletions
diff --git a/tests/test-convert-svn-move.t b/tests/test-convert-svn-move.t
index b8f0dde..174578d 100644
--- a/tests/test-convert-svn-move.t
+++ b/tests/test-convert-svn-move.t
@@ -1,6 +1,10 @@
$ "$TESTDIR/hghave" svn svn-bindings || exit 80
+ $ fixpath()
+ > {
+ > tr '\\' /
+ > }
$ cat >> $HGRCPATH <<EOF
> [extensions]
> convert =
@@ -9,16 +13,20 @@
$ svnadmin create svn-repo
$ svnadmin load -q svn-repo < "$TESTDIR/svn/move.svndump"
- $ SVNREPOPATH=`pwd`/svn-repo
-#if windows
- $ SVNREPOURL=file:///`python -c "import urllib, sys; sys.stdout.write(urllib.quote(sys.argv[1]))" "$SVNREPOPATH"`
-#else
- $ SVNREPOURL=file://`python -c "import urllib, sys; sys.stdout.write(urllib.quote(sys.argv[1]))" "$SVNREPOPATH"`
-#endif
+ $ svnpath=`pwd | fixpath`
+
+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"
Convert trunk and branches
- $ hg convert --datesort "$SVNREPOURL"/subproject A-hg
+ $ hg convert --datesort "$svnurl"/subproject A-hg
initializing destination A-hg repository
scanning source...
sorting...
@@ -159,13 +167,12 @@ Test convert progress bar'
> [progress]
> assume-tty = 1
> delay = 0
- > changedelay = 0
> format = topic bar number
> refresh = 0
> width = 60
> EOF
- $ hg convert svn-repo hg-progress 2>&1 | "$TESTDIR/filtercr.py"
+ $ hg convert svn-repo hg-progress 2>&1 | $TESTDIR/filtercr.py
scanning [ <=> ] 1
scanning [ <=> ] 2
@@ -239,5 +246,3 @@ Test convert progress bar'
1 branch
0 clobberdir
-
- $ cd ..