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

Diff of /eclass/subversion.eclass

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

Revision 1.53 Revision 1.54
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.53 2008/02/21 13:38:36 zlin Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/subversion.eclass,v 1.54 2008/02/21 16:01:53 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}")" 157 local repo_uri="$(subversion__get_repository_uri "${1:-${ESVN_REPO_URI}}")"
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."
346# Get svn info for the specified repo_uri. The default repo_uri is ESVN_REPO_URI. 346# Get svn info for the specified repo_uri. The default repo_uri is ESVN_REPO_URI.
347# 347#
348# The working copy information on the specified repository URI are set to 348# The working copy information on the specified repository URI are set to
349# ESVN_WC_* variables. 349# ESVN_WC_* variables.
350subversion_wc_info() { 350subversion_wc_info() {
351 local repo_uri="$(subversion__get_repository_uri "${1}")" 351 local repo_uri="$(subversion__get_repository_uri "${1:-${ESVN_REPO_URI}}")"
352 local wc_path="$(subversion__get_wc_path "${repo_uri}")" 352 local wc_path="$(subversion__get_wc_path "${repo_uri}")"
353 353
354 debug-print "${FUNCNAME}: repo_uri = ${repo_uri}" 354 debug-print "${FUNCNAME}: repo_uri = ${repo_uri}"
355 debug-print "${FUNCNAME}: wc_path = ${wc_path}" 355 debug-print "${FUNCNAME}: wc_path = ${wc_path}"
356 356
381 381
382## -- subversion__get_repository_uri() --------------------------------------- # 382## -- subversion__get_repository_uri() --------------------------------------- #
383# 383#
384# param $1 - a repository URI. 384# param $1 - a repository URI.
385subversion__get_repository_uri() { 385subversion__get_repository_uri() {
386 local repo_uri="${1:-${ESVN_REPO_URI}}" 386 local repo_uri="${1}"
387 387
388 debug-print "${FUNCNAME}: repo_uri = ${repo_uri}" 388 debug-print "${FUNCNAME}: repo_uri = ${repo_uri}"
389 389
390 if [[ -z ${repo_uri} ]]; then 390 if [[ -z ${repo_uri} ]]; then
391 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.53  
changed lines
  Added in v.1.54

  ViewVC Help
Powered by ViewVC 1.1.20