Gentoo Archives: gentoo-commits

From: "Arfrever Frehtes Taifersar Arahesis (arfrever)" <arfrever@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in eclass: subversion.eclass
Date: Sun, 26 Apr 2009 02:18:12
Message-Id: E1LxtwX-0004jy-Jb@stork.gentoo.org
1 arfrever 09/04/26 02:18:09
2
3 Modified: subversion.eclass
4 Log:
5 Support ESVN_USER and ESVN_PASSWORD variables.
6
7 Revision Changes Path
8 1.63 eclass/subversion.eclass
9
10 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/subversion.eclass?rev=1.63&view=markup
11 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/subversion.eclass?rev=1.63&content-type=text/plain
12 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/subversion.eclass?r1=1.62&r2=1.63
13
14 Index: subversion.eclass
15 ===================================================================
16 RCS file: /var/cvsroot/gentoo-x86/eclass/subversion.eclass,v
17 retrieving revision 1.62
18 retrieving revision 1.63
19 diff -u -r1.62 -r1.63
20 --- subversion.eclass 26 Apr 2009 01:57:14 -0000 1.62
21 +++ subversion.eclass 26 Apr 2009 02:18:09 -0000 1.63
22 @@ -1,6 +1,6 @@
23 # Copyright 1999-2009 Gentoo Foundation
24 # Distributed under the terms of the GNU General Public License v2
25 -# $Header: /var/cvsroot/gentoo-x86/eclass/subversion.eclass,v 1.62 2009/04/26 01:57:14 arfrever Exp $
26 +# $Header: /var/cvsroot/gentoo-x86/eclass/subversion.eclass,v 1.63 2009/04/26 02:18:09 arfrever Exp $
27
28 # @ECLASS: subversion.eclass
29 # @MAINTAINER:
30 @@ -77,6 +77,16 @@
31 # Note: This should never be set in an ebuild!
32 ESVN_REVISION="${ESVN_REVISION:-}"
33
34 +# @ECLASS-VARIABLE: ESVN_USER
35 +# @DESCRIPTION:
36 +# User name
37 +ESVN_USER="${ESVN_USER:-}"
38 +
39 +# @ECLASS-VARIABLE: ESVN_PASSWORD
40 +# @DESCRIPTION:
41 +# Password
42 +ESVN_PASSWORD="${ESVN_PASSWORD:-}"
43 +
44 # @ECLASS-VARIABLE: ESVN_PROJECT
45 # @DESCRIPTION:
46 # project name of your ebuild (= name space)
47 @@ -171,7 +181,7 @@
48 case "${protocol}" in
49 http|https)
50 if ! built_with_use --missing true -o dev-util/subversion webdav-neon webdav-serf || \
51 - built_with_use --missing false dev-util/subversion nowebdav ; then
52 + built_with_use --missing false dev-util/subversion nowebdav; then
53 echo
54 eerror "In order to emerge this package, you need to"
55 eerror "reinstall Subversion with support for WebDAV."
56 @@ -217,7 +227,7 @@
57
58 if [[ ! -d ${wc_path}/.svn ]]; then
59 if [[ -n ${ESVN_OFFLINE} ]]; then
60 - ewarn "ESVN_OFFLINE cannot be used when the there is no existing checkout."
61 + ewarn "ESVN_OFFLINE cannot be used when there is no existing checkout."
62 fi
63 # first check out
64 einfo "subversion check out start -->"
65 @@ -227,7 +237,11 @@
66
67 mkdir -p "${ESVN_PROJECT}" || die "${ESVN}: can't mkdir ${ESVN_PROJECT}."
68 cd "${ESVN_PROJECT}" || die "${ESVN}: can't chdir to ${ESVN_PROJECT}"
69 - ${ESVN_FETCH_CMD} ${options} "${repo_uri}" || die "${ESVN}: can't fetch to ${wc_path} from ${repo_uri}."
70 + if [[ -n "${ESVN_USER}" ]]; then
71 + ${ESVN_FETCH_CMD} ${options} --username "${ESVN_USER}" --password "${ESVN_PASSWORD}" "${repo_uri}" || die "${ESVN}: can't fetch to ${wc_path} from ${repo_uri}."
72 + else
73 + ${ESVN_FETCH_CMD} ${options} "${repo_uri}" || die "${ESVN}: can't fetch to ${wc_path} from ${repo_uri}."
74 + fi
75
76 elif [[ -n ${ESVN_OFFLINE} ]]; then
77 svn cleanup "${wc_path}"
78 @@ -260,7 +274,11 @@
79 debug-print "${FUNCNAME}: ${ESVN_SWITCH_CMD} ${options} ${repo_uri}"
80
81 cd "${wc_path}" || die "${ESVN}: can't chdir to ${wc_path}"
82 - ${ESVN_SWITCH_CMD} ${options} ${repo_uri} || die "${ESVN}: can't update ${wc_path} from ${repo_uri}"
83 + if [[ -n "${ESVN_USER}" ]]; then
84 + ${ESVN_SWITCH_CMD} ${options} --username "${ESVN_USER}" --password "${ESVN_PASSWORD}" ${repo_uri} || die "${ESVN}: can't update ${wc_path} from ${repo_uri}."
85 + else
86 + ${ESVN_SWITCH_CMD} ${options} ${repo_uri} || die "${ESVN}: can't update ${wc_path} from ${repo_uri}."
87 + fi
88 else
89 # update working copy
90 einfo "subversion update start -->"
91 @@ -269,7 +287,11 @@
92 debug-print "${FUNCNAME}: ${ESVN_UPDATE_CMD} ${options}"
93
94 cd "${wc_path}" || die "${ESVN}: can't chdir to ${wc_path}"
95 - ${ESVN_UPDATE_CMD} ${options} || die "${ESVN}: can't update ${wc_path} from ${repo_uri}."
96 + if [[ -n "${ESVN_USER}" ]]; then
97 + ${ESVN_UPDATE_CMD} ${options} --username "${ESVN_USER}" --password "${ESVN_PASSWORD}" || die "${ESVN}: can't update ${wc_path} from ${repo_uri}."
98 + else
99 + ${ESVN_UPDATE_CMD} ${options} || die "${ESVN}: can't update ${wc_path} from ${repo_uri}."
100 + fi
101 fi
102 fi
103 fi