Browse Source

lib-git-svn.sh: Avoid setting web server variables unnecessarily

If the SVN_HTTPD_PORT variable is not set, then we will not even
attempt to start a web server in the start_httpd function (despite
it's name), so there is no need to determine values for the
SVN_HTTPD_PATH and SVN_HTTPD_MODULE_PATH variables.

Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
maint
Ramsay Jones 15 years ago committed by Junio C Hamano
parent
commit
b6fe97483f
  1. 47
      t/lib-git-svn.sh

47
t/lib-git-svn.sh

@ -68,28 +68,31 @@ svn_cmd () {
svn "$orig_svncmd" --config-dir "$svnconf" "$@" svn "$orig_svncmd" --config-dir "$svnconf" "$@"
} }


for d in \ if test -n "$SVN_HTTPD_PORT"
"$SVN_HTTPD_PATH" \ then
/usr/sbin/apache2 \ for d in \
/usr/sbin/httpd \ "$SVN_HTTPD_PATH" \
; do /usr/sbin/apache2 \
if test -f "$d" /usr/sbin/httpd \
then ; do
SVN_HTTPD_PATH="$d" if test -f "$d"
break then
fi SVN_HTTPD_PATH="$d"
done break
for d in \ fi
"$SVN_HTTPD_MODULE_PATH" \ done
/usr/lib/apache2/modules \ for d in \
/usr/libexec/apache2 \ "$SVN_HTTPD_MODULE_PATH" \
; do /usr/lib/apache2/modules \
if test -d "$d" /usr/libexec/apache2 \
then ; do
SVN_HTTPD_MODULE_PATH="$d" if test -d "$d"
break then
fi SVN_HTTPD_MODULE_PATH="$d"
done break
fi
done
fi


start_httpd () { start_httpd () {
repo_base_path="$1" repo_base_path="$1"

Loading…
Cancel
Save