From 4b1a8384dbb4e8c12959cd7f6d53e1f22b7798c6 Mon Sep 17 00:00:00 2001 From: Shea Levy Date: Thu, 16 May 2013 11:24:17 -0400 Subject: [PATCH] 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 --- src/root/reproduce.tt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/root/reproduce.tt b/src/root/reproduce.tt index 1d5b5b9f..6e277c1a 100644 --- a/src/root/reproduce.tt +++ b/src/root/reproduce.tt @@ -110,7 +110,9 @@ if ! [ -d "$inputDir" ]; then requireCommand hg inputDirTmp="$inputDir.tmp" 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" mv "$inputDirTmp" "$inputDir" fi