Skip to content
Snippets Groups Projects
Commit a023c03f authored by Pierre-Yves David's avatar Pierre-Yves David :octopus:
Browse files

caches: extract repository listing in a function

This will be helpful to make sure everything use the same listing and order.
parent c9a6f251
No related branches found
No related tags found
No related merge requests found
......@@ -70,7 +70,7 @@
# of repositories used in scm-perf. This can adds up to a couple of minutes.
warmcache () {
r="`dirname $1`"
r="$1"
starttime=`date +%s`
echo checking caches for: "$r"
# dropping HGRC to avoid user extension interfering
......@@ -79,7 +79,13 @@
echo " checked caches in `expr $endtime - $starttime` seconds"
}
listrepos () {
for r in repos/*/.hg repos/partial-references/*/.hg; do
echo "`dirname $r`"
done
}
if [ "$SCMPERF_WARMCACHE" != "skip" ] ; then
echo "Warming caches for all repos"
echo "(use SCMPERF_WARMCACHE=skip to skip it)"
starttime=`date +%s`
......@@ -82,8 +88,8 @@
if [ "$SCMPERF_WARMCACHE" != "skip" ] ; then
echo "Warming caches for all repos"
echo "(use SCMPERF_WARMCACHE=skip to skip it)"
starttime=`date +%s`
for r in repos/*/.hg repos/partial-references/*/.hg; do
for r in `listrepos`; do
warmcache $r
done
endtime=`date +%s`
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment