diff options
author | Akinori Hattori <hattya@gentoo.org> | 2007-04-01 14:48:37 +0000 |
---|---|---|
committer | Akinori Hattori <hattya@gentoo.org> | 2007-04-01 14:48:37 +0000 |
commit | 573e6d76e2c508a4681a1ff3fdafa74f84afaa0f (patch) | |
tree | 2163f8e94d5ea11f61c8d04e72e43cf01319594b /eclass/subversion.eclass | |
parent | Version bump (diff) | |
download | historical-573e6d76e2c508a4681a1ff3fdafa74f84afaa0f.tar.gz historical-573e6d76e2c508a4681a1ff3fdafa74f84afaa0f.tar.bz2 historical-573e6d76e2c508a4681a1ff3fdafa74f84afaa0f.zip |
fixes bug #153227
Diffstat (limited to 'eclass/subversion.eclass')
-rw-r--r-- | eclass/subversion.eclass | 34 |
1 files changed, 26 insertions, 8 deletions
diff --git a/eclass/subversion.eclass b/eclass/subversion.eclass index afca3fbb6613..0ec15eff0486 100644 --- a/eclass/subversion.eclass +++ b/eclass/subversion.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/subversion.eclass,v 1.40 2007/04/01 12:21:09 hattya Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/subversion.eclass,v 1.41 2007/04/01 14:48:37 hattya Exp $ ## --------------------------------------------------------------------------- # # Author: Akinori Hattori <hattya@gentoo.org> @@ -297,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 } @@ -390,15 +390,33 @@ 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]" } |