Gentoo Archives: gentoo-commits

From: "Krzysiek Pawlik (nelchael)" <nelchael@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in eclass: mercurial.eclass
Date: Tue, 29 Sep 2009 21:51:36
Message-Id: E1Mskbd-0004gJ-My@stork.gentoo.org
1 nelchael 09/09/29 21:51:33
2
3 Modified: mercurial.eclass
4 Log:
5 Add support for ESCM_OFFLINE, see bug 280214.
6
7 Revision Changes Path
8 1.7 eclass/mercurial.eclass
9
10 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/mercurial.eclass?rev=1.7&view=markup
11 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/mercurial.eclass?rev=1.7&content-type=text/plain
12 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/mercurial.eclass?r1=1.6&r2=1.7
13
14 Index: mercurial.eclass
15 ===================================================================
16 RCS file: /var/cvsroot/gentoo-x86/eclass/mercurial.eclass,v
17 retrieving revision 1.6
18 retrieving revision 1.7
19 diff -u -r1.6 -r1.7
20 --- mercurial.eclass 11 Mar 2009 18:56:28 -0000 1.6
21 +++ mercurial.eclass 29 Sep 2009 21:51:33 -0000 1.7
22 @@ -1,6 +1,6 @@
23 # Copyright 1999-2006 Gentoo Foundation
24 # Distributed under the terms of the GNU General Public License v2
25 -# $Header: /var/cvsroot/gentoo-x86/eclass/mercurial.eclass,v 1.6 2009/03/11 18:56:28 nelchael Exp $
26 +# $Header: /var/cvsroot/gentoo-x86/eclass/mercurial.eclass,v 1.7 2009/09/29 21:51:33 nelchael Exp $
27
28 # @ECLASS: mercurial.eclass
29 # @MAINTAINER:
30 @@ -45,6 +45,13 @@
31 # Command used to update repository.
32 [[ -z "${EHG_PULL_CMD}" ]] && EHG_PULL_CMD="hg pull --quiet"
33
34 +# @ECLASS-VARIABLE: EHG_OFFLINE
35 +# @DESCRIPTION:
36 +# Set this variable to a non-empty value to disable the automatic updating of
37 +# a mercurial source tree. This is intended to be set outside the ebuild by
38 +# users.
39 +EHG_OFFLINE="${EHG_OFFLINE:-${ESCM_OFFLINE}}"
40 +
41 # @FUNCTION: mercurial_fetch
42 # @USAGE: [repository_uri] [module]
43 # @DESCRIPTION:
44 @@ -88,7 +95,7 @@
45 die "failed to clone ${EHG_REPO_URI}"
46 }
47 cd "${module}"
48 - else
49 + elif [[ -z "${EHG_OFFLINE}" ]]; then
50 einfo "Updating ${hg_src_dir}/${EHG_PROJECT}/${module} from ${EHG_REPO_URI}"
51 cd "${module}" || die "failed to cd to ${module}"
52 ${EHG_PULL_CMD} || die "update failed"