summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAkinori Hattori <hattya@gentoo.org>2007-04-01 14:57:14 +0000
committerAkinori Hattori <hattya@gentoo.org>2007-04-01 14:57:14 +0000
commitbaba8d4281277a7f5d33a97e5a125f350ea95c45 (patch)
tree6590b34dae1ee77520efbe1ce13da1551de25706
parentupdate Manifest. (diff)
downloadhattya-baba8d4281277a7f5d33a97e5a125f350ea95c45.tar.gz
hattya-baba8d4281277a7f5d33a97e5a125f350ea95c45.tar.bz2
hattya-baba8d4281277a7f5d33a97e5a125f350ea95c45.zip
update subversion.eclass.
svn path=/; revision=10
-rw-r--r--eclass/subversion.eclass35
1 files changed, 27 insertions, 8 deletions
diff --git a/eclass/subversion.eclass b/eclass/subversion.eclass
index cbab76b..313c9d1 100644
--- a/eclass/subversion.eclass
+++ b/eclass/subversion.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2006 Gentoo Foundation
+# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
@@ -121,6 +121,7 @@ ESVN_UPDATE_CMD="svn update"
## -- subversion_fetch() ----------------------------------------------------- #
#
# @param $1 - a repository URI. default is the ESVN_REPO_URI.
+# @param $2 - a check out path in S.
#
function subversion_fetch() {
@@ -296,7 +297,7 @@ function subversion_wc_info() {
local k
for k in url revision; do
- export ESVN_WC_$(echo "${k}" | tr "[a-z]" "[A-Z]")="$(subversion__svn_info "${wc_path}" "${k}")"
+ export ESVN_WC_$(subversion__to_upper_case "${k}")="$(subversion__svn_info "${wc_path}" "${k}")"
done
}
@@ -389,17 +390,35 @@ function subversion__has_peg_revision() {
fi
local peg_rev="${repo_uri##*@}"
- local rev=$(subversion__svn_info "${repo_uri}" "revision")
+
+ case "$(subversion__to_upper_case "${peg_rev}")" in
+ [[:digit:]]*)
+ # NUMBER
+ ;;
+ HEAD|BASE|COMMITED|PREV)
+ ;;
+ {[^}]*})
+ # DATE
+ ;;
+ *)
+ debug-print "${FUNCNAME}: repo_uri does not have a peg revision."
+ return 1
+ ;;
+ esac
debug-print "${FUNCNAME}: peg_rev = ${peg_rev}"
- debug-print "${FUNCNAME}: rev = ${rev} "
- if [[ "${peg_rev}" -eq "${rev}" ]]; then
- return 0
- fi
+ return 0
+
+}
- return 1
+## -- subversion__to_upper_case() ----------------------------------------- #
+#
+# @param $@ - the strings to upper case.
+#
+function subversion__to_upper_case() {
+ echo "${@}" | tr "[a-z]" "[A-Z]"
}