{"thread":{"id":"26055","subject":"[PATCH 03/14] lib-git-svn.sh: Avoid setting web server variables unnecessarily","startedAt":"2010-12-14T18:22:29Z","lastAt":"2010-12-14T18:22:29Z","messageCount":1,"participants":["Ramsay Jones"],"isPatch":true,"patchVersion":1,"patchTotal":14},"messages":[{"id":"158067","messageId":"4D07B5E5.9060403@ramsay1.demon.co.uk","threadId":"26055","inReplyTo":null,"subject":"[PATCH 03/14] lib-git-svn.sh: Avoid setting web server variables unnecessarily","fromName":"Ramsay Jones","fromEmail":"ramsay@ramsay1.demon.co.uk","sentAt":"2010-12-14T18:22:29Z","receivedAt":"2010-12-14T18:22:29Z","isPatch":true,"sender":{"key":"ramsay@ramsayjones.plus.com","avatar":"https://avatars.githubusercontent.com/u/33702710?v=4"},"body":"\nIf the SVN_HTTPD_PORT variable is not set, then we will not even\nattempt to start a web server in the start_httpd function (despite\nit's name), so there is no need to determine values for the\nSVN_HTTPD_PATH and SVN_HTTPD_MODULE_PATH variables.\n\nSigned-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>\n---\n t/lib-git-svn.sh |   47 +++++++++++++++++++++++++----------------------\n 1 files changed, 25 insertions(+), 22 deletions(-)\n\ndiff --git a/t/lib-git-svn.sh b/t/lib-git-svn.sh\nindex 92d6d31..919d45a 100644\n--- a/t/lib-git-svn.sh\n+++ b/t/lib-git-svn.sh\n@@ -68,28 +68,31 @@ svn_cmd () {\n \tsvn \"$orig_svncmd\" --config-dir \"$svnconf\" \"$@\"\n }\n \n-for d in \\\n-\t\"$SVN_HTTPD_PATH\" \\\n-\t/usr/sbin/apache2 \\\n-\t/usr/sbin/httpd \\\n-; do\n-\tif test -f \"$d\"\n-\tthen\n-\t\tSVN_HTTPD_PATH=\"$d\"\n-\t\tbreak\n-\tfi\n-done\n-for d in \\\n-\t\"$SVN_HTTPD_MODULE_PATH\" \\\n-\t/usr/lib/apache2/modules \\\n-\t/usr/libexec/apache2 \\\n-; do\n-\tif test -d \"$d\"\n-\tthen\n-\t\tSVN_HTTPD_MODULE_PATH=\"$d\"\n-\t\tbreak\n-\tfi\n-done\n+if test -n \"$SVN_HTTPD_PORT\"\n+then\n+\tfor d in \\\n+\t\t\"$SVN_HTTPD_PATH\" \\\n+\t\t/usr/sbin/apache2 \\\n+\t\t/usr/sbin/httpd \\\n+\t; do\n+\t\tif test -f \"$d\"\n+\t\tthen\n+\t\t\tSVN_HTTPD_PATH=\"$d\"\n+\t\t\tbreak\n+\t\tfi\n+\tdone\n+\tfor d in \\\n+\t\t\"$SVN_HTTPD_MODULE_PATH\" \\\n+\t\t/usr/lib/apache2/modules \\\n+\t\t/usr/libexec/apache2 \\\n+\t; do\n+\t\tif test -d \"$d\"\n+\t\tthen\n+\t\t\tSVN_HTTPD_MODULE_PATH=\"$d\"\n+\t\t\tbreak\n+\t\tfi\n+\tdone\n+fi\n \n start_httpd () {\n \trepo_base_path=\"$1\"\n-- \n1.7.3\n"}]}