* [gentoo-commits] gentoo-x86 commit in eclass: mercurial.eclass
@ 2009-02-22 13:01 Krzysiek Pawlik (nelchael)
0 siblings, 0 replies; 13+ messages in thread
From: Krzysiek Pawlik (nelchael) @ 2009-02-22 13:01 UTC (permalink / raw
To: gentoo-commits
nelchael 09/02/22 13:01:17
Modified: mercurial.eclass
Log:
Use clone --pull to fix bug #238314.
Revision Changes Path
1.4 eclass/mercurial.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/mercurial.eclass?rev=1.4&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/mercurial.eclass?rev=1.4&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/mercurial.eclass?r1=1.3&r2=1.4
Index: mercurial.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/mercurial.eclass,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- mercurial.eclass 13 Oct 2006 23:45:03 -0000 1.3
+++ mercurial.eclass 22 Feb 2009 13:01:17 -0000 1.4
@@ -1,6 +1,6 @@
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/mercurial.eclass,v 1.3 2006/10/13 23:45:03 agriffis Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/mercurial.eclass,v 1.4 2009/02/22 13:01:17 nelchael Exp $
# mercurial: Fetch sources from mercurial repositories, similar to cvs.eclass.
# To use this from an ebuild, set EHG_REPO_URI in your ebuild. Then either
@@ -14,12 +14,12 @@
EHG_STORE_DIR="${PORTAGE_ACTUAL_DISTDIR-${DISTDIR}}/hg-src"
# This must be set by the ebuild
-: ${EHG_REPO_URI:=} # repository uri
+: ${EHG_REPO_URI:=} # repository uri
# These can be set by the ebuild but are usually fine as-is
-: ${EHG_PROJECT:=$PN} # dir under EHG_STORE_DIR
-: ${EHG_CLONE_CMD:=hg clone} # clone cmd
-: ${EHG_PULL_CMD:=hg pull -u} # pull cmd
+: ${EHG_PROJECT:=$PN} # dir under EHG_STORE_DIR
+: ${EHG_CLONE_CMD:=hg clone --pull} # clone cmd
+: ${EHG_PULL_CMD:=hg pull -u} # pull cmd
# should be set but blank to prevent using $HOME/.hgrc
export HGRCPATH=
^ permalink raw reply [flat|nested] 13+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: mercurial.eclass
@ 2009-03-09 20:09 Krzysiek Pawlik (nelchael)
0 siblings, 0 replies; 13+ messages in thread
From: Krzysiek Pawlik (nelchael) @ 2009-03-09 20:09 UTC (permalink / raw
To: gentoo-commits
nelchael 09/03/09 20:09:24
Modified: mercurial.eclass
Log:
Cleanup eclass, add documentation.
Revision Changes Path
1.5 eclass/mercurial.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/mercurial.eclass?rev=1.5&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/mercurial.eclass?rev=1.5&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/mercurial.eclass?r1=1.4&r2=1.5
Index: mercurial.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/mercurial.eclass,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- mercurial.eclass 22 Feb 2009 13:01:17 -0000 1.4
+++ mercurial.eclass 9 Mar 2009 20:09:24 -0000 1.5
@@ -1,78 +1,111 @@
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/mercurial.eclass,v 1.4 2009/02/22 13:01:17 nelchael Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/mercurial.eclass,v 1.5 2009/03/09 20:09:24 nelchael Exp $
-# mercurial: Fetch sources from mercurial repositories, similar to cvs.eclass.
-# To use this from an ebuild, set EHG_REPO_URI in your ebuild. Then either
-# leave the default src_unpack or call mercurial_src_unpack.
+# @ECLASS: mercurial.eclass
+# @MAINTAINER:
+# nelchael@gentoo.org
+# @BLURB: This eclass provides generic mercurial fetching functions
+# @DESCRIPTION:
+# This eclass provides generic mercurial fetching functions. To fetch sources
+# from mercurial repository just set EHG_REPO_URI to correct repository URI. If
+# you need to share single repository between several ebuilds set EHG_PROJECT to
+# project name in all of them.
inherit eutils
EXPORT_FUNCTIONS src_unpack
-DEPEND="dev-util/mercurial net-misc/rsync"
-EHG_STORE_DIR="${PORTAGE_ACTUAL_DISTDIR-${DISTDIR}}/hg-src"
+DEPEND="dev-util/mercurial"
-# This must be set by the ebuild
-: ${EHG_REPO_URI:=} # repository uri
+# @ECLASS-VARIABLE: EHG_REPO_URI
+# @DESCRIPTION:
+# Mercurial repository URI.
+
+# @ECLASS-VARIABLE: EHG_REVISION
+# @DESCRIPTION:
+# Create working directory for specified revision, defaults to tip.
+[[ -z "${EHG_REVISION}" ]] && EHG_REVISION="tip"
+
+# @ECLASS-VARIABLE: EHG_PROJECT
+# @DESCRIPTION:
+# Project name.
+#
+# This variable default to $PN, but can be changed to allow repository sharing
+# between several ebuilds.
+[[ -z "${EHG_PROJECT}" ]] && EHG_PROJECT="${PN}"
+
+# @ECLASS-VARIABLE: EHG_CLONE_CMD
+# @DESCRIPTION:
+# Command used to perform initial repository clone.
+[[ -z "${EHG_CLONE_CMD}" ]] && EHG_CLONE_CMD="hg clone --quiet --pull --noupdate"
+
+# @ECLASS-VARIABLE: EHG_PULL_CMD
+# @DESCRIPTION:
+# Command used to update repository.
+[[ -z "${EHG_PULL_CMD}" ]] && EHG_PULL_CMD="hg pull --quiet"
+
+# @FUNCTION: mercurial_fetch
+# @USAGE: [repository_uri] [module]
+# @DESCRIPTION:
+# Clone or update repository.
+#
+# If not repository URI is passed it defaults to EHG_REPO_URI, if module is
+# empty it defaults to basename of EHG_REPO_URI.
+function mercurial_fetch {
+ debug-print-function ${FUNCNAME} ${*}
-# These can be set by the ebuild but are usually fine as-is
-: ${EHG_PROJECT:=$PN} # dir under EHG_STORE_DIR
-: ${EHG_CLONE_CMD:=hg clone --pull} # clone cmd
-: ${EHG_PULL_CMD:=hg pull -u} # pull cmd
+ EHG_REPO_URI=${1-${EHG_REPO_URI}}
+ [[ -z "${EHG_REPO_URI}" ]] && die "EHG_REPO_URI is empty"
-# should be set but blank to prevent using $HOME/.hgrc
-export HGRCPATH=
+ local hg_src_dir="${PORTAGE_ACTUAL_DISTDIR-${DISTDIR}}/hg-src"
+ local module="${2-$(basename "${EHG_REPO_URI}")}"
-function mercurial_fetch {
- declare repo=${1:-$EHG_REPO_URI}
- repo=${repo%/} # remove trailing slash
- [[ -n $repo ]] || die "EHG_REPO_URI is empty"
- declare module=${2:-${repo##*/}}
-
- if [[ ! -d ${EHG_STORE_DIR} ]]; then
- ebegin "create ${EHG_STORE_DIR}"
- addwrite / &&
- mkdir -p "${EHG_STORE_DIR}" &&
- chmod -f g+rw "${EHG_STORE_DIR}" &&
- export SANDBOX_WRITE="${SANDBOX_WRITE%:/}"
- eend $? || die
+ # Should be set but blank to prevent using $HOME/.hgrc
+ export HGRCPATH=
+
+ # Check ${hg_src_dir} directory:
+ addwrite "$(dirname "${hg_src_dir}")" || die "addwrite failed"
+ if [[ ! -d "${hg_src_dir}" ]]; then
+ mkdir -p "${hg_src_dir}" || die "failed to create ${hg_src_dir}"
+ chmod -f g+rw "${hg_src_dir}" || \
+ die "failed to chown ${hg_src_dir}"
fi
- pushd "${EHG_STORE_DIR}" >/dev/null \
- || die "can't chdir to ${EHG_STORE_DIR}"
- addwrite "$(pwd -P)"
-
- if [[ ! -d ${EHG_PROJECT}/${module} ]]; then
- # first check out
- ebegin "${EHG_CLONE_CMD} ${repo}"
- mkdir -p "${EHG_PROJECT}" &&
- chmod -f g+rw "${EHG_PROJECT}" &&
- cd "${EHG_PROJECT}" &&
- ${EHG_CLONE_CMD} "${repo}" "${module}" &&
- cd "${module}"
- eend $? || die
+ # Create project directory:
+ mkdir -p "${hg_src_dir}/${EHG_PROJECT}" || \
+ die "failed to create ${hg_src_dir}/${EHG_PROJECT}"
+ chmod -f g+rw "${hg_src_dir}/${EHG_PROJECT}" || \
+ die "failed to chwon ${EHG_PROJECT}"
+ cd "${hg_src_dir}/${EHG_PROJECT}" || \
+ die "failed to cd to ${hg_src_dir}/${EHG_PROJECT}"
+
+ # Clone/update repository:
+ if [[ ! -d "${module}" ]]; then
+ einfo "Cloning ${EHG_REPO_URI} to ${hg_src_dir}/${EHG_PROJECT}/${module}"
+ ${EHG_CLONE_CMD} "${EHG_REPO_URI}" "${module}" || {
+ rm -rf "${module}"
+ die "failed to clone ${EHG_REPO_URI}"
+ }
+ cd "${module}"
else
- # update working copy
- ebegin "${EHG_PULL_CMD} ${repo}"
- cd "${EHG_PROJECT}/${module}" &&
- ${EHG_PULL_CMD}
- case $? in
- # hg pull returns status 1 when there were no changes to pull
- 1) eend 0 ;;
- *) eend $? || die ;;
- esac
+ einfo "Updating ${hg_src_dir}/${EHG_PROJECT}/${module} from ${EHG_REPO_URI}"
+ cd "${module}" || die "failed to cd to ${module}"
+ ${EHG_PULL_CMD} || die "update failed"
fi
- # use rsync instead of cp for --exclude
- ebegin "rsync to ${WORKDIR}/${module}"
- mkdir -p "${WORKDIR}/${module}" &&
- rsync -a --delete --exclude=.hg/ . "${WORKDIR}/${module}"
- eend $? || die
-
- popd >/dev/null
+ # Checkout working copy:
+ einfo "Creating working directory in ${WORKDIR}/${module} (revision: ${EHG_REVISION})"
+ hg clone \
+ --quiet \
+ --rev="${EHG_REVISION}" \
+ "${hg_src_dir}/${EHG_PROJECT}/${module}" \
+ "${WORKDIR}/${module}" || die "hg archive failed"
}
+# @FUNCTION: mercurial_src_unpack
+# @DESCRIPTION:
+# The mercurial src_unpack function, which will be exported.
function mercurial_src_unpack {
mercurial_fetch
}
^ permalink raw reply [flat|nested] 13+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: mercurial.eclass
@ 2009-03-11 18:56 Krzysiek Pawlik (nelchael)
0 siblings, 0 replies; 13+ messages in thread
From: Krzysiek Pawlik (nelchael) @ 2009-03-11 18:56 UTC (permalink / raw
To: gentoo-commits
nelchael 09/03/11 18:56:28
Modified: mercurial.eclass
Log:
Fix die message.
Revision Changes Path
1.6 eclass/mercurial.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/mercurial.eclass?rev=1.6&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/mercurial.eclass?rev=1.6&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/mercurial.eclass?r1=1.5&r2=1.6
Index: mercurial.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/mercurial.eclass,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- mercurial.eclass 9 Mar 2009 20:09:24 -0000 1.5
+++ mercurial.eclass 11 Mar 2009 18:56:28 -0000 1.6
@@ -1,6 +1,6 @@
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/mercurial.eclass,v 1.5 2009/03/09 20:09:24 nelchael Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/mercurial.eclass,v 1.6 2009/03/11 18:56:28 nelchael Exp $
# @ECLASS: mercurial.eclass
# @MAINTAINER:
@@ -100,7 +100,7 @@
--quiet \
--rev="${EHG_REVISION}" \
"${hg_src_dir}/${EHG_PROJECT}/${module}" \
- "${WORKDIR}/${module}" || die "hg archive failed"
+ "${WORKDIR}/${module}" || die "hg clone failed"
}
# @FUNCTION: mercurial_src_unpack
^ permalink raw reply [flat|nested] 13+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: mercurial.eclass
@ 2009-09-29 21:51 Krzysiek Pawlik (nelchael)
0 siblings, 0 replies; 13+ messages in thread
From: Krzysiek Pawlik (nelchael) @ 2009-09-29 21:51 UTC (permalink / raw
To: gentoo-commits
nelchael 09/09/29 21:51:33
Modified: mercurial.eclass
Log:
Add support for ESCM_OFFLINE, see bug 280214.
Revision Changes Path
1.7 eclass/mercurial.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/mercurial.eclass?rev=1.7&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/mercurial.eclass?rev=1.7&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/mercurial.eclass?r1=1.6&r2=1.7
Index: mercurial.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/mercurial.eclass,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- mercurial.eclass 11 Mar 2009 18:56:28 -0000 1.6
+++ mercurial.eclass 29 Sep 2009 21:51:33 -0000 1.7
@@ -1,6 +1,6 @@
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/mercurial.eclass,v 1.6 2009/03/11 18:56:28 nelchael Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/mercurial.eclass,v 1.7 2009/09/29 21:51:33 nelchael Exp $
# @ECLASS: mercurial.eclass
# @MAINTAINER:
@@ -45,6 +45,13 @@
# Command used to update repository.
[[ -z "${EHG_PULL_CMD}" ]] && EHG_PULL_CMD="hg pull --quiet"
+# @ECLASS-VARIABLE: EHG_OFFLINE
+# @DESCRIPTION:
+# Set this variable to a non-empty value to disable the automatic updating of
+# a mercurial source tree. This is intended to be set outside the ebuild by
+# users.
+EHG_OFFLINE="${EHG_OFFLINE:-${ESCM_OFFLINE}}"
+
# @FUNCTION: mercurial_fetch
# @USAGE: [repository_uri] [module]
# @DESCRIPTION:
@@ -88,7 +95,7 @@
die "failed to clone ${EHG_REPO_URI}"
}
cd "${module}"
- else
+ elif [[ -z "${EHG_OFFLINE}" ]]; then
einfo "Updating ${hg_src_dir}/${EHG_PROJECT}/${module} from ${EHG_REPO_URI}"
cd "${module}" || die "failed to cd to ${module}"
${EHG_PULL_CMD} || die "update failed"
^ permalink raw reply [flat|nested] 13+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: mercurial.eclass
@ 2009-12-11 21:02 Robin H. Johnson (robbat2)
0 siblings, 0 replies; 13+ messages in thread
From: Robin H. Johnson (robbat2) @ 2009-12-11 21:02 UTC (permalink / raw
To: gentoo-commits
robbat2 09/12/11 21:02:29
Modified: mercurial.eclass
Log:
Implement EHG_QUIET similar to EGIT_QUIET if you need more Mercurial output to see why a clone or pull is doing or failing.
Revision Changes Path
1.8 eclass/mercurial.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/mercurial.eclass?rev=1.8&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/mercurial.eclass?rev=1.8&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/mercurial.eclass?r1=1.7&r2=1.8
Index: mercurial.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/mercurial.eclass,v
retrieving revision 1.7
retrieving revision 1.8
diff -p -w -b -B -u -u -r1.7 -r1.8
--- mercurial.eclass 29 Sep 2009 21:51:33 -0000 1.7
+++ mercurial.eclass 11 Dec 2009 21:02:29 -0000 1.8
@@ -1,6 +1,6 @@
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/mercurial.eclass,v 1.7 2009/09/29 21:51:33 nelchael Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/mercurial.eclass,v 1.8 2009/12/11 21:02:29 robbat2 Exp $
# @ECLASS: mercurial.eclass
# @MAINTAINER:
@@ -35,15 +35,21 @@ DEPEND="dev-util/mercurial"
# between several ebuilds.
[[ -z "${EHG_PROJECT}" ]] && EHG_PROJECT="${PN}"
+# @ECLASS-VARIABLE: EHG_QUIET
+# @DESCRIPTION:
+# Suppress some extra noise from mercurial, set it to 'OFF' to be louder.
+: ${EHG_QUIET:="ON"}
+[[ "${EHG_QUIET}" == "ON" ]] && EHG_QUIET_CMD_OPT="--quiet"
+
# @ECLASS-VARIABLE: EHG_CLONE_CMD
# @DESCRIPTION:
# Command used to perform initial repository clone.
-[[ -z "${EHG_CLONE_CMD}" ]] && EHG_CLONE_CMD="hg clone --quiet --pull --noupdate"
+[[ -z "${EHG_CLONE_CMD}" ]] && EHG_CLONE_CMD="hg clone ${EHG_QUIET_CMD_OPT} --pull --noupdate"
# @ECLASS-VARIABLE: EHG_PULL_CMD
# @DESCRIPTION:
# Command used to update repository.
-[[ -z "${EHG_PULL_CMD}" ]] && EHG_PULL_CMD="hg pull --quiet"
+[[ -z "${EHG_PULL_CMD}" ]] && EHG_PULL_CMD="hg pull ${EHG_QUIET_CMD_OPT}"
# @ECLASS-VARIABLE: EHG_OFFLINE
# @DESCRIPTION:
@@ -104,7 +110,7 @@ function mercurial_fetch {
# Checkout working copy:
einfo "Creating working directory in ${WORKDIR}/${module} (revision: ${EHG_REVISION})"
hg clone \
- --quiet \
+ ${EHG_QUIET_CMD_OPT} \
--rev="${EHG_REVISION}" \
"${hg_src_dir}/${EHG_PROJECT}/${module}" \
"${WORKDIR}/${module}" || die "hg clone failed"
^ permalink raw reply [flat|nested] 13+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: mercurial.eclass
@ 2010-01-17 11:21 Krzysiek Pawlik (nelchael)
0 siblings, 0 replies; 13+ messages in thread
From: Krzysiek Pawlik (nelchael) @ 2010-01-17 11:21 UTC (permalink / raw
To: gentoo-commits
nelchael 10/01/17 11:21:12
Modified: mercurial.eclass
Log:
Mention hg help revisions in description of EHG_REVISION, see bug #300969.
Revision Changes Path
1.9 eclass/mercurial.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/mercurial.eclass?rev=1.9&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/mercurial.eclass?rev=1.9&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/mercurial.eclass?r1=1.8&r2=1.9
Index: mercurial.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/mercurial.eclass,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- mercurial.eclass 11 Dec 2009 21:02:29 -0000 1.8
+++ mercurial.eclass 17 Jan 2010 11:21:12 -0000 1.9
@@ -1,6 +1,6 @@
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/mercurial.eclass,v 1.8 2009/12/11 21:02:29 robbat2 Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/mercurial.eclass,v 1.9 2010/01/17 11:21:12 nelchael Exp $
# @ECLASS: mercurial.eclass
# @MAINTAINER:
@@ -25,6 +25,9 @@
# @ECLASS-VARIABLE: EHG_REVISION
# @DESCRIPTION:
# Create working directory for specified revision, defaults to tip.
+#
+# EHG_REVISION is passed as a value for --rev parameter, so it can be more than
+# just a revision, please consult `hg help revisions' for more details.
[[ -z "${EHG_REVISION}" ]] && EHG_REVISION="tip"
# @ECLASS-VARIABLE: EHG_PROJECT
^ permalink raw reply [flat|nested] 13+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: mercurial.eclass
@ 2010-01-17 12:03 Krzysiek Pawlik (nelchael)
0 siblings, 0 replies; 13+ messages in thread
From: Krzysiek Pawlik (nelchael) @ 2010-01-17 12:03 UTC (permalink / raw
To: gentoo-commits
nelchael 10/01/17 12:03:49
Modified: mercurial.eclass
Log:
chmod is not critical, so do not die if it fails.
Revision Changes Path
1.10 eclass/mercurial.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/mercurial.eclass?rev=1.10&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/mercurial.eclass?rev=1.10&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/mercurial.eclass?r1=1.9&r2=1.10
Index: mercurial.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/mercurial.eclass,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- mercurial.eclass 17 Jan 2010 11:21:12 -0000 1.9
+++ mercurial.eclass 17 Jan 2010 12:03:48 -0000 1.10
@@ -1,6 +1,6 @@
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/mercurial.eclass,v 1.9 2010/01/17 11:21:12 nelchael Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/mercurial.eclass,v 1.10 2010/01/17 12:03:48 nelchael Exp $
# @ECLASS: mercurial.eclass
# @MAINTAINER:
@@ -92,7 +92,7 @@
mkdir -p "${hg_src_dir}/${EHG_PROJECT}" || \
die "failed to create ${hg_src_dir}/${EHG_PROJECT}"
chmod -f g+rw "${hg_src_dir}/${EHG_PROJECT}" || \
- die "failed to chwon ${EHG_PROJECT}"
+ echo "Warning: failed to chmod g+rw ${EHG_PROJECT}"
cd "${hg_src_dir}/${EHG_PROJECT}" || \
die "failed to cd to ${hg_src_dir}/${EHG_PROJECT}"
^ permalink raw reply [flat|nested] 13+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: mercurial.eclass
@ 2010-03-06 12:24 Dirkjan Ochtman (djc)
0 siblings, 0 replies; 13+ messages in thread
From: Dirkjan Ochtman (djc) @ 2010-03-06 12:24 UTC (permalink / raw
To: gentoo-commits
djc 10/03/06 12:24:05
Modified: mercurial.eclass
Log:
Move mercurial.eclass dep from dev-util to dev-vcs.
Revision Changes Path
1.11 eclass/mercurial.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/mercurial.eclass?rev=1.11&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/mercurial.eclass?rev=1.11&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/mercurial.eclass?r1=1.10&r2=1.11
Index: mercurial.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/mercurial.eclass,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- mercurial.eclass 17 Jan 2010 12:03:48 -0000 1.10
+++ mercurial.eclass 6 Mar 2010 12:24:05 -0000 1.11
@@ -1,6 +1,6 @@
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/mercurial.eclass,v 1.10 2010/01/17 12:03:48 nelchael Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/mercurial.eclass,v 1.11 2010/03/06 12:24:05 djc Exp $
# @ECLASS: mercurial.eclass
# @MAINTAINER:
@@ -16,7 +16,7 @@
EXPORT_FUNCTIONS src_unpack
-DEPEND="dev-util/mercurial"
+DEPEND="dev-vcs/mercurial"
# @ECLASS-VARIABLE: EHG_REPO_URI
# @DESCRIPTION:
^ permalink raw reply [flat|nested] 13+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: mercurial.eclass
@ 2010-04-02 18:29 Krzysztof Pawlik (nelchael)
0 siblings, 0 replies; 13+ messages in thread
From: Krzysztof Pawlik (nelchael) @ 2010-04-02 18:29 UTC (permalink / raw
To: gentoo-commits
nelchael 10/04/02 18:29:39
Modified: mercurial.eclass
Log:
Allow changing store directory, update maintainers.
Revision Changes Path
1.12 eclass/mercurial.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/mercurial.eclass?rev=1.12&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/mercurial.eclass?rev=1.12&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/mercurial.eclass?r1=1.11&r2=1.12
Index: mercurial.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/mercurial.eclass,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- mercurial.eclass 6 Mar 2010 12:24:05 -0000 1.11
+++ mercurial.eclass 2 Apr 2010 18:29:39 -0000 1.12
@@ -1,10 +1,11 @@
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/mercurial.eclass,v 1.11 2010/03/06 12:24:05 djc Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/mercurial.eclass,v 1.12 2010/04/02 18:29:39 nelchael Exp $
# @ECLASS: mercurial.eclass
# @MAINTAINER:
-# nelchael@gentoo.org
+# Krzysztof Pawlik <nelchael@gentoo.org>
+# Dirkjan Ochtman <djc@gentoo.org>
# @BLURB: This eclass provides generic mercurial fetching functions
# @DESCRIPTION:
# This eclass provides generic mercurial fetching functions. To fetch sources
@@ -30,6 +31,11 @@
# just a revision, please consult `hg help revisions' for more details.
[[ -z "${EHG_REVISION}" ]] && EHG_REVISION="tip"
+# @ECLASS-VARIABLE: EHG_STORE_DIR
+# @DESCRIPTION:
+# Mercurial sources store directory. Users may override this in /etc/make.conf
+[[ -z "${EHG_STORE_DIR}" ]] && EHG_STORE_DIR="${PORTAGE_ACTUAL_DISTDIR:-${DISTDIR}}/hg-src"
+
# @ECLASS-VARIABLE: EHG_PROJECT
# @DESCRIPTION:
# Project name.
@@ -74,38 +80,37 @@
EHG_REPO_URI=${1-${EHG_REPO_URI}}
[[ -z "${EHG_REPO_URI}" ]] && die "EHG_REPO_URI is empty"
- local hg_src_dir="${PORTAGE_ACTUAL_DISTDIR-${DISTDIR}}/hg-src"
local module="${2-$(basename "${EHG_REPO_URI}")}"
# Should be set but blank to prevent using $HOME/.hgrc
export HGRCPATH=
- # Check ${hg_src_dir} directory:
- addwrite "$(dirname "${hg_src_dir}")" || die "addwrite failed"
- if [[ ! -d "${hg_src_dir}" ]]; then
- mkdir -p "${hg_src_dir}" || die "failed to create ${hg_src_dir}"
- chmod -f g+rw "${hg_src_dir}" || \
- die "failed to chown ${hg_src_dir}"
+ # Check ${EHG_STORE_DIR} directory:
+ addwrite "$(dirname "${EHG_STORE_DIR}")" || die "addwrite failed"
+ if [[ ! -d "${EHG_STORE_DIR}" ]]; then
+ mkdir -p "${EHG_STORE_DIR}" || die "failed to create ${EHG_STORE_DIR}"
+ chmod -f g+rw "${EHG_STORE_DIR}" || \
+ die "failed to chown ${EHG_STORE_DIR}"
fi
# Create project directory:
- mkdir -p "${hg_src_dir}/${EHG_PROJECT}" || \
- die "failed to create ${hg_src_dir}/${EHG_PROJECT}"
- chmod -f g+rw "${hg_src_dir}/${EHG_PROJECT}" || \
+ mkdir -p "${EHG_STORE_DIR}/${EHG_PROJECT}" || \
+ die "failed to create ${EHG_STORE_DIR}/${EHG_PROJECT}"
+ chmod -f g+rw "${EHG_STORE_DIR}/${EHG_PROJECT}" || \
echo "Warning: failed to chmod g+rw ${EHG_PROJECT}"
- cd "${hg_src_dir}/${EHG_PROJECT}" || \
- die "failed to cd to ${hg_src_dir}/${EHG_PROJECT}"
+ cd "${EHG_STORE_DIR}/${EHG_PROJECT}" || \
+ die "failed to cd to ${EHG_STORE_DIR}/${EHG_PROJECT}"
# Clone/update repository:
if [[ ! -d "${module}" ]]; then
- einfo "Cloning ${EHG_REPO_URI} to ${hg_src_dir}/${EHG_PROJECT}/${module}"
+ einfo "Cloning ${EHG_REPO_URI} to ${EHG_STORE_DIR}/${EHG_PROJECT}/${module}"
${EHG_CLONE_CMD} "${EHG_REPO_URI}" "${module}" || {
rm -rf "${module}"
die "failed to clone ${EHG_REPO_URI}"
}
cd "${module}"
elif [[ -z "${EHG_OFFLINE}" ]]; then
- einfo "Updating ${hg_src_dir}/${EHG_PROJECT}/${module} from ${EHG_REPO_URI}"
+ einfo "Updating ${EHG_STORE_DIR}/${EHG_PROJECT}/${module} from ${EHG_REPO_URI}"
cd "${module}" || die "failed to cd to ${module}"
${EHG_PULL_CMD} || die "update failed"
fi
@@ -115,7 +120,7 @@
hg clone \
${EHG_QUIET_CMD_OPT} \
--rev="${EHG_REVISION}" \
- "${hg_src_dir}/${EHG_PROJECT}/${module}" \
+ "${EHG_STORE_DIR}/${EHG_PROJECT}/${module}" \
"${WORKDIR}/${module}" || die "hg clone failed"
}
^ permalink raw reply [flat|nested] 13+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: mercurial.eclass
@ 2010-08-24 16:49 Robin H. Johnson,,, (robbat2)
0 siblings, 0 replies; 13+ messages in thread
From: Robin H. Johnson,,, (robbat2) @ 2010-08-24 16:49 UTC (permalink / raw
To: gentoo-commits
robbat2 10/08/24 16:49:18
Modified: mercurial.eclass
Log:
Include Hg revision info in the einfo output for Hg live builds, to allow reproducability.
Revision Changes Path
1.13 eclass/mercurial.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/mercurial.eclass?rev=1.13&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/mercurial.eclass?rev=1.13&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/mercurial.eclass?r1=1.12&r2=1.13
Index: mercurial.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/mercurial.eclass,v
retrieving revision 1.12
retrieving revision 1.13
diff -p -w -b -B -u -u -r1.12 -r1.13
--- mercurial.eclass 2 Apr 2010 18:29:39 -0000 1.12
+++ mercurial.eclass 24 Aug 2010 16:49:18 -0000 1.13
@@ -1,6 +1,6 @@
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/mercurial.eclass,v 1.12 2010/04/02 18:29:39 nelchael Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/mercurial.eclass,v 1.13 2010/08/24 16:49:18 robbat2 Exp $
# @ECLASS: mercurial.eclass
# @MAINTAINER:
@@ -116,12 +116,19 @@ function mercurial_fetch {
fi
# Checkout working copy:
- einfo "Creating working directory in ${WORKDIR}/${module} (revision: ${EHG_REVISION})"
+ einfo "Creating working directory in ${WORKDIR}/${module} (target revision: ${EHG_REVISION})"
hg clone \
${EHG_QUIET_CMD_OPT} \
--rev="${EHG_REVISION}" \
"${EHG_STORE_DIR}/${EHG_PROJECT}/${module}" \
"${WORKDIR}/${module}" || die "hg clone failed"
+ # An exact revision helps a lot for testing purposes, so have some output...
+ # id num branch
+ # fd6e32d61721 6276 default
+ local HG_REVDATA=($(hg identify -b -i "${WORKDIR}/${module}"))
+ local HG_REV_ID=${HG_REVDATA[0]}
+ local HG_REV_BRANCH=${HG_REVDATA[1]}
+ einfo "Work directory: ${WORKDIR}/${module} global id: ${HG_REV_ID} branch: ${HG_REV_BRANCH}"
}
# @FUNCTION: mercurial_src_unpack
^ permalink raw reply [flat|nested] 13+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: mercurial.eclass
@ 2010-10-26 19:04 Krzysztof Pawlik (nelchael)
0 siblings, 0 replies; 13+ messages in thread
From: Krzysztof Pawlik (nelchael) @ 2010-10-26 19:04 UTC (permalink / raw
To: gentoo-commits
nelchael 10/10/26 19:04:44
Modified: mercurial.eclass
Log:
Export HG_REV_ID, see bug #339920.
Revision Changes Path
1.14 eclass/mercurial.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/mercurial.eclass?rev=1.14&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/mercurial.eclass?rev=1.14&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/mercurial.eclass?r1=1.13&r2=1.14
Index: mercurial.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/mercurial.eclass,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- mercurial.eclass 24 Aug 2010 16:49:18 -0000 1.13
+++ mercurial.eclass 26 Oct 2010 19:04:44 -0000 1.14
@@ -1,6 +1,6 @@
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/mercurial.eclass,v 1.13 2010/08/24 16:49:18 robbat2 Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/mercurial.eclass,v 1.14 2010/10/26 19:04:44 nelchael Exp $
# @ECLASS: mercurial.eclass
# @MAINTAINER:
@@ -126,7 +126,7 @@
# id num branch
# fd6e32d61721 6276 default
local HG_REVDATA=($(hg identify -b -i "${WORKDIR}/${module}"))
- local HG_REV_ID=${HG_REVDATA[0]}
+ export HG_REV_ID=${HG_REVDATA[0]}
local HG_REV_BRANCH=${HG_REVDATA[1]}
einfo "Work directory: ${WORKDIR}/${module} global id: ${HG_REV_ID} branch: ${HG_REV_BRANCH}"
}
^ permalink raw reply [flat|nested] 13+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: mercurial.eclass
@ 2010-11-17 18:42 Krzysztof Pawlik (nelchael)
0 siblings, 0 replies; 13+ messages in thread
From: Krzysztof Pawlik (nelchael) @ 2010-11-17 18:42 UTC (permalink / raw
To: gentoo-commits
nelchael 10/11/17 18:42:04
Modified: mercurial.eclass
Log:
Bug 343993: use ${S} for working directory.
Revision Changes Path
1.15 eclass/mercurial.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/mercurial.eclass?rev=1.15&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/mercurial.eclass?rev=1.15&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/mercurial.eclass?r1=1.14&r2=1.15
Index: mercurial.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/mercurial.eclass,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- mercurial.eclass 26 Oct 2010 19:04:44 -0000 1.14
+++ mercurial.eclass 17 Nov 2010 18:42:03 -0000 1.15
@@ -1,6 +1,6 @@
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/mercurial.eclass,v 1.14 2010/10/26 19:04:44 nelchael Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/mercurial.eclass,v 1.15 2010/11/17 18:42:03 nelchael Exp $
# @ECLASS: mercurial.eclass
# @MAINTAINER:
@@ -68,12 +68,12 @@
EHG_OFFLINE="${EHG_OFFLINE:-${ESCM_OFFLINE}}"
# @FUNCTION: mercurial_fetch
-# @USAGE: [repository_uri] [module]
+# @USAGE: [repository_uri] [module] [sourcedir]
# @DESCRIPTION:
# Clone or update repository.
#
-# If not repository URI is passed it defaults to EHG_REPO_URI, if module is
-# empty it defaults to basename of EHG_REPO_URI.
+# If repository URI is not passed it defaults to EHG_REPO_URI, if module is
+# empty it defaults to basename of EHG_REPO_URI, sourcedir defaults to S.
function mercurial_fetch {
debug-print-function ${FUNCNAME} ${*}
@@ -81,6 +81,7 @@
[[ -z "${EHG_REPO_URI}" ]] && die "EHG_REPO_URI is empty"
local module="${2-$(basename "${EHG_REPO_URI}")}"
+ local sourcedir="${3-${S}}"
# Should be set but blank to prevent using $HOME/.hgrc
export HGRCPATH=
@@ -116,19 +117,19 @@
fi
# Checkout working copy:
- einfo "Creating working directory in ${WORKDIR}/${module} (target revision: ${EHG_REVISION})"
+ einfo "Creating working directory in ${sourcedir} (target revision: ${EHG_REVISION})"
hg clone \
${EHG_QUIET_CMD_OPT} \
--rev="${EHG_REVISION}" \
"${EHG_STORE_DIR}/${EHG_PROJECT}/${module}" \
- "${WORKDIR}/${module}" || die "hg clone failed"
+ "${sourcedir}" || die "hg clone failed"
# An exact revision helps a lot for testing purposes, so have some output...
# id num branch
# fd6e32d61721 6276 default
- local HG_REVDATA=($(hg identify -b -i "${WORKDIR}/${module}"))
+ local HG_REVDATA=($(hg identify -b -i "${sourcedir}"))
export HG_REV_ID=${HG_REVDATA[0]}
local HG_REV_BRANCH=${HG_REVDATA[1]}
- einfo "Work directory: ${WORKDIR}/${module} global id: ${HG_REV_ID} branch: ${HG_REV_BRANCH}"
+ einfo "Work directory: ${sourcedir} global id: ${HG_REV_ID} branch: ${HG_REV_BRANCH}"
}
# @FUNCTION: mercurial_src_unpack
^ permalink raw reply [flat|nested] 13+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: mercurial.eclass
@ 2011-08-03 19:01 Krzysztof Pawlik (nelchael)
0 siblings, 0 replies; 13+ messages in thread
From: Krzysztof Pawlik (nelchael) @ 2011-08-03 19:01 UTC (permalink / raw
To: gentoo-commits
nelchael 11/08/03 19:01:16
Modified: mercurial.eclass
Log:
Use --updaterev instead of --rev, thanks to Michał Górny (mgorny@gentoo.org), see bug #367481.
Revision Changes Path
1.16 eclass/mercurial.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/mercurial.eclass?rev=1.16&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/mercurial.eclass?rev=1.16&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/mercurial.eclass?r1=1.15&r2=1.16
Index: mercurial.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/mercurial.eclass,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- mercurial.eclass 17 Nov 2010 18:42:03 -0000 1.15
+++ mercurial.eclass 3 Aug 2011 19:01:16 -0000 1.16
@@ -1,6 +1,6 @@
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/mercurial.eclass,v 1.15 2010/11/17 18:42:03 nelchael Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/mercurial.eclass,v 1.16 2011/08/03 19:01:16 nelchael Exp $
# @ECLASS: mercurial.eclass
# @MAINTAINER:
@@ -27,8 +27,8 @@
# @DESCRIPTION:
# Create working directory for specified revision, defaults to tip.
#
-# EHG_REVISION is passed as a value for --rev parameter, so it can be more than
-# just a revision, please consult `hg help revisions' for more details.
+# EHG_REVISION is passed as a value for --updaterev parameter, so it can be more
+# than just a revision, please consult `hg help revisions' for more details.
[[ -z "${EHG_REVISION}" ]] && EHG_REVISION="tip"
# @ECLASS-VARIABLE: EHG_STORE_DIR
@@ -120,7 +120,7 @@
einfo "Creating working directory in ${sourcedir} (target revision: ${EHG_REVISION})"
hg clone \
${EHG_QUIET_CMD_OPT} \
- --rev="${EHG_REVISION}" \
+ --updaterev="${EHG_REVISION}" \
"${EHG_STORE_DIR}/${EHG_PROJECT}/${module}" \
"${sourcedir}" || die "hg clone failed"
# An exact revision helps a lot for testing purposes, so have some output...
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2011-08-03 19:01 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-17 11:21 [gentoo-commits] gentoo-x86 commit in eclass: mercurial.eclass Krzysiek Pawlik (nelchael)
-- strict thread matches above, loose matches on Subject: below --
2011-08-03 19:01 Krzysztof Pawlik (nelchael)
2010-11-17 18:42 Krzysztof Pawlik (nelchael)
2010-10-26 19:04 Krzysztof Pawlik (nelchael)
2010-08-24 16:49 Robin H. Johnson,,, (robbat2)
2010-04-02 18:29 Krzysztof Pawlik (nelchael)
2010-03-06 12:24 Dirkjan Ochtman (djc)
2010-01-17 12:03 Krzysiek Pawlik (nelchael)
2009-12-11 21:02 Robin H. Johnson (robbat2)
2009-09-29 21:51 Krzysiek Pawlik (nelchael)
2009-03-11 18:56 Krzysiek Pawlik (nelchael)
2009-03-09 20:09 Krzysiek Pawlik (nelchael)
2009-02-22 13:01 Krzysiek Pawlik (nelchael)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox