<HTML> <HEAD> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1"> <META NAME="GENERATOR" CONTENT="Mozilla/4.03 [en] (X11; I; Linux 2.0.30 i586) [Netscape]"> <META NAME="Author" CONTENT="fredric@mydata.se"> <META NAME="Description" CONTENT="Information on how to install andmaintain P4DB"> <TITLE>Developers README file for P4DB</TITLE> </HEAD> <BODY> <CENTER> <H1> A developers README for P4DB</H1></CENTER> <H2> Introduction</H2> <H3> Abstract</H3> This is a README for P4DB, a CGI based p4 depot browser written by Fredric Fredricson (<A HREF="mailto:fredric@mydata.se">fredric@mydata.se</A>) (One part is written by Bob Sidebotham, no email available). The README is intended for administrators and others that want to install, maintain, and possibly contribute to, this sw package. You can read it anyway if You like but You will probably do quite well without. <H3> More introduction</H3> P4DB (P4 Depot Browser) was created to present information about the contents in the p4 depot in a nice way. Some CGI's also combine output from two or more p4 commands. The driving force behind the development has been my needs as a manager for a software team and the needs for our project leaders. <P>The browser was developed for and runs on a Linux/Apache system and has been tested mainly with Netscape 4 although some of our users use MS Explorer and no problems has been reported. <H3> History</H3> The application was developed from a depot browser, perfbrowse.perl, made available by <A HREF="http://www.perforce.com">Perforce</A> at <A HREF="http://www.perforce.com/perforce/loadsupp.html#browse">http://www.perforce.com/perforce/loadsupp.html#browse</A> <P>Perfbrowse.perl is written in perl and the author is unknown to me. Some code from perlbrowse.perl remains in P4DB but most parts are completely changed. The parts left untouched are the ones that were so good that I did not understand them. <P>The idea is also stolen so I can't claim that one. <P>To view file a script by Bob Sidebotham called <A HREF="p4pr.perl"><tt>p4pr.perl</tt></A> is used. This script is also made available by Perforce at <A HREF="http://www.perforce.com/perforce/loadsupp.html#util">http://www.perforce.com/perforce/loadsupp.html#util</A> (only I made some minor changes and one bug fix). <P>The reason I started to do this was that I liked perfbrowse.perl very much but wanted just a little more functionality. I started to add functionality and it quickly got out of hand. Soon I had a huuuge perl script that I could no longer maintain. Once I realized that I can write a perl script that is about 2-4 times the size of the script that I can maintain I decided to rewrite it all from the start as a set of small, maintainable, perl scripts. I leave to others to judge if I succeeded in my mission. <BR><I>(Maybe I should mention that it took much more time than I anticipated).</I> <H2> Installation</H2> <H3> First: Where to install</H3> Other than the obvious, that is somewhere in a http servers CGI path, I recommend You to set up a http server on Your p4 server and run P4DB on the server. The main reasons are that it improves response time and reduces load on network. <P> One argument against this may be that You want to keep Your server clear from other apps that might create problems. Personally I don't think this is a very good one but this is up to You. <H3> How to install</H3> You obviously got to this README. Together with README.html file You got a file "install.pl". <BR>Type "<TT>perl install.pl</TT>" To install all scripts. This is the theory, at least. I have not tested it on many systems <P>Install will first find out if You have CGI.pm installed and if not a copy will be unpacked. Second it will find out the path to perl, unpack all cgi scripts and modify the first line to contain the local path to perl. <P>For more details, see the comments inside the <A HREF="install.pl">install.pl</A> scripts. <H3> How to configure</H3> You will need to configure the scripts. The basic configuration file is called <TT>config</TT>. To create a configuration file copy the file <TT><A HREF="config.org">config.org</A></TT> to <TT>config</TT> and modify it. <BR>The configuration file is a perl script but very little knowledge of perl should be required to configure it. <P>To make some handy shortcuts available for the users there is a file called <TT>CODELINES</TT>. See the sample file <TT><A HREF="CODELINES.sample">CODELINES.sample</A></TT>. <H4>Before You start</H4> To make sure everything works smoothly You will probably need to manually run the <A HREF="dtb_update.pl ">dtb_update.pl </A>perl script once. This script creates some data files used to accelerate the "Browse Depot Tree" function. <H2> Warranty</H2> If You get any problems because of these scripts I promise to feel sorry for You. Other than that you are on Your own. <H2> Known Bugs</H2> <LI> Deleted files can't be viewed</LI> <LI> A serious case of feature-bloat</LI> <LI> Should probably be written in Java or some other language</LI> <LI> Sometimes slow.....</LI> <H2> Would You like to contribute?</H2> If You would like to contribute changes/improvements/new functions feel free to do so and mail them to me and I will add them to the next "release" (flames and flattery are also welcome). <P><B>Disclaimer</B>: I may grow tired of this project or change job or die or something in which case my promise above probably expires. <H3> What would be a contribution?</H3> I will be glad for any kind of contributions ranging from corrections of my bad English to new interesting functionality. Nice letters are also welcome. <H2> Design documentation</H2> The most important documentation is in the P4CGI.pm module. This modules is used by all scripts and contains a set of common functions that are a) useful or b) defines some common "look and feel" or c) both. <P>The P4CGI.pm module is documented using perlpod (see perlpod man page). To get a HTML page containing documentation type: <BR><TT>pod2html P4CGI.pm ><A HREF="P4CGI.html">P4CGI.html</A></TT> (There is one distributed with P4DB, for convenience) <P>For other files: more often than not the code is commented. <P>There are five different files 'types' in the design: <DL COMPACT> <DT> P4CGI.pm</DT> <DD> - A perl module containing functions that I find useful and all other scripts use</DD> <DT> *.cgi</DT> <DD> - A set of cgi scripts that are used as ...eh.. cgi-scripts.</DD> <DT> *.pl</DT> <DD> - Perl scripts that usually updates temporary data files. These scripts does not generate HTML output. (so far there is only one such script)</DD> <DT> /tmp/...</DT> <DD> - A set of temporary files that contain preformatted data to make access times acceptable.</DD> <DT> p4pr.perl <DD> - The script by Bob Sidebotham I mentioner earlier </DL> NOTE! The P4CGI.pm module "knows" if it is used in a cgi script or a regular perl script by checking for .cgi extension. <P>The code also uses the CGI.pm perl module. This module should be part of the "standard distribution" of perl (if there is such a thing). On my target system it was not available so I included a copy with the rest of the script. <P>As a part of my personal religion the -w flag is always turned on and 'use strict' flag is also set. I have never had any reason to regret this particular peculiarity of mine. <P>Performance has not been a great issue. I assume that these cgi's will not have thousands of hits each day and the design has focused on ease of development rather than speed. </BODY> </HTML>
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#2 | 1883 | rmg |
In preparation for updating to the latest P4DB (2.01), delete all the current files here. |
||
#1 | 11 | Perforce maintenance | Add Fredric Fredricson's depot browser, P4DB. |