t9020-*.sh: Fix urls passed to git-remote in test setup
PATCH 2/3 t9020-*.sh: Fix urls passed to git-remote in test setup
In particular, the urls passed to git-remote have an extra '/' given after the schema prefix, like so:
git remote add svnsim testsvn::sim:///$TEST_DIRECTORY/t9154/svn.dump git remote add svnfile testsvn::file:///$TEST_DIRECTORY/t9154/svn.dump
Once the prefix is removed, the remainder of the url looks something like "//home/ramsay/git/t/t9154/svn.dump", which is then interpreted as a network path. Since there is "No such host or network path" called "//home", this leads to the svnrdump_sim.py script to fail:
Traceback (most recent call last):
File ".../trash directory.t9020-remote-svn/svnrdump", line 51, in ?
if writedump(url, r[0], r[1]): ret = 0
File ".../trash directory.t9020-remote-svn/svnrdump", line 23, in writedump
f = open(filename, 'r');IOError: [Errno 13] Permission denied: '//home/ramsay/git/t/t9154/svn.dump'
In order to fix the problem, we simply remove the extraneous '/' character from the urls.
---
Hi Florian,
This test fails on cygwin. Could you please squash this into commit 2d597d73 ("Add a test script for remote-svn", 20-08-2012).
Thanks!
ATB,
Ramsay Jones
t/t9020-remote-svn.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
t/t9020-remote-svn.sh +2 -2
@@ -13,8 +13,8 @@ init_git () { git init && #git remote add svnsim testsvn::sim:///$TEST_DIRECTORY/t9020/example.svnrdump # let's reuse an exisiting dump file!? - git remote add svnsim testsvn::sim:///$TEST_DIRECTORY/t9154/svn.dump - git remote add svnfile testsvn::file:///$TEST_DIRECTORY/t9154/svn.dump + git remote add svnsim testsvn::sim://$TEST_DIRECTORY/t9154/svn.dump + git remote add svnfile testsvn::file://$TEST_DIRECTORY/t9154/svn.dump } if test -e "$GIT_BUILD_DIR/git-remote-testsvn"
Signature · 1 line
1.7.12