summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Junghans <ottxor@gentoo.org>2015-12-20 13:45:53 -0700
committerChristoph Junghans <ottxor@gentoo.org>2015-12-20 13:48:20 -0700
commit74f28291906447d61a67d182322d4a5d031a3c0d (patch)
treef0f398cb539396ed2a8f4c4df1ae8f1ba92e5bdc /eclass/mercurial.eclass
parentapp-portage/gentoolkit: Fix TypeError in setup.py with python3 (diff)
downloadgentoo-74f28291906447d61a67d182322d4a5d031a3c0d.tar.gz
gentoo-74f28291906447d61a67d182322d4a5d031a3c0d.tar.bz2
gentoo-74f28291906447d61a67d182322d4a5d031a3c0d.zip
mercurial.eclass: leave unchanged working dir
Gentoo-bug: 568892
Diffstat (limited to 'eclass/mercurial.eclass')
-rw-r--r--eclass/mercurial.eclass7
1 files changed, 4 insertions, 3 deletions
diff --git a/eclass/mercurial.eclass b/eclass/mercurial.eclass
index f58335a4ce75..bf85aaab6395 100644
--- a/eclass/mercurial.eclass
+++ b/eclass/mercurial.eclass
@@ -112,7 +112,7 @@ mercurial_fetch() {
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 "${EHG_STORE_DIR}/${EHG_PROJECT}" || \
+ pushd "${EHG_STORE_DIR}/${EHG_PROJECT}" > /dev/null || \
die "failed to cd to ${EHG_STORE_DIR}/${EHG_PROJECT}"
# Clone/update repository:
@@ -122,12 +122,13 @@ mercurial_fetch() {
rm -rf "${module}"
die "failed to clone ${EHG_REPO_URI}"
}
- cd "${module}"
elif [[ -z "${EHG_OFFLINE}" ]]; then
einfo "Updating ${EHG_STORE_DIR}/${EHG_PROJECT}/${module} from ${EHG_REPO_URI}"
- cd "${module}" || die "failed to cd to ${module}"
+ pushd "${module}" > /dev/null || die "failed to cd to ${module}"
${EHG_PULL_CMD} "${EHG_REPO_URI}" || die "update failed"
+ popd > /dev/null || die
fi
+ popd > /dev/null || die
# Checkout working copy:
einfo "Creating working directory in ${sourcedir} (target revision: ${EHG_REVISION})"