зеркало из https://github.com/mozilla/pjs.git
Only bonsai has branch support atm.
Disconnect from the database when finished processing bonsai queries Fix debug comment
This commit is contained in:
Родитель
0d09d57ed0
Коммит
f03c9d8f97
|
@ -91,15 +91,14 @@ sub build_who {
|
|||
|
||||
print "Minimum date: $::query_date_min\n" if $F_DEBUG;
|
||||
|
||||
$::query_branchtype='regexp' if $::query_branch =~ /\*|\?|\+/;
|
||||
$::query_branch_head=1 if $::query_branch eq 'HEAD';
|
||||
|
||||
if ($use_viewvc) {
|
||||
$::query_module=$viewvc_repository;
|
||||
$result = query_checkins_viewvc($tree);
|
||||
} elsif ($use_bonsai) {
|
||||
$::query_module=$cvs_module;
|
||||
$::query_branch=$cvs_branch;
|
||||
$::query_branchtype='regexp' if $::query_branch =~ /\*|\?|\+/;
|
||||
$::query_branch_head=1 if $::query_branch eq 'HEAD';
|
||||
$result = query_checkins_bonsai($tree);
|
||||
} else {
|
||||
# Should never reach this
|
||||
|
|
|
@ -206,8 +206,8 @@ sub query_checkins_bonsai {
|
|||
|
||||
$lastlog = 0;
|
||||
my @row;
|
||||
while (@row = FetchSQLData(\$currentquery)) {
|
||||
#print "<pre>";
|
||||
while (@row = FetchSQLData(\$currentquery)) {
|
||||
$ci = [];
|
||||
for (my $i=0 ; $i<=$::CI_LOG ; $i++) {
|
||||
$ci->[$i] = $row[$i];
|
||||
|
@ -258,6 +258,9 @@ sub query_checkins_bonsai {
|
|||
$::lines_removed += $ci->[$::CI_LINES_REMOVED];
|
||||
$::versioninfo .= "$ci->[$::CI_WHO]|$ci->[$::CI_DIR]|$ci->[$::CI_FILE]|$ci->[$::CI_REV],";
|
||||
}
|
||||
|
||||
DisconnectFromDatabase();
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
@ -291,36 +294,14 @@ sub query_checkins_viewvc($) {
|
|||
push(@bind_values, formatSqlTime($::query_date_max));
|
||||
}
|
||||
|
||||
if ($::query_branch_head) {
|
||||
$qstring .= " AND branches.branch = ''";
|
||||
} elsif ($::query_branch ne '') {
|
||||
if ($::query_branchtype eq 'regexp') {
|
||||
$qstring .= " AND branches.branch REGEXP ?";
|
||||
push(@bind_values, $::query_branch);
|
||||
} elsif ($::query_branchtype eq 'notregexp') {
|
||||
if ($::query_branch eq 'HEAD') {
|
||||
$qstring .= " AND branches.branch != ''";
|
||||
} else {
|
||||
$qstring .= " and not (branches.branch REGEXP ?)";
|
||||
push(@bind_values, $::query_branch);
|
||||
}
|
||||
} else {
|
||||
$qstring .=
|
||||
" AND (branches.branch = ? OR branches.branch = ?)";
|
||||
push(@bind_values, $::query_branch);
|
||||
push(@bind_values, "T$::query_branch");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# print "Query: $qstring\n";
|
||||
# print "values: @bind_values\n";
|
||||
SendSQL(\$currentquery, $qstring, @bind_values);
|
||||
|
||||
my $lastlog = 0;
|
||||
my (@row, $ci, $rev, $result);
|
||||
while (@row = FetchSQLData(\$currentquery)) {
|
||||
#print "<pre>";
|
||||
while (@row = FetchSQLData(\$currentquery)) {
|
||||
$ci = [];
|
||||
for (my $i=0 ; $i<=$::CI_LOG ; $i++) {
|
||||
if ($i == $::CI_DATE) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче