HADOOP-7471. The saveVersion.sh script sometimes fails to extract SVN URL. Contributed by Alejandro Abdelnur

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1147967 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Eli Collins 2011-07-18 16:54:57 +00:00
parent 0a84abfed0
commit 845889384b
2 changed files with 4 additions and 1 deletions

View File

@ -399,6 +399,9 @@ Trunk (unreleased changes)
plain text (Luke Lu)
-r 1079164: No need to escape plain text (Luke Lu)
HADOOP-7471. The saveVersion.sh script sometimes fails to extract SVN URL.
(Alejandro Abdelnur via eli)
Release 0.22.0 - Unreleased
INCOMPATIBLE CHANGES

View File

@ -33,7 +33,7 @@ if git rev-parse HEAD 2>/dev/null > /dev/null ; then
url="git://${hostname}${cwd}"
elif [ -d .svn ]; then
revision=`svn info | sed -n -e 's/Last Changed Rev: \(.*\)/\1/p'`
url=`svn info | sed -n -e 's/URL: \(.*\)/\1/p'`
url=`svn info | sed -n -e 's/^URL: \(.*\)/\1/p'`
# Get canonical branch (branches/X, tags/X, or trunk)
branch=`echo $url | sed -n -e 's,.*\(branches/.*\)$,\1,p' \
-e 's,.*\(tags/.*\)$,\1,p' \