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

Diff of /eclass/subversion.eclass

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

Revision 1.48 Revision 1.49
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.48 2008/02/20 19:18:53 cardoe Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/subversion.eclass,v 1.49 2008/02/20 20:32:00 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>
121# this should be a space delimited list of subversion eclass features to 121# this should be a space delimited list of subversion eclass features to
122# restrict. 122# restrict.
123# export) 123# export)
124# don't export the working copy to S. 124# don't export the working copy to S.
125ESVN_RESTRICT="${ESVN_RESTRICT:-}" 125ESVN_RESTRICT="${ESVN_RESTRICT:-}"
126
127# @ECLASS-VARIABLE: ESVN_OFFLINE
128# @DESCRIPTION:
129# Set this variable to a non-empty value to disable the automatic updating of
130# an svn source tree. This is intended to be set outside the subversion source
131# tree by users.
132ESVN_OFFLINE="${ESVN_OFFLINE:-${ESCM_OFFLINE}}"
126 133
127# @FUNCTION: subversion_fetch 134# @FUNCTION: subversion_fetch
128# @USAGE: [repo_uri] [destination] 135# @USAGE: [repo_uri] [destination]
129# @DESCRIPTION: 136# @DESCRIPTION:
130# Wrapper function to fetch sources from subversion via svn checkout or svn update, 137# Wrapper function to fetch sources from subversion via svn checkout or svn update,
193 200
194 mkdir -p "${ESVN_PROJECT}" || die "${ESVN}: can't mkdir ${ESVN_PROJECT}." 201 mkdir -p "${ESVN_PROJECT}" || die "${ESVN}: can't mkdir ${ESVN_PROJECT}."
195 cd "${ESVN_PROJECT}" || die "${ESVN}: can't chdir to ${ESVN_PROJECT}" 202 cd "${ESVN_PROJECT}" || die "${ESVN}: can't chdir to ${ESVN_PROJECT}"
196 ${ESVN_FETCH_CMD} ${options} "${repo_uri}" || die "${ESVN}: can't fetch from ${repo_uri}." 203 ${ESVN_FETCH_CMD} ${options} "${repo_uri}" || die "${ESVN}: can't fetch from ${repo_uri}."
197 204
205 elif [[ -n ${ESVN_OFFLINE} ]]; then
206 subversion_wc_info "${repo_uri}" || die "${ESVN}: unknown problem occurred while accessing working copy."
207 if [[ -n ${ESVN_REVISION} && ${ESVN_REVISION} != ${ESVN_WC_REVISION} ]]; then
208 die "${ESVN}: You requested off-line updating and revision ${ESVN_REVISION} but only revision ${ESVN_WC_REVISION} is available locally."
209 fi
210 einfo "Fetching disabled: Using existing repository copy"
198 else 211 else
199 subversion_wc_info "${repo_uri}" || die "${ESVN}: unknown problem occurred while accessing working copy." 212 subversion_wc_info "${repo_uri}" || die "${ESVN}: unknown problem occurred while accessing working copy."
200 213
201 if [[ ${ESVN_WC_URL} != $(subversion__get_repository_uri "${repo_uri}") ]]; then 214 if [[ ${ESVN_WC_URL} != $(subversion__get_repository_uri "${repo_uri}") ]]; then
202 einfo "suversion switch start -->" 215 einfo "suversion switch start -->"
378 391
379 # repo_uri has peg revision ? 392 # repo_uri has peg revision ?
380 if [[ ${repo_uri} != *@* ]]; then 393 if [[ ${repo_uri} != *@* ]]; then
381 debug-print "${FUNCNAME}: repo_uri does not have a peg revision." 394 debug-print "${FUNCNAME}: repo_uri does not have a peg revision."
382 fi 395 fi
383 396
384 local peg_rev= 397 local peg_rev=
385 [[ ${repo_uri} = *@* ]] && peg_rev="${repo_uri##*@}" 398 [[ ${repo_uri} = *@* ]] && peg_rev="${repo_uri##*@}"
386 399
387 debug-print "${FUNCNAME}: peg_rev = ${peg_rev}" 400 debug-print "${FUNCNAME}: peg_rev = ${peg_rev}"
388 401

Legend:
Removed from v.1.48  
changed lines
  Added in v.1.49

  ViewVC Help
Powered by ViewVC 1.1.20