--- a/common/tools/mergeXML.pl Thu Oct 14 16:29:33 2010 +0100
+++ b/common/tools/mergeXML.pl Thu Oct 14 16:55:23 2010 +0100
@@ -26,10 +26,12 @@
# Read option arguments
my $howtoString;
my $xslLink;
+my $sortByTime;
my $help;
GetOptions((
'xsl=s' => \$xslLink,
'merge=s' => \$howtoString,
+ 'sortByTime!' => \$sortByTime,
'help!' => \$help,
));
@@ -59,6 +61,11 @@
# Expand wildcards
@ARGV = map { glob $_ } @ARGV;
+if ($sortByTime)
+{
+ # Sort by creation time (this helps the BRAG merging put the phases & steps in the right build sequence)
+ @ARGV = sort { (stat($a))[10] <=> (stat($b))[10] } @ARGV;
+}
# Merge all the trees together
my $outTree = mergeMultipleTrees($mergeTags, @ARGV);