From 8e716ff062f48f0cc20f952238dc5fded5df3038 Mon Sep 17 00:00:00 2001
From: Shea Levy <shea@shealevy.com>
Date: Thu, 30 May 2013 13:31:53 -0400
Subject: [PATCH] reproduce.tt: Create the checkout dir before an hg clone

For some reason, hg clone from a local (path-based) repo will fail if
the parent directory of the destination directory doesn't exist (though
it succeeds when cloning from an http repo).

Signed-off-by: Shea Levy <shea@shealevy.com>
---
 src/root/reproduce.tt | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/root/reproduce.tt b/src/root/reproduce.tt
index 6e277c1a..60fb3094 100644
--- a/src/root/reproduce.tt
+++ b/src/root/reproduce.tt
@@ -110,6 +110,7 @@ if ! [ -d "$inputDir" ]; then
     requireCommand hg
     inputDirTmp="$inputDir.tmp"
     rm -rf "$inputDirTmp"
+    mkdir -p "$inputDirTmp"
     hg clone '[% input.uri %]' "$inputDirTmp"
     (cd "$inputDirTmp" && hg update '[% input.revision %]')
     revCount="$(cd "$inputDirTmp" && (hg log -r '[% input.revision %]' --template "{rev}"))"