Closed Bug 338047 Opened 19 years ago Closed 19 years ago

Add viewcvs/viewvc support to tinderbox1

Categories

(Webtools Graveyard :: Tinderbox, enhancement)

enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: cls, Assigned: cls)

References

Details

Attachments

(1 file, 1 obsolete file)

At work, we recently converted from using CVS to using SVN. We want to use tinderbox and have the blame information available. Since bonsai doesn't support SVN (bug 267090) and adding that support appears to be non-trivial, we've installed ViewVC (http://www.viewvc.org/) instead.
Attached patch v0.9 (obsolete) — Splinter Review
Here's a preliminary patch that I'm currently using. It still needs to be cleaned up but it works. I have some concerns about where to store sensitive sql info since all of the tinderbox files are world readable (some world writable :-( ).
Depends on: 273441
Attached patch v1.0Splinter Review
Here's an updated patch that has been tested against the new ViewVC 1.0.0 release. With this patch, setting up the guilty (blame) colum should be completely optional. Also, when using viewvc, we don't use the popup blame window as it has a dependency upon ../registry/who.cgi . We just show the current checkin.
Attachment #222097 - Attachment is obsolete: true
Attachment #223996 - Flags: review?(bear)
Comment on attachment 223996 [details] [diff] [review] v1.0 >Index: webtools/tinderbox/showbuilds.cgi >@@ -561,16 +561,28 @@ >+ if ($use_viewvc) { could you please indent the if in this complex line to match the style you used in use_bonsai? >+ $output .= "&maxdate=" . >+ strftime("%Y-%m-%d %T", gmtime($maxdate)) >+ if (defined($maxdate) && $maxdate ne ''); >+ } elsif ($use_bonsai) { >+ $output .= "&branchtype=regexp" >+ if $td->{cvs_branch} =~ /\+|\?|\*/; >@@ -604,9 +628,9 @@ ah the wonders of inconsistent whitespace indentation. someday we should find the time to resolve that (but not today). > } > if ($time2) { > for (my $ii=$time1; $ii<=$time2; $ii++) { >- return 1 if $who_check_list[$ii] >+ return 1 if $who_check_list[$ii]; > } >- return 0 >+ return 0; > } else { > return $who_check_list[$time1]; > } >Index: webtools/tinderbox/viewvc.pl >+sub FetchSQLData { bad indent in here: >+ if (defined @::fetchahead) { >+ my @result = @::fetchahead; >+ undef @::fetchahead; >+ return @result; >+ } >+ return $::currentquery->fetchrow_array(); >+} >+# ViewVC uses the same table layout as bonsai. Yippie! how did that happen? :) >+ while (@row = &FetchSQLData()) { >+#print "<pre>"; >+ $ci = []; bad indent in here (unless it's some strange style): >+ for (my $i=0 ; $i<=$::CI_LOG ; $i++) { >+ if ($i == $::CI_DATE) { >+ $ci->[$i] = &GMTtoLocaltime($row[$i]); >+ } else { >+ $ci->[$i] = $row[$i]; >+ } >+ } any reason you switched where the whitespace is relative to /if/ /(/ |token|? >+ if( $have_mod_map && >+ !&in_module(\%mod_map, $ci->[$::CI_DIR], $ci->[$::CI_FILE] ) ){ >+ if( $begin_tag) { >+ if ($rev == "" || rev_is_after($ci->[$::CI_REV], $rev)) { >+ if( $end_tag) { >+ if ($rev == "" || rev_is_after($rev, $ci->[$::CI_REV])) { and then unswitched >+ if (defined($::query_logexpr) && >+ $::query_logexpr ne '' && >+ !($ci->[$::CI_LOG] =~ /$::query_logexpr/i) ){ >+ push( @$result, $ci ); code seems nice :).
(In reply to comment #3) > (From update of attachment 223996 [details] [diff] [review] [edit]) > >Index: webtools/tinderbox/showbuilds.cgi > >@@ -561,16 +561,28 @@ > >+ if ($use_viewvc) { > > could you please indent the if in this complex line to match the style you used > in use_bonsai? I would but emacs keeps putting it back. > >Index: webtools/tinderbox/viewvc.pl > >+sub FetchSQLData { > bad indent in here: Most of the routines in viewvc.pl were copied verbatim from bonsai's cvsquery.pl. It's the hard tabs that are throwing off the indention.
Comment on attachment 223996 [details] [diff] [review] v1.0 I tested on my tbox/bonsai system as much as I could but I'm sure I didn't hit all the code paths :)
Attachment #223996 - Flags: review?(bear) → review+
Checking in webtools/tinderbox/Makefile; /cvsroot/mozilla/webtools/tinderbox/Makefile,v <-- Makefile new revision: 1.11; previous revision: 1.10 done Checking in webtools/tinderbox/admintree.cgi; /cvsroot/mozilla/webtools/tinderbox/admintree.cgi,v <-- admintree.cgi new revision: 1.22; previous revision: 1.21 done Checking in webtools/tinderbox/buildwho.pl; /cvsroot/mozilla/webtools/tinderbox/buildwho.pl,v <-- buildwho.pl new revision: 1.14; previous revision: 1.13 done Checking in webtools/tinderbox/doadmin.cgi; /cvsroot/mozilla/webtools/tinderbox/doadmin.cgi,v <-- doadmin.cgi new revision: 1.17; previous revision: 1.16 done Checking in webtools/tinderbox/processbuild.pl; /cvsroot/mozilla/webtools/tinderbox/processbuild.pl,v <-- processbuild.pl new revision: 1.51; previous revision: 1.50 done Checking in webtools/tinderbox/showbuilds.cgi; /cvsroot/mozilla/webtools/tinderbox/showbuilds.cgi,v <-- showbuilds.cgi new revision: 1.187; previous revision: 1.186 done Checking in webtools/tinderbox/tbglobals.pl; /cvsroot/mozilla/webtools/tinderbox/tbglobals.pl,v <-- tbglobals.pl new revision: 1.32; previous revision: 1.31 done RCS file: /cvsroot/mozilla/webtools/tinderbox/viewvc.pl,v done Checking in webtools/tinderbox/viewvc.pl; /cvsroot/mozilla/webtools/tinderbox/viewvc.pl,v <-- viewvc.pl initial revision: 1.1 done
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Product: Webtools → Webtools Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: