Mercurial > hg
comparison contrib/perf-utils/discovery-helper.sh @ 41926:cb6c9d41a23e
discovery-helper: move repository creation in a function
This makes it easier to update this duplicated code.
(we do a small output fix as we go)
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Sun, 10 Mar 2019 18:50:38 +0100 |
parents | 4f283b7dac44 |
children | a60e9f163595 |
comparison
equal
deleted
inserted
replaced
41925:4f283b7dac44 | 41926:cb6c9d41a23e |
---|---|
79 fi | 79 fi |
80 if [ $doright -eq 1 ]; then | 80 if [ $doright -eq 1 ]; then |
81 echo '# right revset:' '"'${rightsubset}'"' | 81 echo '# right revset:' '"'${rightsubset}'"' |
82 fi | 82 fi |
83 | 83 |
84 buildone() { | |
85 side=$1 | |
86 dest=$2 | |
87 revset=$3 | |
88 echo "### building $side repository: $dest" | |
89 echo '# cloning' | |
90 hg clone --noupdate "${repo}" "${dest}" | |
91 echo '# stripping' '"'${revset}'"' | |
92 hg -R "${dest}" --config extensions.strip= strip --rev "$revset" --no-backup | |
93 } | |
94 | |
84 if [ $doleft -eq 1 ]; then | 95 if [ $doleft -eq 1 ]; then |
85 echo '### building left repository:' $left-repo | 96 buildone left $leftrepo $leftsubset |
86 echo '# cloning' | |
87 hg clone --noupdate "${repo}" "${leftrepo}" | |
88 echo '# stripping' '"'${leftsubset}'"' | |
89 hg -R "${leftrepo}" --config extensions.strip= strip --rev "$leftsubset" --no-backup | |
90 fi | 97 fi |
91 | 98 |
92 if [ $doright -eq 1 ]; then | 99 if [ $doright -eq 1 ]; then |
93 echo '### building right repository:' $right-repo | 100 buildone right $rightrepo $rightsubset |
94 echo '# cloning' | |
95 hg clone --noupdate "${repo}" "${rightrepo}" | |
96 echo '# stripping:' '"'${rightsubset}'"' | |
97 hg -R "${rightrepo}" --config extensions.strip= strip --rev "$rightsubset" --no-backup | |
98 fi | 101 fi |