1 |
commit: ff7ab2347b054f1f621f13036309be2d4cb020b2 |
2 |
Author: Christoph Junghans <junghans <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Feb 12 17:50:10 2017 +0000 |
4 |
Commit: Christoph Junghans <junghans <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun May 6 13:13:42 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ff7ab234 |
7 |
|
8 |
mercurial.eclass: add EHG_CONFIG (bug #608974) |
9 |
|
10 |
Closes: https://bugs.gentoo.org/608974 |
11 |
|
12 |
eclass/mercurial.eclass | 9 +++++++-- |
13 |
1 file changed, 7 insertions(+), 2 deletions(-) |
14 |
|
15 |
diff --git a/eclass/mercurial.eclass b/eclass/mercurial.eclass |
16 |
index ad3102b7590..9a5bd191c23 100644 |
17 |
--- a/eclass/mercurial.eclass |
18 |
+++ b/eclass/mercurial.eclass |
19 |
@@ -57,15 +57,19 @@ DEPEND="dev-vcs/mercurial" |
20 |
: ${EHG_QUIET:="OFF"} |
21 |
[[ "${EHG_QUIET}" == "ON" ]] && EHG_QUIET_CMD_OPT="--quiet" |
22 |
|
23 |
+# @ECLASS-VARIABLE: EHG_CONFIG |
24 |
+# @DESCRIPTION: |
25 |
+# Extra config option to hand to hg clone/pull |
26 |
+ |
27 |
# @ECLASS-VARIABLE: EHG_CLONE_CMD |
28 |
# @DESCRIPTION: |
29 |
# Command used to perform initial repository clone. |
30 |
-[[ -z "${EHG_CLONE_CMD}" ]] && EHG_CLONE_CMD="hg clone ${EHG_QUIET_CMD_OPT} --pull --noupdate" |
31 |
+[[ -z "${EHG_CLONE_CMD}" ]] && EHG_CLONE_CMD="hg clone ${EHG_CONFIG:+--config ${EHG_CONFIG}} ${EHG_QUIET_CMD_OPT} --pull --noupdate" |
32 |
|
33 |
# @ECLASS-VARIABLE: EHG_PULL_CMD |
34 |
# @DESCRIPTION: |
35 |
# Command used to update repository. |
36 |
-[[ -z "${EHG_PULL_CMD}" ]] && EHG_PULL_CMD="hg pull ${EHG_QUIET_CMD_OPT}" |
37 |
+[[ -z "${EHG_PULL_CMD}" ]] && EHG_PULL_CMD="hg pull ${EHG_CONFIG:+--config ${EHG_CONFIG}} ${EHG_QUIET_CMD_OPT}" |
38 |
|
39 |
# @ECLASS-VARIABLE: EHG_OFFLINE |
40 |
# @DESCRIPTION: |
41 |
@@ -134,6 +138,7 @@ mercurial_fetch() { |
42 |
hg clone \ |
43 |
${EHG_QUIET_CMD_OPT} \ |
44 |
--updaterev="${EHG_REVISION}" \ |
45 |
+ ${EHG_CONFIG:+--config ${EHG_CONFIG}} \ |
46 |
"${EHG_STORE_DIR}/${EHG_PROJECT}/${module}" \ |
47 |
"${sourcedir}" || die "hg clone failed" |
48 |
# An exact revision helps a lot for testing purposes, so have some output... |