[PATCH 2/3] t9020-*.sh: Fix urls passed to git-remote in test setup
- From
Ramsay Jones <ramsay@ramsay1.demon.co.uk>
- Date
- Aug 25, 2012, 17:18 UTC
- Message-ID
- <503908F2.8010303@ramsay1.demon.co.uk>
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.dumpOnce 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.
Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk> ---
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(-)
diff --git a/t/t9020-remote-svn.sh b/t/t9020-remote-svn.sh index 9ae9997..cd7604e 100755 --- a/t/t9020-remote-svn.sh +++ b/t/t9020-remote-svn.sh @@ -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"
-- 1.7.12