--- a/common/templates/source-spec.ant.xml.ftl Mon Mar 29 14:48:28 2010 +0100
+++ b/common/templates/source-spec.ant.xml.ftl Tue Mar 30 13:57:59 2010 +0100
@@ -5,7 +5,7 @@
<!-- Convert \s in cache location, because otherwise they disappear entirely when used in a regex replacement! -->
<propertyregex property="sf.spec.sourcesync.cachelocation.for.regex" input="${dollar}{sf.spec.sourcesync.cachelocation}" regexp="\\" replace="/" global="true" defaultValue="${dollar}{sf.spec.sourcesync.cachelocation}"/>
-
+
<#assign fileset = "" />
<#assign sync_list = "" />
<#assign bom_list = "" />
@@ -28,7 +28,16 @@
<propertyregex property="sf.spec.sourcesync.cachelocation.${count}" input="${pkg_detail.source}" regexp="^${ant['sf.spec.sourcesync.local.development.area']}/" casesensitive="false" replace="${dollar}{sf.spec.sourcesync.cachelocation.for.regex}/LocalDev/"/>
</then>
</if>
-
+
+ <!-- Convert source tag/branch to to changeset hash, in case it's a local tag on the server -->
+ <exec executable="hg" outputproperty="sf.sourcesync.${count}.checksum">
+ <arg value="id"/>
+ <arg value="${pkg_detail.source}"/>
+ <arg value="-r"/>
+ <arg value="${pkg_detail.pattern}"/>
+ <arg value="-q"/>
+ </exec>
+
<if>
<and>
<isset property="sf.spec.sourcesync.cachelocation.${count}"/>
@@ -82,12 +91,7 @@
<exec executable="hg" dir="${ant['build.drive']}${pkg_detail.dst}" failonerror="true">
<arg value="update"/>
<arg value="-r"/>
- <arg value="${pkg_detail.pattern}"/>
- </exec>
- <!-- Record the changeset selected, for the BOM -->
- <exec executable="hg" dir="${ant['build.drive']}${pkg_detail.dst}" outputproperty="sf.sourcesync.${count}.checksum">
- <arg value="identify"/>
- <arg value="-i"/>
+ <arg value="${dollar}{sf.sourcesync.${count}.checksum}"/>
</exec>
</then>
<else>
@@ -102,12 +106,7 @@
<exec executable="hg" dir="${ant['build.drive']}${pkg_detail.dst}" failonerror="true">
<arg value="update"/>
<arg value="-r"/>
- <arg value="${pkg_detail.pattern}"/>
- </exec>
- <!-- Record the changeset selected, for the BOM -->
- <exec executable="hg" dir="${ant['build.drive']}${pkg_detail.dst}" outputproperty="sf.sourcesync.${count}.checksum">
- <arg value="identify"/>
- <arg value="-i"/>
+ <arg value="${dollar}{sf.sourcesync.${count}.checksum}"/>
</exec>
<if>
<isset property="sf.spec.sourcesync.cachelocation.${count}"/>