diff options
author | Eygene Ryabinkin <rea-git@codelabs.ru> | 2009-05-08 12:06:16 +0400 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2009-05-21 00:31:07 -0700 |
commit | da083d688e41f9a4328fab262f315f9e4fe52a32 (patch) | |
tree | 87b69a088e62bd40755f5f5155ecdab29148f68c /t/lib-git-svn.sh | |
parent | 065b0702f748b50e69d67609ace2632ce04b79a1 (diff) | |
download | git-da083d688e41f9a4328fab262f315f9e4fe52a32.tar.gz |
git-svn testsuite: use standard configuration for Subversion tools
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>
Diffstat (limited to 't/lib-git-svn.sh')
-rw-r--r-- | t/lib-git-svn.sh | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/t/lib-git-svn.sh b/t/lib-git-svn.sh index 773d47cf3c..5654962343 100644 --- a/t/lib-git-svn.sh +++ b/t/lib-git-svn.sh @@ -26,6 +26,8 @@ fi svnrepo=$PWD/svnrepo export svnrepo +svnconf=$PWD/svnconf +export svnconf perl -w -e " use SVN::Core; @@ -54,6 +56,19 @@ poke() { test-chmtime +1 "$1" } +# We need this, because we should pass empty configuration directory to +# the 'svn commit' to avoid automated property changes and other stuff +# that could be set from user's configuration files in ~/.subversion. +svn_cmd () { + [ -d "$svnconf" ] || mkdir "$svnconf" + orig_svncmd="$1"; shift + if [ -z "$orig_svncmd" ]; then + svn + return + fi + svn "$orig_svncmd" --config-dir "$svnconf" "$@" +} + for d in \ "$SVN_HTTPD_PATH" \ /usr/sbin/apache2 \ |