Gentoo Archives: gentoo-commits

From: "Michal Gorny (mgorny)" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in eclass: ChangeLog git-r3.eclass
Date: Sun, 02 Mar 2014 11:47:13
Message-Id: 20140302114710.E6B432004C@flycatcher.gentoo.org
1 mgorny 14/03/02 11:47:10
2
3 Modified: ChangeLog git-r3.eclass
4 Log:
5 Introduce EGIT_CLONE_TYPE for future use.
6
7 Revision Changes Path
8 1.1156 eclass/ChangeLog
9
10 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1156&view=markup
11 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1156&content-type=text/plain
12 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.1155&r2=1.1156
13
14 Index: ChangeLog
15 ===================================================================
16 RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v
17 retrieving revision 1.1155
18 retrieving revision 1.1156
19 diff -u -r1.1155 -r1.1156
20 --- ChangeLog 2 Mar 2014 11:46:42 -0000 1.1155
21 +++ ChangeLog 2 Mar 2014 11:47:10 -0000 1.1156
22 @@ -1,6 +1,9 @@
23 # ChangeLog for eclass directory
24 # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
25 -# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1155 2014/03/02 11:46:42 mgorny Exp $
26 +# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1156 2014/03/02 11:47:10 mgorny Exp $
27 +
28 + 02 Mar 2014; Michał Górny <mgorny@g.o> git-r3.eclass:
29 + Introduce EGIT_CLONE_TYPE for future use.
30
31 02 Mar 2014; Michał Górny <mgorny@g.o> git-r3.eclass:
32 Support using a local git mirror.
33
34
35
36 1.31 eclass/git-r3.eclass
37
38 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?rev=1.31&view=markup
39 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?rev=1.31&content-type=text/plain
40 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?r1=1.30&r2=1.31
41
42 Index: git-r3.eclass
43 ===================================================================
44 RCS file: /var/cvsroot/gentoo-x86/eclass/git-r3.eclass,v
45 retrieving revision 1.30
46 retrieving revision 1.31
47 diff -u -r1.30 -r1.31
48 --- git-r3.eclass 2 Mar 2014 11:46:42 -0000 1.30
49 +++ git-r3.eclass 2 Mar 2014 11:47:10 -0000 1.31
50 @@ -1,6 +1,6 @@
51 # Copyright 1999-2014 Gentoo Foundation
52 # Distributed under the terms of the GNU General Public License v2
53 -# $Header: /var/cvsroot/gentoo-x86/eclass/git-r3.eclass,v 1.30 2014/03/02 11:46:42 mgorny Exp $
54 +# $Header: /var/cvsroot/gentoo-x86/eclass/git-r3.eclass,v 1.31 2014/03/02 11:47:10 mgorny Exp $
55
56 # @ECLASS: git-r3.eclass
57 # @MAINTAINER:
58 @@ -32,6 +32,19 @@
59 DEPEND="dev-vcs/git"
60 fi
61
62 +# @ECLASS-VARIABLE: EGIT_CLONE_TYPE
63 +# @DESCRIPTION:
64 +# Type of clone that should be used against the remote repository.
65 +# This can be either of: 'mirror'.
66 +#
67 +# The 'mirror' type clones all remote branches and tags with complete
68 +# history and all notes. EGIT_COMMIT can specify any commit hash.
69 +# Upstream-removed branches and tags are purged from the local clone
70 +# while fetching. This mode is suitable for cloning the local copy
71 +# for development or hosting a local git mirror. However, clones
72 +# of repositories with large diverged branches may quickly grow large.
73 +: ${EGIT_CLONE_TYPE:=mirror}
74 +
75 # @ECLASS-VARIABLE: EGIT3_STORE_DIR
76 # @DESCRIPTION:
77 # Storage directory for git sources.
78 @@ -107,6 +120,14 @@
79 _git-r3_env_setup() {
80 debug-print-function ${FUNCNAME} "$@"
81
82 + # check the clone type
83 + case "${EGIT_CLONE_TYPE}" in
84 + mirror)
85 + ;;
86 + *)
87 + die "Invalid EGIT_CLONE_TYPE=${EGIT_CLONE_TYPE}"
88 + esac
89 +
90 local esc_pn livevar
91 esc_pn=${PN//[-+]/_}