reproduce.tt: Save the revCount when reproducing more than once
Signed-off-by: Shea Levy <shea@shealevy.com>
This commit is contained in:
parent
8e716ff062
commit
591acda6f9
@ -97,6 +97,9 @@ if ! [ -d "$inputDir" ]; then
|
|||||||
revCount="$(cd "$inputDirTmp" && (git rev-list '[% input.revision %]' | wc -l))"
|
revCount="$(cd "$inputDirTmp" && (git rev-list '[% input.revision %]' | wc -l))"
|
||||||
rm -rf "$inputDirTmp/.git"
|
rm -rf "$inputDirTmp/.git"
|
||||||
mv "$inputDirTmp" "$inputDir"
|
mv "$inputDirTmp" "$inputDir"
|
||||||
|
echo -n $revCount > "$tmpDir/[% input.name %]/revCount"
|
||||||
|
else
|
||||||
|
revCount="$(cat "$tmpDir/[% input.name %]/revCount")"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
args+=(--arg '[% input.name %]' "{ outPath = $inputDir; rev = \"[% input.revision %]\"; shortRev = \"[% input.revision.substr(0, 7) %]\"; revCount = \"$revCount\"; }")
|
args+=(--arg '[% input.name %]' "{ outPath = $inputDir; rev = \"[% input.revision %]\"; shortRev = \"[% input.revision.substr(0, 7) %]\"; revCount = \"$revCount\"; }")
|
||||||
@ -116,6 +119,9 @@ if ! [ -d "$inputDir" ]; then
|
|||||||
revCount="$(cd "$inputDirTmp" && (hg log -r '[% input.revision %]' --template "{rev}"))"
|
revCount="$(cd "$inputDirTmp" && (hg log -r '[% input.revision %]' --template "{rev}"))"
|
||||||
rm -rf "$inputDirTmp/.hg"
|
rm -rf "$inputDirTmp/.hg"
|
||||||
mv "$inputDirTmp" "$inputDir"
|
mv "$inputDirTmp" "$inputDir"
|
||||||
|
echo -n $revCount > "$tmpDir/[% input.name %]/revCount"
|
||||||
|
else
|
||||||
|
revCount="$(cat "$tmpDir/[% input.name %]/revCount")"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
args+=(--arg '[% input.name %]' "{ outPath = $inputDir; rev = \"[% input.revision %]\"; revCount = \"$revCount\"; }")
|
args+=(--arg '[% input.name %]' "{ outPath = $inputDir; rev = \"[% input.revision %]\"; revCount = \"$revCount\"; }")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user