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

Diff of /eclass/subversion.eclass

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

Revision 1.52 Revision 1.53
1# Copyright 1999-2008 Gentoo Foundation 1# Copyright 1999-2008 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.52 2008/02/20 22:35:40 zlin Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/subversion.eclass,v 1.53 2008/02/21 13:38:36 zlin Exp $
4 4
5# @ECLASS: subversion.eclass 5# @ECLASS: subversion.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# Akinori Hattori <hattya@gentoo.org> 7# Akinori Hattori <hattya@gentoo.org>
8# Bo ├śrsted Andresen <zlin@gentoo.org> 8# Bo ├śrsted Andresen <zlin@gentoo.org>
152# 152#
153# Can take two optional parameters: 153# Can take two optional parameters:
154# repo_uri - a repository URI. default is ESVN_REPO_URI. 154# repo_uri - a repository URI. default is ESVN_REPO_URI.
155# destination - a check out path in S. 155# destination - a check out path in S.
156subversion_fetch() { 156subversion_fetch() {
157 local repo_uri="$(subversion__get_repository_uri "${1:-${ESVN_REPO_URI}}")" 157 local repo_uri="$(subversion__get_repository_uri "${1}")"
158 local revision="$(subversion__get_peg_revision "${1:-${ESVN_REPO_URI}}")" 158 local revision="$(subversion__get_peg_revision "${1:-${ESVN_REPO_URI}}")"
159 local S_dest="${2}" 159 local S_dest="${2}"
160 160
161 if [[ -z ${repo_uri} ]]; then 161 if [[ -z ${repo_uri} ]]; then
162 die "${ESVN}: ESVN_REPO_URI (or specified URI) is empty." 162 die "${ESVN}: ESVN_REPO_URI (or specified URI) is empty."
207 debug-print "${FUNCNAME}: wc_path = \"${wc_path}\"" 207 debug-print "${FUNCNAME}: wc_path = \"${wc_path}\""
208 debug-print "${FUNCNAME}: ESVN_OPTIONS = \"${ESVN_OPTIONS}\"" 208 debug-print "${FUNCNAME}: ESVN_OPTIONS = \"${ESVN_OPTIONS}\""
209 debug-print "${FUNCNAME}: options = \"${options}\"" 209 debug-print "${FUNCNAME}: options = \"${options}\""
210 210
211 if [[ ! -d ${wc_path}/.svn ]]; then 211 if [[ ! -d ${wc_path}/.svn ]]; then
212 if [[ -n ${ESVN_OFFLINE} ]]; then
213 ewarn "ESVN_OFFLINE cannot be used when the there is no existing checkout."
214 fi
212 # first check out 215 # first check out
213 einfo "subversion check out start -->" 216 einfo "subversion check out start -->"
214 einfo " repository: ${repo_uri}${revision:+@}${revision}" 217 einfo " repository: ${repo_uri}${revision:+@}${revision}"
215 218
216 debug-print "${FUNCNAME}: ${ESVN_FETCH_CMD} ${options} ${repo_uri}" 219 debug-print "${FUNCNAME}: ${ESVN_FETCH_CMD} ${options} ${repo_uri}"
378 381
379## -- subversion__get_repository_uri() --------------------------------------- # 382## -- subversion__get_repository_uri() --------------------------------------- #
380# 383#
381# param $1 - a repository URI. 384# param $1 - a repository URI.
382subversion__get_repository_uri() { 385subversion__get_repository_uri() {
383 local repo_uri="${1}" 386 local repo_uri="${1:-${ESVN_REPO_URI}}"
384 387
385 debug-print "${FUNCNAME}: repo_uri = ${repo_uri}" 388 debug-print "${FUNCNAME}: repo_uri = ${repo_uri}"
386 389
387 if [[ -z ${repo_uri} ]]; then 390 if [[ -z ${repo_uri} ]]; then
388 die "${ESVN}: ESVN_REPO_URI (or specified URI) is empty." 391 die "${ESVN}: ESVN_REPO_URI (or specified URI) is empty."

Legend:
Removed from v.1.52  
changed lines
  Added in v.1.53

  ViewVC Help
Powered by ViewVC 1.1.20