common/templates/source-spec.ant.xml.ftl
changeset 893 f4d702959f07
parent 892 24ecf67cba71
child 896 e7f07235b184
equal deleted inserted replaced
892:24ecf67cba71 893:f4d702959f07
    30                 <isset property="sf.spec.sourcesync.cachelocation.${count}"/>
    30                 <isset property="sf.spec.sourcesync.cachelocation.${count}"/>
    31                 <available file="${dollar}{sf.spec.sourcesync.cachelocation.${count}}" type="dir"/>
    31                 <available file="${dollar}{sf.spec.sourcesync.cachelocation.${count}}" type="dir"/>
    32             </and>
    32             </and>
    33             <then>
    33             <then>
    34                 <!-- Package in cache already -->
    34                 <!-- Package in cache already -->
    35 		<!-- Clone null revision from source to get the right default repo -->
    35                 <echo message="Pull from ${pkg_detail.source} to ${dollar}{sf.spec.sourcesync.cachelocation.${count}}"/>
       
    36                 <exec executable="hg" dir="${dollar}{sf.spec.sourcesync.cachelocation.${count}}" failonerror="true">
       
    37                     <arg value="pull"/>
       
    38                     <arg value="${pkg_detail.source}"/>
       
    39                 </exec>
       
    40                 <echo message="Clone from ${dollar}{sf.spec.sourcesync.cachelocation.${count}} to ${ant['build.drive']}${pkg_detail.dst}"/>
    36                 <exec executable="hg" dir="${ant['build.drive']}/" failonerror="true">
    41                 <exec executable="hg" dir="${ant['build.drive']}/" failonerror="true">
    37                     <arg value="clone"/>
    42                     <arg value="clone"/>
    38                     <arg value="-r"/>
    43                     <arg value="-U"/>
    39                     <arg value="null"/>
    44                     <arg value="--uncompressed"/>
    40                     <arg value="${pkg_detail.source}"/>
    45                     <arg value="${dollar}{sf.spec.sourcesync.cachelocation.${count}}"/>
    41                     <arg value="${ant['build.drive']}${pkg_detail.dst}"/>
    46                     <arg value="${ant['build.drive']}${pkg_detail.dst}"/>
    42                 </exec>
       
    43                 <echo message="Pull from ${dollar}{sf.spec.sourcesync.cachelocation.${count}} to ${ant['build.drive']}${pkg_detail.dst}"/>
       
    44                 <exec executable="hg" dir="${ant['build.drive']}${pkg_detail.dst}/" failonerror="true">
       
    45                     <arg value="pull"/>
       
    46                     <arg value="-f"/>
       
    47                     <arg value="${dollar}{sf.spec.sourcesync.cachelocation.${count}}"/>
       
    48                 </exec>
       
    49                 <echo message="Pull from ${pkg_detail.source} to ${ant['build.drive']}${pkg_detail.dst}"/>
       
    50                 <exec executable="hg" dir="${ant['build.drive']}${pkg_detail.dst}" failonerror="true">
       
    51                     <arg value="pull"/>
       
    52                     <arg value="${pkg_detail.source}"/>
       
    53                 </exec>
    47                 </exec>
    54                 <!-- Update to required revision -->
    48                 <!-- Update to required revision -->
    55                 <exec executable="hg" dir="${ant['build.drive']}${pkg_detail.dst}" failonerror="true">
    49                 <exec executable="hg" dir="${ant['build.drive']}${pkg_detail.dst}" failonerror="true">
    56                     <arg value="update"/>
    50                     <arg value="update"/>
    57                     <arg value="-r"/>
    51                     <arg value="-r"/>
    60                 <!-- Record the changeset selected, for the BOM -->
    54                 <!-- Record the changeset selected, for the BOM -->
    61                 <exec executable="hg" dir="${ant['build.drive']}${pkg_detail.dst}" outputproperty="sf.sourcesync.${count}.checksum">
    55                 <exec executable="hg" dir="${ant['build.drive']}${pkg_detail.dst}" outputproperty="sf.sourcesync.${count}.checksum">
    62                     <arg value="identify"/>
    56                     <arg value="identify"/>
    63                     <arg value="-i"/>
    57                     <arg value="-i"/>
    64                 </exec>
    58                 </exec>
    65                 <forget>
       
    66                     <echo message="Push from ${ant['build.drive']}${pkg_detail.dst} to ${dollar}{sf.spec.sourcesync.cachelocation.${count}} in background"/>
       
    67                     <nice newpriority="1"/>
       
    68                     <exec executable="hg" dir="${ant['build.drive']}${pkg_detail.dst}" failonerror="false">
       
    69                         <arg value="push"/>
       
    70                         <arg value="-f"/>
       
    71                         <arg value="${dollar}{sf.spec.sourcesync.cachelocation.${count}}"/>
       
    72                     </exec>
       
    73                 </forget>
       
    74             </then>
    59             </then>
    75             <else>
    60             <else>
    76                 <echo message="Clone from ${pkg_detail.source} to ${ant['build.drive']}${pkg_detail.dst}"/>
    61                 <echo message="Clone from ${pkg_detail.source} to ${ant['build.drive']}${pkg_detail.dst}"/>
    77                 <exec executable="hg" dir="${ant['build.drive']}/" failonerror="true">
    62                 <exec executable="hg" dir="${ant['build.drive']}/" failonerror="true">
    78                     <arg value="clone"/>
    63                     <arg value="clone"/>
   106                                 <arg value="-r"/>
    91                                 <arg value="-r"/>
   107                                 <arg value="null"/>
    92                                 <arg value="null"/>
   108                                 <arg value="${pkg_detail.source}"/>
    93                                 <arg value="${pkg_detail.source}"/>
   109                                 <arg value="${dollar}{sf.spec.sourcesync.cachelocation.${count}}"/>
    94                                 <arg value="${dollar}{sf.spec.sourcesync.cachelocation.${count}}"/>
   110                             </exec>
    95                             </exec>
       
    96                             <!-- Set the speed-up flag on the cache repo -->
       
    97                             <echo file="${dollar}{sf.spec.sourcesync.cachelocation.${count}}/.hg/hgrc" append="true" message="${dollar}{line.separator}"/>
       
    98                             <echo file="${dollar}{sf.spec.sourcesync.cachelocation.${count}}/.hg/hgrc" append="true" message="[server]${dollar}{line.separator}"/>
       
    99                             <echo file="${dollar}{sf.spec.sourcesync.cachelocation.${count}}/.hg/hgrc" append="true" message="uncompressed=True${dollar}{line.separator}"/>
   111                             <echo message="Push from ${ant['build.drive']}${pkg_detail.dst} to ${dollar}{sf.spec.sourcesync.cachelocation.${count}} in background"/>
   100                             <echo message="Push from ${ant['build.drive']}${pkg_detail.dst} to ${dollar}{sf.spec.sourcesync.cachelocation.${count}} in background"/>
   112                             <exec executable="hg" dir="${ant['build.drive']}${pkg_detail.dst}" failonerror="false">
   101                             <exec executable="hg" dir="${ant['build.drive']}${pkg_detail.dst}" failonerror="false">
   113                                 <arg value="push"/>
   102                                 <arg value="push"/>
   114                                 <arg value="-f"/>
   103                                 <arg value="-f"/>
   115                                 <arg value="${dollar}{sf.spec.sourcesync.cachelocation.${count}}"/>
   104                                 <arg value="${dollar}{sf.spec.sourcesync.cachelocation.${count}}"/>