reproduce.tt: Set revCount for hg repos
The revision counting changes depending on which revision is cloned initially, so clone the default branch first and then checkout the required revision to match hydra's revCount. Signed-off-by: Shea Levy <shea@shealevy.com>
This commit is contained in:
parent
666f398e98
commit
4b1a8384db
|
@ -110,7 +110,9 @@ if ! [ -d "$inputDir" ]; then
|
||||||
requireCommand hg
|
requireCommand hg
|
||||||
inputDirTmp="$inputDir.tmp"
|
inputDirTmp="$inputDir.tmp"
|
||||||
rm -rf "$inputDirTmp"
|
rm -rf "$inputDirTmp"
|
||||||
hg clone '[% input.uri %]' "$inputDirTmp" -r '[% input.revision %]'
|
hg clone '[% input.uri %]' "$inputDirTmp"
|
||||||
|
(cd "$inputDirTmp" && hg update '[% input.revision %]')
|
||||||
|
revCount="$(cd "$inputDirTmp" && (hg log -r '[% input.revision %]' --template "{rev}"))"
|
||||||
rm -rf "$inputDirTmp/.hg"
|
rm -rf "$inputDirTmp/.hg"
|
||||||
mv "$inputDirTmp" "$inputDir"
|
mv "$inputDirTmp" "$inputDir"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue