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

Diff of /eclass/mercurial.eclass

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

Revision 1.17 Revision 1.19
1# Copyright 1999-2011 Gentoo Foundation 1# Copyright 1999-2012 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/mercurial.eclass,v 1.17 2011/12/27 17:55:12 fauli Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/mercurial.eclass,v 1.19 2012/04/03 19:16:29 nelchael Exp $
4 4
5# @ECLASS: mercurial.eclass 5# @ECLASS: mercurial.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# Krzysztof Pawlik <nelchael@gentoo.org> 7# Krzysztof Pawlik <nelchael@gentoo.org>
8# Dirkjan Ochtman <djc@gentoo.org> 8# Dirkjan Ochtman <djc@gentoo.org>
63# @ECLASS-VARIABLE: EHG_OFFLINE 63# @ECLASS-VARIABLE: EHG_OFFLINE
64# @DESCRIPTION: 64# @DESCRIPTION:
65# Set this variable to a non-empty value to disable the automatic updating of 65# Set this variable to a non-empty value to disable the automatic updating of
66# a mercurial source tree. This is intended to be set outside the ebuild by 66# a mercurial source tree. This is intended to be set outside the ebuild by
67# users. 67# users.
68EHG_OFFLINE="${EHG_OFFLINE:-${ESCM_OFFLINE}}" 68EHG_OFFLINE="${EHG_OFFLINE:-${EVCS_OFFLINE}}"
69 69
70# @FUNCTION: mercurial_fetch 70# @FUNCTION: mercurial_fetch
71# @USAGE: [repository_uri] [module] [sourcedir] 71# @USAGE: [repository_uri] [module] [sourcedir]
72# @DESCRIPTION: 72# @DESCRIPTION:
73# Clone or update repository. 73# Clone or update repository.
111 } 111 }
112 cd "${module}" 112 cd "${module}"
113 elif [[ -z "${EHG_OFFLINE}" ]]; then 113 elif [[ -z "${EHG_OFFLINE}" ]]; then
114 einfo "Updating ${EHG_STORE_DIR}/${EHG_PROJECT}/${module} from ${EHG_REPO_URI}" 114 einfo "Updating ${EHG_STORE_DIR}/${EHG_PROJECT}/${module} from ${EHG_REPO_URI}"
115 cd "${module}" || die "failed to cd to ${module}" 115 cd "${module}" || die "failed to cd to ${module}"
116 ${EHG_PULL_CMD} || die "update failed" 116 ${EHG_PULL_CMD}
117 # mercurial-2.1: hg pull returns 1 if there are no incoming changesets
118 [[ $? -eq 0 || $? -eq 1 ]] || die "update failed"
117 fi 119 fi
118 120
119 # Checkout working copy: 121 # Checkout working copy:
120 einfo "Creating working directory in ${sourcedir} (target revision: ${EHG_REVISION})" 122 einfo "Creating working directory in ${sourcedir} (target revision: ${EHG_REVISION})"
121 hg clone \ 123 hg clone \

Legend:
Removed from v.1.17  
changed lines
  Added in v.1.19

  ViewVC Help
Powered by ViewVC 1.1.20