Bug 367333: Allow rebuildcvshistory.cgi to rebuild history on a single file from the command line.

r=bear
This commit is contained in:
justdave%bugzilla.org 2007-01-19 05:05:35 +00:00
Родитель 246b81dc9c
Коммит 3a3d5633f9
1 изменённых файлов: 14 добавлений и 3 удалений

Просмотреть файл

@ -210,7 +210,14 @@ if ($#ARGV == 4) {
$::FORM{'firstfile'} = $ARGV[2];
$::FORM{'subdir'} = $ARGV[3];
$::FORM{'modules'} = $ARGV[4];
} else {
}
elsif ($#ARGV == 2) {
$::TreeID = $ARGV[0];
$::FORM{'startfrom'} = $ARGV[1];
$::Filename = $ARGV[2];
}
else {
print "Content-type: text/html
<HTML>";
@ -222,8 +229,10 @@ if ($#ARGV == 4) {
}
$::StartFrom = ParseTimeAndCheck(FormData('startfrom'));
$::FirstFile = trim(FormData('firstfile'));
$::SubDir = trim(FormData('subdir'));
if (!$::Filename) {
$::FirstFile = trim(FormData('firstfile'));
$::SubDir = trim(FormData('subdir'));
}
$::Modules = '';
if (defined($::FORM{'modules'})) {
@ -246,6 +255,8 @@ Rebuilding entire checkin history in $::Description, (`$::TreeID' tree) ...
Log("Rebuilding cvs history in $::Description, (`$::TreeID' tree)...");
if ($::Filename) { ProcessOneFile("$::Repository/$::Filename,v"); exit; }
LoadDirList();
my @Dirs = grep(!/\*$/, @::LegalDirs);
@Dirs = split(/,\s*/, $::Modules) if $::Modules;