зеркало из https://github.com/mozilla/gecko-dev.git
Fix the regexp & notregexp query cases when given the branch name HEAD.
Bug #237525 r=timeless
This commit is contained in:
Родитель
2e90f7c3c6
Коммит
1953bdd78f
|
@ -177,6 +177,10 @@ if (!defined $::query_branch) {
|
|||
}
|
||||
$::query_branchtype = $::FORM{'branchtype'};
|
||||
|
||||
if ($::query_branch eq 'HEAD' &&
|
||||
($::query_branchtype eq 'match' || $::query_branchtype eq 'regexp')) {
|
||||
$::query_branch_head = 1 ;
|
||||
}
|
||||
|
||||
#
|
||||
# tags
|
||||
|
@ -623,12 +627,22 @@ sub query_to_english {
|
|||
$english .= "to file " . html_quote($::query_file) . " ";
|
||||
}
|
||||
|
||||
if( ! ($::query_branch =~ /^[ ]*HEAD[ ]*$/i) ){
|
||||
if($::query_branch eq '' ){
|
||||
if (!$::query_branch_head) {
|
||||
if ($::query_branch eq '') {
|
||||
$english .= "on all branches ";
|
||||
}
|
||||
else {
|
||||
$english .= "on branch <i>" . html_quote($::query_branch) . "</i> ";
|
||||
} else {
|
||||
if ($::query_branchtype eq 'notregexp') {
|
||||
if ($::query_branch eq 'HEAD') {
|
||||
$english .= "not on ";
|
||||
} else {
|
||||
$english .= "not like ";
|
||||
}
|
||||
} elsif ($::query_branchtype eq 'regexp') {
|
||||
$english .= "like ";
|
||||
} else {
|
||||
$english .= "on ";
|
||||
}
|
||||
$english .= "branch <i>" . html_quote($::query_branch) . "</i> ";
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -107,10 +107,6 @@ sub query_checkins {
|
|||
$mod_map{$i} = $NOT_LOCAL;
|
||||
}
|
||||
|
||||
if( $::query_branch =~ /^[ ]*HEAD[ ]*$/i ){
|
||||
$::query_branch_head = 1;
|
||||
}
|
||||
|
||||
$begin_tag = "";
|
||||
$end_tag = "";
|
||||
|
||||
|
@ -149,8 +145,11 @@ sub query_checkins {
|
|||
$qstring .=
|
||||
" and branches.branch regexp $q";
|
||||
} elsif ($::query_branchtype eq 'notregexp') {
|
||||
$qstring .=
|
||||
" and not (branches.branch regexp $q) ";
|
||||
if ($::query_branch eq 'HEAD') {
|
||||
$qstring .= " and branches.branch != ''";
|
||||
} else {
|
||||
$qstring .= " and not (branches.branch regexp $q) ";
|
||||
}
|
||||
} else {
|
||||
$qstring .=
|
||||
" and (branches.branch = $q or branches.branch = ";
|
||||
|
|
Загрузка…
Ссылка в новой задаче