# HG changeset patch # User Dario Sestito # Date 1247678045 -3600 # Node ID ed4e68942437a13efbc7f4c017932e5c24034300 # Parent 7a942595756979c89b9c4607cb16cf037d38854f Allow revisions for projects and configs diff -r 7a9425957569 -r ed4e68942437 bootstrap.xml --- 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 @@ - - - - + @@ -71,11 +68,8 @@ - - - - + diff -r 7a9425957569 -r ed4e68942437 build_package.pl --- 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");