summaryrefslogtreecommitdiff
path: root/t/t9120-git-svn-clone-with-percent-escapes.sh
AgeCommit message (Collapse)Author
2010-09-09tests: subshell indentation stylefixJonathan Nieder
Format the subshells introduced by the previous patch (Several tests: cd inside subshell instead of around, 2010-09-06) like so: ( cd subdir && ... ) && This is generally easier to read and has the nice side-effect that this patch will show what commands are used in the subshell, making it easier to check for lost environment variables and similar behavior changes. Cc: Jens Lehmann <Jens.Lehmann@web.de> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-09-06Several tests: cd inside subshell instead of aroundJens Lehmann
Fixed all places where it was a straightforward change from cd'ing into a directory and back via "cd .." to a cd inside a subshell. Found these places with "git grep -w "cd \.\.". Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-08-19svn: assume URLs from the command-line are URI-encodedEric Wong
And then unescape them when writing to $GIT_CONFIG. SVN has different rules for repository URLs (usually the root) and for paths within that repository (below the HTTP layer). Thus, for the request URI path at the HTTP level, the URI needs to be encoded. However, in the body of the HTTP request (the with underlying SVN XML protocol), those paths should not be URI-encoded[1]. For non-HTTP(S) requests, SVN appears to be more flexible and will except weird characters in the URL as well as URI-encoded ones. Since users are used to using URLs being entirely URI-encoded, git svn will now attempt to unescape the path portion of URLs while leaving the actual repository URL untouched. This change will be reflected in newly-created $GIT_CONFIG files only. This allows users to switch between svn(+ssh)://, file:// and http(s):// urls without changing the fetch/branches/tags config keys. This won't affect existing imports at all (since things didn't work before this commit anyways), and will allow users to force escaping into repository paths that look like they're escaped (but are not). Thanks to Mike Smullin for the original bug report and Björn Steinbrink for summarizing it into testable cases for me. [1] Except when committing copies/renames, see commit 29633bb91c7bcff31ff3bb59378709e3e3ef627d Signed-off-by: Eric Wong <normalperson@yhbt.net>
2009-05-29t9120: don't expect failure with SVN_HTTPD_PORT unsetStephen Boyd
The test still passes when SVN_HTTPD_PORT is not set. Futhermore, t9115 and t9118 don't check if SVN_HTTPD_PORT is set even though they both use start_httpd() from lib-git-svn.sh. Admittedly, the test is not very meaningful without SVN_HTTPD_PORT, as commit f5530b (support for funky branch and project names over HTTP(S) 2007-11-11) states that the URI escaping is only done over HTTP(S). Signed-off-by: Stephen Boyd <bebarino@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-21git-svn testsuite: use standard configuration for Subversion toolsEygene Ryabinkin
I have tweaked configuration in my ~/.subversion directory, namely I am running auto-properties and automatically adding '$Id$' expansion to every file. This choke the last test named 'proplist' from t9101-git-svn-props.sh, because one more property, svn:keywords is automatically added. I had just wrapped svn invocation with the svn_cmd that specifies empty directory via --config-dir argument. Since the latter is the global option, it should be recognized by all svn subcommands, so no regressions will be introduced. Now svn_cmd is used everywhere, not just in the failed test module: this should guard us from the future clashes with user-defined configuration tweaks. Signed-off-by: Eygene Ryabinkin <rea-git@codelabs.ru> Acked-by: Eric Wong <normalperson@yhbt.net>
2008-09-08t/t91XX git-svn tests: run "git svn" not "git-svn"Nanako Shiraishi
This replaces 'git-svn' with 'git svn' in the tests. Signed-off-by: Nanako Shiraishi <nanako3@lavabit.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-09-08t/t91XX-svn: start removing use of "git-" from these testsNanako Shiraishi
Subversion tests use too many "git-foo" form, so I am converting them in two steps. This first step replaces literal strings "remotes/git-svn" and "git-svn-id" by introducing $remotes_git_svn and $git_svn_id constants defined as shell variables. This will reduce the number of false hits from "git grep". Signed-off-by: Nanako Shiraishi <nanako3@lavabit.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-05Fix tests breaking when checkout path contains shell metacharactersBryan Donlan
This fixes the remainder of the issues where the test script itself is at fault for failing when the git checkout path contains whitespace or other shell metacharacters. The majority of git svn tests used the idiom test_expect_success "title" "test script using $svnrepo" These were changed to have the test script in single-quotes: test_expect_success "title" 'test script using "$svnrepo"' which unfortunately makes the patch appear larger than it really is. One consequence of this change is that in the verbose test output the value of $svnrepo (and in some cases other variables, too) is no longer expanded, i.e. previously we saw * expecting success: test script using /path/to/git/t/trash/svnrepo but now it is: * expecting success: test script using "$svnrepo" Signed-off-by: Bryan Donlan <bdonlan@fushizen.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-03-21Don't try and percent-escape existing percent escapes in git-svn URIsKevin Ballard
git-svn project names are percent-escaped ever since f5530b8 (git-svn: support for funky branch and project names over HTTP(S), 2007-11-11). Unfortunately this breaks the scenario where the user hands git-svn an already-escaped URI. Fix the regexp to skip over what looks like existing percent escapes, and test this scenario. Signed-off-by: Kevin Ballard <kevin@sb.org> Acked-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>