From 845889384b66590f2f319bc0fa7effd630a7a81a Mon Sep 17 00:00:00 2001 From: Eli Collins Date: Mon, 18 Jul 2011 16:54:57 +0000 Subject: [PATCH] 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 --- common/CHANGES.txt | 3 +++ common/src/saveVersion.sh | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/common/CHANGES.txt b/common/CHANGES.txt index b0b9cc4e1c..86b096b94d 100644 --- a/common/CHANGES.txt +++ b/common/CHANGES.txt @@ -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 diff --git a/common/src/saveVersion.sh b/common/src/saveVersion.sh index aef6967e17..93ce7ecdb6 100755 --- a/common/src/saveVersion.sh +++ b/common/src/saveVersion.sh @@ -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' \