/[gentoo-x86]/eclass/subversion.eclass
Gentoo

Diff of /eclass/subversion.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.40 Revision 1.41
1# Copyright 1999-2007 Gentoo Foundation 1# Copyright 1999-2007 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/eclass/subversion.eclass,v 1.40 2007/04/01 12:21:09 hattya Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/subversion.eclass,v 1.41 2007/04/01 14:48:37 hattya Exp $
4 4
5## --------------------------------------------------------------------------- # 5## --------------------------------------------------------------------------- #
6# Author: Akinori Hattori <hattya@gentoo.org> 6# Author: Akinori Hattori <hattya@gentoo.org>
7# 7#
8# The subversion eclass is written to fetch the software sources from 8# The subversion eclass is written to fetch the software sources from
295 fi 295 fi
296 296
297 local k 297 local k
298 298
299 for k in url revision; do 299 for k in url revision; do
300 export ESVN_WC_$(echo "${k}" | tr "[a-z]" "[A-Z]")="$(subversion__svn_info "${wc_path}" "${k}")" 300 export ESVN_WC_$(subversion__to_upper_case "${k}")="$(subversion__svn_info "${wc_path}" "${k}")"
301 done 301 done
302 302
303} 303}
304 304
305 305
388 debug-print "${FUNCNAME}: repo_uri does not have a peg revision." 388 debug-print "${FUNCNAME}: repo_uri does not have a peg revision."
389 return 1 389 return 1
390 fi 390 fi
391 391
392 local peg_rev="${repo_uri##*@}" 392 local peg_rev="${repo_uri##*@}"
393 local rev=$(subversion__svn_info "${repo_uri}" "revision") 393
394 case "$(subversion__to_upper_case "${peg_rev}")" in
395 [[:digit:]]*)
396 # NUMBER
397 ;;
398 HEAD|BASE|COMMITED|PREV)
399 ;;
400 {[^}]*})
401 # DATE
402 ;;
403 *)
404 debug-print "${FUNCNAME}: repo_uri does not have a peg revision."
405 return 1
406 ;;
407 esac
394 408
395 debug-print "${FUNCNAME}: peg_rev = ${peg_rev}" 409 debug-print "${FUNCNAME}: peg_rev = ${peg_rev}"
396 debug-print "${FUNCNAME}: rev = ${rev} "
397 410
398 if [[ "${peg_rev}" -eq "${rev}" ]]; then
399 return 0 411 return 0
400 fi
401 412
402 return 1
403
404} 413}
414
415
416## -- subversion__to_upper_case() ----------------------------------------- #
417#
418# @param $@ - the strings to upper case.
419#
420function subversion__to_upper_case() {
421 echo "${@}" | tr "[a-z]" "[A-Z]"
422}

Legend:
Removed from v.1.40  
changed lines
  Added in v.1.41

  ViewVC Help
Powered by ViewVC 1.1.20