#!/usr/bin/perl -w # -*- perl -*- use P4CGI ; use strict ; # ################################################################# # CONFIGURATION INFORMATION # All config info should be in P4CGI.pm # ################################################################# # # P4 depot browser, top # ################################################################# print "", &P4CGI::start_page("P4DB
P4 Depot Browser", "
Hint:". "You can bookmark any page You want to get back to later
") ; # Read codelines file my @CODELINES ; if (defined $ENV{CODELINES} and -r $ENV{CODELINES}) { local *D ; open(*D, "$ENV{CODELINES}" ) || &P4CGI::bail("Can not open codelines file \"$ENV{CODELINES}\"" ); while() { chomp ; /^\#/ and do { next ; } ; /^\s*(\/\/.*)/ and do { $CODELINES[@CODELINES-1] .= &P4CGI::ahref(-url => &P4CGI::CHB_URL(), "FSPC=$1",$1) . "
" ; next ; } ; push @CODELINES,"$_" ; push @CODELINES,"" ; } close D ; } else { @CODELINES = ("Full Depot Source", &P4CGI::ahref(-url => &P4CGI::CHB_URL(), "FSPC=//...", "//..." )) ; } ; print &P4CGI::dl_list(@CODELINES) ; print "
", &P4CGI::start_table("width=100%"), &P4CGI::table_row(-align => "center", &P4CGI::ahref(-url => &P4CGI::DTB_URL(), "Browse depot tree"), &P4CGI::ahref(-url => &P4CGI::CHB_URL(), "FSPC=//...", "STATUS=pending", "Pending changes"), &P4CGI::ahref(-url => &P4CGI::LAB_URL(), "Branches"), &P4CGI::ahref(-url => &P4CGI::LAL_URL(), "Labels"), &P4CGI::ahref(-url => &P4CGI::LAU_URL(), "Users")), &P4CGI::end_table(), "
" ; print &P4CGI::cgi()->startform(-action => &P4CGI::CHB_URL(), -method => "GET"), &P4CGI::cgi()->submit(-name => "ignore", -value => "View changes for:"), &P4CGI::cgi()->textfield(-name => "FSPC", -default => "//...", -size => 50, -maxlength => 256), &P4CGI::cgi()->endform() ; print &P4CGI::cgi()->startform(-action => &P4CGI::SFF_URL(), -method => "GET"), &P4CGI::cgi()->submit(-name => "ignore", -value => "Search for:"), &P4CGI::cgi()->textfield(-name => "FSPC", -default => "//...", -size => 50, -maxlength => 256), &P4CGI::cgi()->endform() ; my @labels ; &P4CGI::p4call(\@labels,"labels") ; my $l ; foreach $l (@labels) { $l =~ s/^Label (\S+).*/$1/ ; } if(undef) { print &P4CGI::cgi()->startform(-action => &P4CGI::LDV_URL(), -method => "GET"), "
", &P4CGI::cgi()->submit(-name => "Go", -value => "Label diff"), " label: ", &P4CGI::cgi()->popup_menu(-name => "LABEL1", -value => \@labels), "and: ", &P4CGI::cgi()->popup_menu(-name => "LABEL2", -value => \@labels), "
Show files: ", &P4CGI::cgi()->checkbox(-name => "SHOWSAME", -value => "Y", -label => " Not modified"), &P4CGI::cgi()->checkbox(-name => "SHOWNOTSAME", -checked => "Y", -value => "Y", -label => " Modified"), &P4CGI::cgi()->checkbox(-name => "SHOWDIFF", -checked => "Y", -value => "Y", -label => " Differ"), &P4CGI::cgi()->endform() ; my @excludelabs = @labels ; unshift @excludelabs,"-" ; print &P4CGI::cgi()->startform(-action => &P4CGI::CHB_URL(), -method => "GET"), # "
", &P4CGI::cgi()->submit(-name => "Go", -value => "View changes for label"), " label: ", &P4CGI::cgi()->popup_menu(-name => "LABEL", -value => \@labels), "(optionally) excluding label: ", &P4CGI::cgi()->popup_menu(-name => "EXLABEL", -value => \@excludelabs), &P4CGI::cgi()->endform() ; } print "", &P4CGI::cgi()->startform(-action => &P4CGI::CHV_URL(), -method => "GET"), &P4CGI::cgi()->submit(-name => "ignore", -value => "View change:"), &P4CGI::cgi()->textfield(-name => "CH", -default => "1", -size => 10, -maxlength => 10), &P4CGI::cgi()->endform() ; print "
", &P4CGI::start_table("width=100%"), &P4CGI::table_row(-align => "left", &P4CGI::ahref(-url => "README.html","Readme file
for admin"), { -text => &P4CGI::ahref(-url => "p4race.cgi", "The great
submit race
"), -align => "right" }), &P4CGI::end_table(), &P4CGI::end_page() ; # # That's it folks #