Re-apply changes to allow sources.csv to specify a revision by a *local* tag in the web repository.
authorSimon Howkins <simonh@symbian.org>
Tue, 30 Mar 2010 13:57:59 +0100
changeset 952 ea541face66b
parent 951 5d2cdb4d231d
child 953 0960b0d3247c
Re-apply changes to allow sources.csv to specify a revision by a *local* tag in the web repository. Uses "hg id" instead of "hg in", so not affected by the aborts we had previously. And no need for an empty repo this time either.
common/templates/source-spec.ant.xml.ftl
--- 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}"/>