#!/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<br> P4 Depot Browser", "<CENTER><SMALL>Hint:". "You can bookmark any page You want to get back to later</SMALL></CENTER>") ; # 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(<D>) { chomp ; /^\#/ and do { next ; } ; /^\s*(\/\/.*)/ and do { $CODELINES[@CODELINES-1] .= &P4CGI::ahref(-url => &P4CGI::CHB_URL(), "FSPC=$1",$1) . "<BR>" ; next ; } ; push @CODELINES,"<B>$_</B>" ; push @CODELINES,"" ; } close D ; } else { @CODELINES = ("Full Depot Source", &P4CGI::ahref(-url => &P4CGI::CHB_URL(), "FSPC=//...", "//..." )) ; } ; print &P4CGI::dl_list(@CODELINES) ; print "<hr>", &P4CGI::start_table("width=100%"), &P4CGI::table_row(-align => "center", &P4CGI::ahref(-url => &P4CGI::DTB_URL(), "<font size=+2>Browse depot tree</font>"), &P4CGI::ahref(-url => &P4CGI::CHB_URL(), "FSPC=//...", "STATUS=pending", "<font size=+2>Pending changes</font>"), &P4CGI::ahref(-url => &P4CGI::LAB_URL(), "<font size=+2>Branches</font>"), &P4CGI::ahref(-url => &P4CGI::LAL_URL(), "<font size=+2>Labels</font>"), &P4CGI::ahref(-url => &P4CGI::LAU_URL(), "<font size=+2>Users</font>")), &P4CGI::end_table(), "<hr>" ; 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"), "<hr>", &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), "<br>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"), # "<hr>", &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 "<hr>", &P4CGI::start_table("width=100%"), &P4CGI::table_row(-align => "left", &P4CGI::ahref(-url => "README.html","Readme file<br>for admin"), { -text => &P4CGI::ahref(-url => "p4race.cgi", "<font size=-1>The great<br>submit race</font>"), -align => "right" }), &P4CGI::end_table(), &P4CGI::end_page() ; # # That's it folks #
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#1 | 2778 | Jay Han | creating guest branch per tutorial http://public.perforce.com/public/tutorial.html | ||
//guest/perforce_software/utils/p4db/P4DB_0/index.cgi | |||||
#1 | 1885 | rmg |
For posterity: Make the old version appear in a "P4DB_0" subdirectory. (I'd have called it 0.99, but I'm not sure it really *is* 0.99!) |
||
//guest/perforce_software/utils/p4db/index.cgi | |||||
#2 | 12 | Perforce maintenance |
P4DB now browses all depot root paths, not just "//depot/...". (Note: This breaks the "Browse depot tree" function on the main form -- will fix later.) |
||
#1 | 11 | Perforce maintenance | Add Fredric Fredricson's depot browser, P4DB. |