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

Diff of /eclass/mercurial.eclass

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

Revision 1.6 Revision 1.7
1# Copyright 1999-2006 Gentoo Foundation 1# Copyright 1999-2006 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.6 2009/03/11 18:56:28 nelchael Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/mercurial.eclass,v 1.7 2009/09/29 21:51:33 nelchael Exp $
4 4
5# @ECLASS: mercurial.eclass 5# @ECLASS: mercurial.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# nelchael@gentoo.org 7# nelchael@gentoo.org
8# @BLURB: This eclass provides generic mercurial fetching functions 8# @BLURB: This eclass provides generic mercurial fetching functions
43# @ECLASS-VARIABLE: EHG_PULL_CMD 43# @ECLASS-VARIABLE: EHG_PULL_CMD
44# @DESCRIPTION: 44# @DESCRIPTION:
45# Command used to update repository. 45# Command used to update repository.
46[[ -z "${EHG_PULL_CMD}" ]] && EHG_PULL_CMD="hg pull --quiet" 46[[ -z "${EHG_PULL_CMD}" ]] && EHG_PULL_CMD="hg pull --quiet"
47 47
48# @ECLASS-VARIABLE: EHG_OFFLINE
49# @DESCRIPTION:
50# Set this variable to a non-empty value to disable the automatic updating of
51# a mercurial source tree. This is intended to be set outside the ebuild by
52# users.
53EHG_OFFLINE="${EHG_OFFLINE:-${ESCM_OFFLINE}}"
54
48# @FUNCTION: mercurial_fetch 55# @FUNCTION: mercurial_fetch
49# @USAGE: [repository_uri] [module] 56# @USAGE: [repository_uri] [module]
50# @DESCRIPTION: 57# @DESCRIPTION:
51# Clone or update repository. 58# Clone or update repository.
52# 59#
86 ${EHG_CLONE_CMD} "${EHG_REPO_URI}" "${module}" || { 93 ${EHG_CLONE_CMD} "${EHG_REPO_URI}" "${module}" || {
87 rm -rf "${module}" 94 rm -rf "${module}"
88 die "failed to clone ${EHG_REPO_URI}" 95 die "failed to clone ${EHG_REPO_URI}"
89 } 96 }
90 cd "${module}" 97 cd "${module}"
91 else 98 elif [[ -z "${EHG_OFFLINE}" ]]; then
92 einfo "Updating ${hg_src_dir}/${EHG_PROJECT}/${module} from ${EHG_REPO_URI}" 99 einfo "Updating ${hg_src_dir}/${EHG_PROJECT}/${module} from ${EHG_REPO_URI}"
93 cd "${module}" || die "failed to cd to ${module}" 100 cd "${module}" || die "failed to cd to ${module}"
94 ${EHG_PULL_CMD} || die "update failed" 101 ${EHG_PULL_CMD} || die "update failed"
95 fi 102 fi
96 103

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.7

  ViewVC Help
Powered by ViewVC 1.1.20