зеркало из https://github.com/mozilla/pjs.git
Make the commit info time period a per-tree config option & bump the default to 14 days.
This commit is contained in:
Родитель
a774bf37a6
Коммит
a718a5234b
|
@ -155,6 +155,11 @@ print "
|
|||
<TD>(SeaMonkey)</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD>days of commit history to display:</TD>
|
||||
<TD><INPUT NAME=who_days VALUE=14></TD>
|
||||
<TD>(14)</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD>
|
||||
<b>Bonsai query options:</b><br>
|
||||
</TD>
|
||||
|
|
|
@ -30,9 +30,18 @@ $F_DEBUG=1;
|
|||
# Process args:
|
||||
# $days: How many days of data to process.
|
||||
# $tree: Which tree to use.
|
||||
my ($days, $tree) = process_args();
|
||||
$days = $tree = undef;
|
||||
|
||||
if ($ARGV[0] eq '-days') {
|
||||
shift;
|
||||
$days = shift;
|
||||
}
|
||||
$tree = shift;
|
||||
|
||||
&usage() if (!defined($tree));
|
||||
|
||||
# Grab globals for this tree:
|
||||
# $who_days: Number of days of commit info to make available
|
||||
# $cvs_module: The checkout module
|
||||
# $cvs_branch: The current branch
|
||||
# $cvs_root: The path to the cvs root
|
||||
|
@ -40,6 +49,8 @@ my ($days, $tree) = process_args();
|
|||
# $viewvc_repository: Repository path used by viewvc for this tree
|
||||
require "$tree/treedata.pl";
|
||||
|
||||
$days = $who_days if (!defined($days));
|
||||
|
||||
# Exit early if no query system is enabled
|
||||
exit 0 if (!$use_bonsai && !$use_viewvc);
|
||||
|
||||
|
@ -77,15 +88,9 @@ unlock_datafile($lock);
|
|||
|
||||
# End of main
|
||||
##################################################################
|
||||
sub process_args {
|
||||
my ($days, $tree);
|
||||
|
||||
if ($ARGV[0] eq '-days') {
|
||||
($days, $tree) = @ARGV[1,2];
|
||||
} else {
|
||||
($days, $tree) = (2, $ARGV[0]);
|
||||
}
|
||||
return $days, $tree;
|
||||
sub usage() {
|
||||
print "Usage: $0 [-days days_of_commitinfo] treename\n";
|
||||
exit 1;
|
||||
}
|
||||
|
||||
sub lock_datafile {
|
||||
|
|
|
@ -119,6 +119,7 @@ sub trim_logs {
|
|||
|
||||
sub create_tree {
|
||||
$treename = $form{'treename'};
|
||||
$who_days = $form{'who_days'};
|
||||
my $repository = $form{'repository'};
|
||||
$modulename = $form{'modulename'};
|
||||
$branchname = $form{'branchname'};
|
||||
|
@ -155,6 +156,7 @@ sub create_tree {
|
|||
mkdir( $treename, oct($dir_perm)) || die "<h1> Cannot mkdir $treename</h1>";
|
||||
}
|
||||
open( F, ">$treename/treedata.pl" );
|
||||
print F "\$who_days=$who_days;\n";
|
||||
print F "\$use_bonsai=$use_bonsai;\n";
|
||||
print F "\$use_viewvc=$use_viewvc;\n";
|
||||
print F "\$cvs_module='$modulename';\n";
|
||||
|
|
Загрузка…
Ссылка в новой задаче