[PATCH 2/3] t9020-*.sh: Fix urls passed to git-remote in test setup

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

Signed-off-by: Ramsay Jones <ramsay@xxxxxxxxxxxxxxxxxxx>
---

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

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]