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

Diff of /eclass/subversion.eclass

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

Revision 1.56 Revision 1.59
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.56 2008/02/27 12:54:35 zlin Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/subversion.eclass,v 1.59 2008/05/15 13:27:40 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>
167 # check for the protocol 167 # check for the protocol
168 local protocol="${repo_uri%%:*}" 168 local protocol="${repo_uri%%:*}"
169 169
170 case "${protocol}" in 170 case "${protocol}" in
171 http|https) 171 http|https)
172 if ! built_with_use --missing true -o dev-util/subversion webdav-neon webdav-serf || \
172 if built_with_use dev-util/subversion nowebdav; then 173 built_with_use --missing false dev-util/subversion nowebdav ; then
173 echo 174 echo
174 eerror "In order to emerge this package, you need to" 175 eerror "In order to emerge this package, you need to"
175 eerror "re-emerge subversion with USE=-nowebdav" 176 eerror "reinstall Subversion with support for WebDAV."
177 eerror "Subversion requires either Neon or Serf to support WebDAV."
176 echo 178 echo
177 die "${ESVN}: please run 'USE=-nowebdav emerge subversion'" 179 die "${ESVN}: reinstall Subversion with support for WebDAV."
178 fi 180 fi
179 ;; 181 ;;
180 svn|svn+ssh) 182 svn|svn+ssh)
181 ;; 183 ;;
182 *) 184 *)
218 220
219 debug-print "${FUNCNAME}: ${ESVN_FETCH_CMD} ${options} ${repo_uri}" 221 debug-print "${FUNCNAME}: ${ESVN_FETCH_CMD} ${options} ${repo_uri}"
220 222
221 mkdir -p "${ESVN_PROJECT}" || die "${ESVN}: can't mkdir ${ESVN_PROJECT}." 223 mkdir -p "${ESVN_PROJECT}" || die "${ESVN}: can't mkdir ${ESVN_PROJECT}."
222 cd "${ESVN_PROJECT}" || die "${ESVN}: can't chdir to ${ESVN_PROJECT}" 224 cd "${ESVN_PROJECT}" || die "${ESVN}: can't chdir to ${ESVN_PROJECT}"
223 ${ESVN_FETCH_CMD} ${options} "${repo_uri}" || die "${ESVN}: can't fetch from ${repo_uri}." 225 ${ESVN_FETCH_CMD} ${options} "${repo_uri}" || die "${ESVN}: can't fetch to ${wc_path} from ${repo_uri}."
224 226
225 elif [[ -n ${ESVN_OFFLINE} ]]; then 227 elif [[ -n ${ESVN_OFFLINE} ]]; then
226 subversion_wc_info "${repo_uri}" || die "${ESVN}: unknown problem occurred while accessing working copy." 228 subversion_wc_info "${repo_uri}" || die "${ESVN}: unknown problem occurred while accessing working copy."
227 if [[ -n ${ESVN_REVISION} && ${ESVN_REVISION} != ${ESVN_WC_REVISION} ]]; then 229 if [[ -n ${ESVN_REVISION} && ${ESVN_REVISION} != ${ESVN_WC_REVISION} ]]; then
228 die "${ESVN}: You requested off-line updating and revision ${ESVN_REVISION} but only revision ${ESVN_WC_REVISION} is available locally." 230 die "${ESVN}: You requested off-line updating and revision ${ESVN_REVISION} but only revision ${ESVN_WC_REVISION} is available locally."
242 fi 244 fi
243 fi 245 fi
244 246
245 if [[ -z ${esvn_up_freq} ]]; then 247 if [[ -z ${esvn_up_freq} ]]; then
246 if [[ ${ESVN_WC_URL} != $(subversion__get_repository_uri "${repo_uri}") ]]; then 248 if [[ ${ESVN_WC_URL} != $(subversion__get_repository_uri "${repo_uri}") ]]; then
247 einfo "suversion switch start -->" 249 einfo "subversion switch start -->"
248 einfo " old repository: ${ESVN_WC_URL}@${ESVN_WC_REVISION}" 250 einfo " old repository: ${ESVN_WC_URL}@${ESVN_WC_REVISION}"
249 einfo " new repository: ${repo_uri}${revision:+@}${revision}" 251 einfo " new repository: ${repo_uri}${revision:+@}${revision}"
250 252
251 debug-print "${FUNCNAME}: ${ESVN_SWITCH_CMD} ${options} ${repo_uri}" 253 debug-print "${FUNCNAME}: ${ESVN_SWITCH_CMD} ${options} ${repo_uri}"
252 254
253 cd "${wc_path}" || die "${ESVN}: can't chdir to ${wc_path}" 255 cd "${wc_path}" || die "${ESVN}: can't chdir to ${wc_path}"
254 ${ESVN_SWITCH_CMD} ${options} ${repo_uri} || die "${ESVN}: can't update from ${repo_uri}" 256 ${ESVN_SWITCH_CMD} ${options} ${repo_uri} || die "${ESVN}: can't update ${wc_path} from ${repo_uri}"
255 else 257 else
256 # update working copy 258 # update working copy
257 einfo "subversion update start -->" 259 einfo "subversion update start -->"
258 einfo " repository: ${repo_uri}${revision:+@}${revision}" 260 einfo " repository: ${repo_uri}${revision:+@}${revision}"
259 261
260 debug-print "${FUNCNAME}: ${ESVN_UPDATE_CMD} ${options}" 262 debug-print "${FUNCNAME}: ${ESVN_UPDATE_CMD} ${options}"
261 263
262 cd "${wc_path}" || die "${ESVN}: can't chdir to ${wc_path}" 264 cd "${wc_path}" || die "${ESVN}: can't chdir to ${wc_path}"
263 ${ESVN_UPDATE_CMD} ${options} || die "${ESVN}: can't update from ${repo_uri}." 265 ${ESVN_UPDATE_CMD} ${options} || die "${ESVN}: can't update ${wc_path} from ${repo_uri}."
264 fi 266 fi
265 fi 267 fi
266 fi 268 fi
267 269
268 einfo " working copy: ${wc_path}" 270 einfo " working copy: ${wc_path}"

Legend:
Removed from v.1.56  
changed lines
  Added in v.1.59

  ViewVC Help
Powered by ViewVC 1.1.20