changeset 8765:9c75f16f577c

test-convert-svn-*: no longer need the url building code
author Patrick Mezard <pmezard@gmail.com>
date Tue, 09 Jun 2009 21:50:42 +0200
parents 46b5b4301fcc
children b2059435f176
files tests/test-convert-svn-branches tests/test-convert-svn-startrev tests/test-convert-svn-tags
diffstat 3 files changed, 5 insertions(+), 32 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-convert-svn-branches	Sat Jun 06 00:08:37 2009 +0200
+++ b/tests/test-convert-svn-branches	Tue Jun 09 21:50:42 2009 +0200
@@ -14,23 +14,14 @@
 svnadmin create svn-repo
 cat "$TESTDIR/svn/branches.svndump" | svnadmin load svn-repo > /dev/null
 
-svnpath=`pwd | fix_path`
-# 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
-
 echo % convert trunk and branches
 cat >branchmap <<EOF
 old3 newbranch
 EOF
-hg convert --branchmap=branchmap --datesort -r 10 $svnurl A-hg
+hg convert --branchmap=branchmap --datesort -r 10 svn-repo A-hg
 
 echo % convert again
-hg convert --branchmap=branchmap --datesort $svnurl A-hg
+hg convert --branchmap=branchmap --datesort svn-repo A-hg
 
 cd A-hg
 hg glog --template 'branch={branches} {rev} {desc|firstline} files: {files}\n'
--- a/tests/test-convert-svn-startrev	Sat Jun 06 00:08:37 2009 +0200
+++ b/tests/test-convert-svn-startrev	Tue Jun 09 21:50:42 2009 +0200
@@ -14,15 +14,6 @@
 svnadmin create svn-repo
 cat "$TESTDIR/svn/startrev.svndump" | svnadmin load svn-repo > /dev/null
 
-svnpath=`pwd | fix_path`
-# 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()
 {
     startrev=$1
@@ -31,7 +22,7 @@
         --config convert.svn.trunk=branches/branch1 \
         --config convert.svn.branches="  " \
         --config convert.svn.tags= \
-        --datesort $svnurl $repopath
+        --datesort svn-repo $repopath
     hg -R $repopath glog --template '{rev} {desc|firstline} files: {files}\n'
     echo
 }
--- a/tests/test-convert-svn-tags	Sat Jun 06 00:08:37 2009 +0200
+++ b/tests/test-convert-svn-tags	Tue Jun 09 21:50:42 2009 +0200
@@ -14,17 +14,8 @@
 svnadmin create svn-repo
 cat "$TESTDIR/svn/tags.svndump" | svnadmin load svn-repo > /dev/null
 
-svnpath=`pwd | fix_path`
-# 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
-
 echo % convert
-hg convert --datesort $svnurl A-hg
+hg convert --datesort svn-repo A-hg
 
 cd A-hg
 hg glog --template '{rev} {desc|firstline} tags: {tags}\n'
@@ -32,6 +23,6 @@
 cd ..
 
 echo % convert without tags
-hg convert --datesort --config convert.svn.tags= $svnurl A-notags-hg
+hg convert --datesort --config convert.svn.tags= svn-repo A-notags-hg
 hg -R A-notags-hg tags -q