1 |
commit: 74f28291906447d61a67d182322d4a5d031a3c0d |
2 |
Author: Christoph Junghans <ottxor <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Dec 20 20:45:53 2015 +0000 |
4 |
Commit: Christoph Junghans <ottxor <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Dec 20 20:48:20 2015 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=74f28291 |
7 |
|
8 |
mercurial.eclass: leave unchanged working dir |
9 |
|
10 |
Gentoo-bug: 568892 |
11 |
|
12 |
eclass/mercurial.eclass | 7 ++++--- |
13 |
1 file changed, 4 insertions(+), 3 deletions(-) |
14 |
|
15 |
diff --git a/eclass/mercurial.eclass b/eclass/mercurial.eclass |
16 |
index f58335a..bf85aaa 100644 |
17 |
--- a/eclass/mercurial.eclass |
18 |
+++ b/eclass/mercurial.eclass |
19 |
@@ -112,7 +112,7 @@ mercurial_fetch() { |
20 |
die "failed to create ${EHG_STORE_DIR}/${EHG_PROJECT}" |
21 |
chmod -f g+rw "${EHG_STORE_DIR}/${EHG_PROJECT}" || \ |
22 |
echo "Warning: failed to chmod g+rw ${EHG_PROJECT}" |
23 |
- cd "${EHG_STORE_DIR}/${EHG_PROJECT}" || \ |
24 |
+ pushd "${EHG_STORE_DIR}/${EHG_PROJECT}" > /dev/null || \ |
25 |
die "failed to cd to ${EHG_STORE_DIR}/${EHG_PROJECT}" |
26 |
|
27 |
# Clone/update repository: |
28 |
@@ -122,12 +122,13 @@ mercurial_fetch() { |
29 |
rm -rf "${module}" |
30 |
die "failed to clone ${EHG_REPO_URI}" |
31 |
} |
32 |
- cd "${module}" |
33 |
elif [[ -z "${EHG_OFFLINE}" ]]; then |
34 |
einfo "Updating ${EHG_STORE_DIR}/${EHG_PROJECT}/${module} from ${EHG_REPO_URI}" |
35 |
- cd "${module}" || die "failed to cd to ${module}" |
36 |
+ pushd "${module}" > /dev/null || die "failed to cd to ${module}" |
37 |
${EHG_PULL_CMD} "${EHG_REPO_URI}" || die "update failed" |
38 |
+ popd > /dev/null || die |
39 |
fi |
40 |
+ popd > /dev/null || die |
41 |
|
42 |
# Checkout working copy: |
43 |
einfo "Creating working directory in ${sourcedir} (target revision: ${EHG_REVISION})" |