rearrange names of bug_id2url to make the new bonsai code work.

This commit is contained in:
kestes%walrus.com 2002-05-03 00:19:41 +00:00
parent 3682555264
commit 5a854594e1
3 changed files with 45 additions and 17 deletions

View File

@ -4,8 +4,8 @@
# Tracking system and its relationship to the tinderbox trees.
# $Revision: 1.9 $
# $Date: 2002/04/30 17:58:26 $
# $Revision: 1.10 $
# $Date: 2002/05/03 00:19:41 $
# $Author: kestes%walrus.com $
# $Source: /home/hwine/cvs_conversion/cvsroot/mozilla/webtools/tinderbox2/src/default_conf/BTData.pm,v $
# $Name: $
@ -245,13 +245,15 @@ sub update2tree {
}
# Given a bug id return a URL ('href') to the bug.
# It would be great if all bug tracking systems allowed a simple
# conversion from bug id to url. I doubt this will happen. Where it
# makes sense though, let other modules peek at this.
# If the bug tracker does not support URL's to a bug number,
# return a 'mailto: ' to someone who cares about the bug.
sub bug_id2bug_url {
my ($tinderbox_ref) = @_;
my ($bug_id) = $tinderbox_ref->{$BTData::BUGID_FIELD_NAME};
my ($bug_id) = @_;
my ($out);
@ -276,6 +278,21 @@ sub bug_id2bug_url {
}
# Given a bug record return a URL ('href') to the bug.
# this might work for a larger collection of trackers then the above.
sub rec2bug_url {
my ($tinderbox_ref) = @_;
my ($bug_id) = $tinderbox_ref->{$BTData::BUGID_FIELD_NAME};
my ($out);
$out = bug_id2bug_url($bug_id);
return $out;
}
sub get_all_progress_states {
my (@progress_states) = main::uniq( values %BTData::STATUS_PROGRESS );

View File

@ -37,8 +37,8 @@
# Contributor(s):
# $Revision: 1.15 $
# $Date: 2002/05/02 22:56:33 $
# $Revision: 1.16 $
# $Date: 2002/05/03 00:19:39 $
# $Author: kestes%walrus.com $
# $Source: /home/hwine/cvs_conversion/cvsroot/mozilla/webtools/tinderbox2/src/lib/TinderDB/BT_Generic.pm,v $
# $Name: $
@ -76,7 +76,7 @@ use TreeData;
use VCDisplay;
$VERSION = ( qw $Revision: 1.15 $ )[1];
$VERSION = ( qw $Revision: 1.16 $ )[1];
@ISA = qw(TinderDB::BasicTxtDB);
@ -299,7 +299,7 @@ sub status_table_row {
# a link to the cgibin page which displays the bug
my ($href) = BTData::bug_id2bug_url($rec);
my ($href) = BTData::rec2bug_url($rec);
my ($window_title) = "$BT_NAME Info bug_id: $bug_id";
# we display the list of names in 'teletype font' so that the

View File

@ -35,8 +35,8 @@
# kestes@walrus.com Home.
# Contributor(s):
# $Revision: 1.26 $
# $Date: 2002/05/02 04:12:41 $
# $Revision: 1.27 $
# $Date: 2002/05/03 00:19:39 $
# $Author: kestes%walrus.com $
# $Source: /home/hwine/cvs_conversion/cvsroot/mozilla/webtools/tinderbox2/src/lib/TinderDB/VC_CVS.pm,v $
# $Name: $
@ -139,7 +139,7 @@ use TreeData;
use VCDisplay;
$VERSION = ( qw $Revision: 1.26 $ )[1];
$VERSION = ( qw $Revision: 1.27 $ )[1];
@ISA = qw(TinderDB::BasicTxtDB);
@ -597,11 +597,25 @@ sub status_table_row {
my $cell_options;
my $text_browser_color_string;
my $empty_cell_contents = $HTMLPopUp::EMPTY_TABLE_CELL;
if ( ($LAST_TREESTATE) && ($cell_color) ) {
my ($cell_options) = "bgcolor=$cell_color ";
$text_browser_color_string =
HTMLPopUp::text_browser_color_string($cell_color, $char);
# for those who like empty cells to be truely empty, we need to
# be sure that they see the different cell colors when they
# change.
if (
($cell_color !~ m/white/) &&
(!($text_browser_color_string)) &&
(!($empty_cell_contents) &&
) {
$empty_cell_contents = " ";
}
}
my ($query_links) = '';
@ -744,12 +758,9 @@ sub status_table_row {
"");
} else {
my $cell_contents = $text_browser_color_string ||
$HTMLPopUp::EMPTY_TABLE_CELL;
@outrow = ("\t<!-- skipping: VC_CVS: tree: $tree -->".
"<td align=center $cell_options>$cell_contents</td>\n");
@outrow = ("\t<!-- skipping: VC_Bonsai: tree: $tree -->".
"<td align=center $cell_options>$empty_cell_contents</td>\n");
}