Allow revisions for projects and configs
authorDario Sestito <darios@symbian.org>
Wed, 15 Jul 2009 18:14:05 +0100
changeset 24 ed4e68942437
parent 22 7a9425957569
child 25 234b5eb2dcfe
Allow revisions for projects and configs
bootstrap.xml
build_package.pl
--- a/bootstrap.xml	Fri Jun 26 18:34:34 2009 +0100
+++ b/bootstrap.xml	Wed Jul 15 18:14:05 2009 +0100
@@ -47,11 +47,8 @@
         <echo message="Getting FBF configuration from repository ${sf.config.repo}"/>
         <hlm:scm verbose="true" scmUrl="scm:hg:${sf.config.repo}">
           <hlm:checkout basedir="${sf.target.dir}/sf-config"/>
-          <hlm:tags basedir="${sf.target.dir}/sf-config" reference="hg.tags.id1"/>
           <hlm:update basedir="${sf.target.dir}/sf-config">
-            <hlm:latestTag pattern="${sf.config.rev}">
-              <hlm:tagSet refid="hg.tags.id1"/> 
-            </hlm:latestTag>
+            <hlm:tag name="${{sf.config.rev}"/>
           </hlm:update>
         </hlm:scm>
       </else>
@@ -71,11 +68,8 @@
         <echo message="Getting FBF project from repository ${sf.project.repo}"/>
         <hlm:scm verbose="true" scmUrl="scm:hg:${sf.project.repo}">
           <hlm:checkout basedir="${sf.target.dir}/build/config"/>
-          <hlm:tags basedir="${sf.target.dir}/build/config" reference="hg.tags.id2"/>
           <hlm:update basedir="${sf.target.dir}/build/config">
-            <hlm:latestTag pattern="${sf.project.rev}">
-              <hlm:tagSet refid="hg.tags.id2"/>
-            </hlm:latestTag>
+            <hlm:tag name="${sf.project.rev}"/>
           </hlm:update>
         </hlm:scm>
       </else>
--- a/build_package.pl	Fri Jun 26 18:34:34 2009 +0100
+++ b/build_package.pl	Wed Jul 15 18:14:05 2009 +0100
@@ -45,9 +45,9 @@
 {
 	print "Usage: build_package.pl --projectrepo=REPO [OPTIONS]\n";
 	print "where OPTIONS are:\n";
-	print "\t--projectrepo=REPO Use REPO location for the project.\n";
+	print "\t--projectrepo=REPO[#REV] Use repository REPO at revision REV for the project.\n";
 	print "\t--projectdir=DIR Use DIR location for the project (exclusive with --projectrepo). Option --testbuild is required.\n";
-	print "\t--configrepo=REPO Use REPO location for the config instead of \\\\bishare\\mercurial_internal\\fbf\\config\\pkgbuild\n";
+	print "\t--configrepo=REPO[#REV] Use repository REPO at revision REV for the config (instead of \\\\bishare\\mercurial_internal\\fbf\\config\\pkgbuild)\n";
 	print "\t--configdir=DIR Use DIR location for the config (exclusive with --configrepo). Option --testbuild is required.\n";
 	print "\t--number=N Force build number to N\n";
 	print "\t--testbuild Use d:\\numbers_test.txt for numbers and disable publishing\n";
@@ -66,6 +66,19 @@
 	exit(0);
 }
 
+my $sFbfProjectRev = '';
+if ($sFbfProjectRepo =~ m,(.*)#(.*),)
+{
+	$sFbfProjectRepo = $1;
+	$sFbfProjectRev = $2;
+}
+my $sFbfConfigRev = '';
+if ($sFbfConfigRepo =~ m,(.*)#(.*),)
+{
+	$sFbfConfigRepo = $1;
+	$sFbfConfigRev = $2;
+}
+
 my $sTestBuildOpts = "";
 $sTestBuildOpts = "-Dsf.spec.publish.enable=false" if ( $bTestBuild );
 $sNUMBERS_FILE = "d:\\numbers_test.txt" if ( $bTestBuild );
@@ -82,8 +95,10 @@
 chdir("$sBOOTSTRAP_DIR");
 print "###### BOOTSTRAP ######\n";
 my $sConfigArg = "-Dsf.config.repo=$sFbfConfigRepo";
+$sConfigArg .= " -Dsf.config.rev=$sFbfConfigRev" if ($sFbfConfigRev);
 $sConfigArg = "-Dsf.config.dir=$sFbfConfigDir" if ($sFbfConfigDir);
 my $sProjectArg = "-Dsf.project.repo=$sFbfProjectRepo";
+$sProjectArg .= " -Dsf.project.rev=$sFbfProjectRev" if ($sFbfProjectRev);
 $sProjectArg = "-Dsf.project.dir=$sFbfProjectDir" if ($sFbfProjectDir);
 print("hlm -f bootstrap.xml $sConfigArg $sProjectArg -Dsf.target.dir=$sJobDir\n");
 system("hlm -f bootstrap.xml $sConfigArg $sProjectArg -Dsf.target.dir=$sJobDir");