To protect your data, the CISO officer has suggested users to enable GitLab 2FA as soon as possible.

Commit af0f11ef authored by John Zhang's avatar John Zhang
Browse files

add support to pull source from mercurial repository

parent 13be5036
......@@ -39,7 +39,7 @@
<property name="harness-classpath" value="harness/dist/harness"/>
<target name="all" depends="source,svn-source,cvs-source,pre-build,build,complete"/>
<target name="all" depends="source,svn-source,cvs-source,hg-source,pre-build,build,complete"/>
<target name="incremental">
<property name="incremental-build" value="true"/>
......@@ -80,6 +80,19 @@
</antcall>
</target>
<target name="hg-source" if="bm-hg-url">
<condition property="fail-on-error" value="no" else="yes">
<isset property="bm-ignore-failure"/>
</condition>
<antcall target="check-hg-source">
<param name="target-dir" value="${bm-downloads}"/>
<param name="hg-url" value="${bm-hg-url}"/>
<param name="hg-revision" value="${bm-hg-revision}"/>
<param name="target-file" value="${bm-src}"/>
<param name="fail-on-error" value="${bm-fail-on-error}"/>
</antcall>
</target>
<target name="pre-build" depends="clean, init, unpack"/>
<target name="clean">
......
......@@ -262,6 +262,62 @@
</antcall>
</target>
<!-- get source from mercurial repository -->
<target name="check-hg-source" if="target-filename" depends="scm-init">
<antcall target="check-hg-source.checkandupdate">
<param name="hg-url" value="${hg-url}"/>
<param name="hg-revision" value="${hg-revision}"/>
<param name="target-filename" value="${target-filename}"/>
<param name="fail-on-error" value="${fail-on-error}"/>
</antcall>
<antcall target="check-hg-source.update">
<param name="hg-url" value="${hg-url}"/>
<param name="hg-revision" value="${hg-revision}"/>
<param name="target-filename" value="${target-filename}"/>
<param name="fail-on-error" value="${fail-on-error}"/>
</antcall>
<antcall target="check-source.checksum.update">
<param name="target-filename" value="${target-filename}"/>
</antcall>
<antcall target="check-source.checksum.verify">
<param name="target-filename" value="${target-filename}"/>
</antcall>
</target>
<!-- get the source from hg and tar up if necessary -->
<target name="get-hg-source" unless="target-valid-md5">
<property name="hg-tmp" value="hg-${build.time}"/>
<!-- set the input string to "p" to get around a bug where hg asks about unknown certificates -->
<exec executable="hg" failonerror="${fail-on-error}">
<arg line="clone -u ${hg-revision} ${hg-url} ${hg-tmp}"/>
</exec>
<!-- since timestamps are kept in tar balls we force to a date before the dacapo project start -->
<tar destfile="${target-filename}" basedir="${hg-tmp}" compression="gzip" excludes=".hg/**,**/.hg/**"/>
<delete dir="${hg-tmp}"/>
</target>
<target name="check-hg-source.checkandupdate" if="target-available-for-verify">
<checksum-verify file="${target-filename}" property="target-valid-md5"/>
<antcall target="get-hg-source">
<param name="hg-url" value="${hg-url}"/>
<param name="hg-revision" value="${hg-revision}"/>
<param name="target-filename" value="${target-filename}"/>
<param name="fail-on-error" value="${fail-on-error}"/>
</antcall>
</target>
<target name="check-hg-source.update" unless="target-available">
<antcall target="get-hg-source">
<param name="hg-url" value="${hg-url}"/>
<param name="hg-revision" value="${hg-revision}"/>
<param name="target-filename" value="${target-filename}"/>
<param name="fail-on-error" value="${fail-on-error}"/>
</antcall>
</target>
<!-- utility targets -->
<target name="check-source.checksum.update" unless="target-available-checksum">
<checksum-write file="${target-filename}"/>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment