mgorny 14/03/24 21:32:31 Modified: ChangeLog git-r3.eclass Log: Add a single+tags mode to handle Google Code more efficiently, bug #503708.
Revision Changes Path 1.1183 eclass/ChangeLog file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1183&view=markup plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1183&content-type=text/plain diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.1182&r2=1.1183 Index: ChangeLog =================================================================== RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v retrieving revision 1.1182 retrieving revision 1.1183 diff -u -r1.1182 -r1.1183 --- ChangeLog 21 Mar 2014 22:03:00 -0000 1.1182 +++ ChangeLog 24 Mar 2014 21:32:31 -0000 1.1183 @@ -1,6 +1,9 @@ # ChangeLog for eclass directory # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1182 2014/03/21 22:03:00 robbat2 Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1183 2014/03/24 21:32:31 mgorny Exp $ + + 24 Mar 2014; Michał Górny <[email protected]> git-r3.eclass: + Add a single+tags mode to handle Google Code more efficiently, bug #503708. 21 Mar 2014; Robin H. Johnson <[email protected]> linux-info.eclass: linux-info: Bug #504346: Change one message from error to warning, kernel 1.40 eclass/git-r3.eclass file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?rev=1.40&view=markup plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?rev=1.40&content-type=text/plain diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?r1=1.39&r2=1.40 Index: git-r3.eclass =================================================================== RCS file: /var/cvsroot/gentoo-x86/eclass/git-r3.eclass,v retrieving revision 1.39 retrieving revision 1.40 diff -u -r1.39 -r1.40 --- git-r3.eclass 3 Mar 2014 21:45:06 -0000 1.39 +++ git-r3.eclass 24 Mar 2014 21:32:31 -0000 1.40 @@ -1,6 +1,6 @@ # Copyright 1999-2014 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/git-r3.eclass,v 1.39 2014/03/03 21:45:06 mgorny Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/git-r3.eclass,v 1.40 2014/03/24 21:32:31 mgorny Exp $ # @ECLASS: git-r3.eclass # @MAINTAINER: @@ -47,6 +47,14 @@ # for development or hosting a local git mirror. However, clones # of repositories with large diverged branches may quickly grow large. # +# The 'single+tags' type clones the requested branch and all tags +# in the repository. All notes are fetched as well. EGIT_COMMIT +# can safely specify hashes throughout the current branch and all tags. +# No purging of old references is done (if you often switch branches, +# you may need to remove stale branches yourself). This mode is intended +# mostly for use with broken git servers such as Google Code that fail +# to fetch tags along with the branch in 'single' mode. +# # The 'single' type clones only the requested branch or tag. Tags # referencing commits throughout the branch history are fetched as well, # and all notes. EGIT_COMMIT can safely specify only hashes @@ -72,9 +80,10 @@ # supposed to set EGIT_CLONE_TYPE instead. # # A common case is to use 'single' whenever the build system requires -# access to full branch history or the remote (Google Code) does not -# support shallow clones. Please use sparingly, and to fix fatal errors -# rather than 'non-pretty versions'. +# access to full branch history, or 'single+tags' when Google Code +# or a similar remote is used that does not support shallow clones +# and fetching tags along with commits. Please use sparingly, and to fix +# fatal errors rather than 'non-pretty versions'. : ${EGIT_MIN_CLONE_TYPE:=shallow} # @ECLASS-VARIABLE: EGIT3_STORE_DIR @@ -154,7 +163,7 @@ # check the clone type case "${EGIT_CLONE_TYPE}" in - mirror|single|shallow) + mirror|single+tags|single|shallow) ;; *) die "Invalid EGIT_CLONE_TYPE=${EGIT_CLONE_TYPE}" @@ -168,6 +177,12 @@ EGIT_CLONE_TYPE=single fi ;; + single+tags) + if [[ ${EGIT_CLONE_TYPE} == shallow || ${EGIT_CLONE_TYPE} == single ]]; then + einfo "git-r3: ebuild needs to be cloned in 'single+tags' mode, adjusting" + EGIT_CLONE_TYPE=single+tags + fi + ;; mirror) if [[ ${EGIT_CLONE_TYPE} != mirror ]]; then einfo "git-r3: ebuild needs to be cloned in 'mirror' mode, adjusting" @@ -510,6 +525,13 @@ fetch_command+=( "+${fetch_l}:${fetch_r}" ) + + if [[ ${EGIT_CLONE_TYPE} == single+tags ]]; then + fetch_command+=( + # pull tags explicitly as requested + "+refs/tags/*:refs/tags/*" + ) + fi fi if [[ ${EGIT_CLONE_TYPE} == shallow ]]; then
