Help for P4DB

The Perforce Depot Browser

Overview
P4DB is a browser that allows you to explore a Perforce source-code repository (“depot”). P4DB lets you list the source-tree directories, examine files, display information about changes, do “diff”s of file revisions, labels, etc. P4DB does not allow you to affect the depot — you can use it to display information, but you can't change anything with it.

The P4DB Home Page
    Header Information
    Browse Depot Tree
    Pending Changes
    List Branches
    List Labels
    List Users
    Search for file
    View changes for file
    View change number
    Browse a different repository
    List Changes by Branch
    List Opened Files
    List Changes by User
    Get Help
    The Great Submit Race
    Mail
General Information About Viewing Files and File Data
    Displaying the Contents of a File
    Displaying File Data
Frequently Asked Questions
    The P4DB FAQ

The term Legend refers to the gray area at the top of each page.

Header Information
Current change number is the number of the most recent change that was submitted. This number is also the default value for the View change number form — to see the details for the latest change, click on the gray area of the View change number form.

Host is the name of the machine the daemon for the P4 server you are accessing is running on; Port is the port number the daemon is listening on.

Browse Depot Tree
Clicking on Browse Depot Tree will display the Depot Tree Browser page, which allows you to “walk the source-tree”. If the P4 source repository has more than one depot, accessing the Depot Tree Browser page from the P4DB homepage will display a list of the depots. Selecting a depot from this page will then display a list of the subdirectories and files at the top of that depot. If the repository has only one depot, accessing the Depot Tree Browser page from the P4DB homepage will display a list of the subdirectories and files at the top of the depot. As indicated in the Legend for the Depot Tree Browser page, clicking on a subdirectory listed on the page will display a list of the subdirectories and files at that directory level, and so on. If files are listed at the current directory level, clicking on a filename will display the File Log page, which contains the P4 filelog (revision history) information for that file. See the File Log Page section for details.

The Back to line on the Depot Tree Browser page allows you to climb back up the directory tree without having to do it a directory at a time. You can click on any one of the directory elements and go directly to that directory. For example, if you are currently at the //depot/main/docs/intranet/arch directory level and want to return to //depot/main, click on the /main element on the Back to line.

The Depot Tree Browser Legend also contains two “action” options. The View changes for all files below this point option will display a list of all the changes that have been submitted on files in the current directory and on any files in any subdirectories of the current directory. Selecting this option will display the Change History page. As the Legend on the Change History page indicates, clicking on the change number will display the Change <number> page, which contains the details of that change. Refer to the section on View change number for more information regarding the Change <number> page.

The Hide deleted files option is a “toggle” that will either hide or show deleted files. If the current display includes files that have a line through them, this indicates these files have been “deleted” (via a p4 delete). To see the files in this directory without the deleted files being shown, click on Hide deleted files. The files that had been displayed with lines through them will no longer appear, and the “action” option will change to Show deleted files. Click on this option again to redisplay the deleted files.

Note: The “toggle” will stay in its current state until you click on it again. That is, if you click on another directory, and “hiding deleted files” is the current state (the Legend contains Show deleted files), then any subsequent directory listings will not show (i.e.,will be “hiding”) deleted files until you “toggle” the state by clicking on Show deleted files.

Pending Changes
Clicking on Pending Changes will display a list of the changes, for all current P4 users, that have been assigned a P4 change number but have not yet been submitted. If you want to see only the pending changes for a specific user, you can use the View pending changes only for form at the top of the Pending Changes page. A list of all the current P4 users is provided — click on either the “down arrow” or inside the box to get the list, then select the name of the user you want to see pending changes for, and click on Go.

As indicated in the Legend for the Pending Changes page, clicking on a pending change number will display the Change <number> information page, which contains the details of that pending change. (Refer to the section on View change number for more information regarding the Change <number> page.)

List Branches
Clicking on List Branches will display a list of all the branches that have been created for this repository, along with information about each branch. As indicated in the Legend on the P4 Branches page, clicking on the name of the owner of the branch will display the P4 user information. Clicking on the left-side mapping path on the View line will display a list of all the changes that have been put through for all the files in and below that directory. Clicking on the right-side mapping path will display a list of all the changes that have been put through for the branch.

List Labels
Clicking on List Labels will display a list of all the labels that have been created for this repository, along with the date the label was created and the label description. As the Legend for the P4 Labels page indicates, clicking on the label name will display the Label Information page, which contains the full label specification, Legend “action” options, and forms that allow you to:

  • diff the current label against another label, with options to limit the diff
  • view the changes for the current label, while excluding another label
  • search for files in this label
  • The View changes for label_name Legend “action” option allows you to display a list of all the changes that have been submitted for files included on this label. The List files in label_name option allows you to display a list of all the files that are included on this label. Caution: Some labels can contain many thousands of filenames, so getting a full list of the files on a label can be fairly slow and local-resource intensive.

    The Diff with label form allows you to select a label to diff against the current one. The Show files that form allows you to limit the files displayed from the diff to:

  • just those files that are not modified between the two labels (files that exist on both labels, and at the same revisions);
  • just those files that are modified between the two labels (files that exist on both labels, but at different revisions);
  • just those files that differ between the two labels (files that exist only on one or the other label, but not both).
  • You can combine these options in any way you choose. For example, to see a list of all the files in common between the two labels but that are at different revisions, as well as all the files that exist on only one or the other of the labels, turn on both the are modified and the differ options. (This is the default setting when you first access this page.)

    If you turn off all these options, the Label Diff page will display only the label specifications for the two labels, a file count for each label, and a count of the number of files the two labels have in common, including a count of those at the same revision numbers.

    The View changes for label_name excluding label form allows you to display a list of all the changes that have been submitted for the files on the current label, except those changes that also occur on the excluded label.

    The Search in label for form allows you to search the label for files that match the pattern you specify. The pattern can be either a specific filename, or it can be specified using the P4 wildcards “” and “*”. (Refer to the Search for file section for more details regarding using wildcards.)

    List Users
    Clicking on List Users will display the list of all current P4 users. As indicated in the Legend for the P4 Users page, clicking on the email address will generate a mail message to that user. To send mail to all the current P4 users, select the Mail all users Legend “action” option.

    Clicking on the user name will display the P4 User Information page, which contains the user information as well as a list of all the files currently opened by that user. As the Legend for the P4 User Information page indicates, clicking on the email address will generate a mail message to that user. Clicking on the filename of an opened file will display the filelog for that file. The Legend also contains an “action” option that allows you to display a list of the user's clients. Note: Because of an oversight in the output of the p4 clients command, generating a list of a clients owned by a particular user is a somewhat lengthy process, so expect it to take a minute or two to complete. Selecting the Display user's clients option will redisplay the P4 User Information page with the list of clients included. Note that the Legend now also indicates that clicking on a client name will display the P4 client information.

    Search for file
    This form allows you to search the source-tree for files that match the pattern you specify. The pattern can be either a specific filename, or it can be specified using the P4 wildcards “” and “*”. For example:

  • To find all the files named build.jam under the //depot/main directory and all its subdirectories, enter:
    //depot/main/...build.jam
  • To find all the build.jam files that live only in a direct subdirectory of //depot/main/java, enter:
    //depot/main/java/*/build.jam.
  • To find all the files throughout the entire repository that end with .java, enter:
    //...*.java
  • To find all the files that live in directories with “doc” in the directory name, enter:
    //.../*doc*/...
  • The results of the search are displayed on the Search Results page, which includes the number of files found that match the pattern, the list of files found, and, if the search resulted in more than one file being found, a View diff between form that allows you to diff any two of the files listed. The default values for this form are the first and second files listed.

    View changes for file
    This form allows you to display the changes for files that match the pattern you specify. The pattern can be either a specific filename, or it can be specified using the P4 wildcards “” and “*”. (Refer to the Search for file section for more details regarding using wildcards.)

    View change number
    This form allows you to specify a change number to see the details of that particular change. The default value for this form is the change number of the most recently submitted change. To see the details for the default change number, click on the gray area of the View change number form.

    The details of the change are displayed on the Change <number> page. This page contains:

  • the name of the P4 user who submitted the change,
  • the name of the P4 client that was used,
  • the date the change was submitted (or last modified),
  • the description of the change, and
  • the P4 Jobs the change fixed (if implemented).
  • Below this is the list of the files that comprised the change.

    As the Legend for this page indicates, clicking on the user's name will display the P4 user information. Clicking on the action will display the diff the change generated for that file. Clicking on the revision number will display the contents of that file at that revision. Clicking on the filename will display a P4 filelog for that file.

    If more than one file was submitted for the change, the Diff all files in change option will be displayed at the end of the list of files. Selecting this option will display the Diff Output page, which will contain the diffs for each file included in the change.

    Also included on the Change <number> page, directly below the legend, is the option to either go to the previous change, or the next change (unless this change is the latest submitted change).

    Browse a different repository
    This form allows you to browse a different repository by entering either a new host name or new port number, or both, in order to change the P4 server you are accessing. For example, if you want to access the source repository at Perforce that is available to the public, enter public.perforce.com in the left-hand side of the form. If the port number, in the right-hand side of the form, is already set to 1666, click on Go; otherwise, first change the port number to 1666, then click on Go.

    List Changes by Branch
    Clicking on List Changes by Branch will display a list of all the branches in the repository. As indicated in the Legend on the Changes by Branch page, clicking on one of the branch names will display a list of all the changes that have been submitted into that branch. To see a list of only those changes submitted by a specific user, use the View branch changes only for form at the top of the page. A list of all the current P4 users is provided — click on either the “down arrow” or inside the box to get the list, then select the name of the user you want to see pending changes for, and click on Go.

    Note: If you know the branch path, you could also see the branch changes by clicking on Browse Depot Tree, then working your way through directories on the Depot Tree Browser pages to get to the branch path, and selecting the View changes for all files below this point option to see the same list of changes — List Changes by Branch is offered as a short-cut, as well as offering the option to list branch changes only for a specific user.

    List Opened Files
    Clicking on List Opened Files will display a list of all the currently opened (via a p4 add, p4 delete, or p4 edit command), for all users, in all clients. To see only the opened files for a specific client, use the View opened files only for client: form at the top of the list of files.

    As indicated by the Legened for the Opened Files page, clicking on the revision number will display the contents of that file at that revision, clicking on the user name will display the P4 user information for that user, clicking on the client name will display the P4 client information for that client, and clicking on the filename will display the filelog for that file. For any file that has a change number (rather than (default)) in the Change column, you can click on that change number to see the details of that (pending) change.

    List Changes by User
    Clicking on List Changes by User will display a list of all the current P4 users. As indicated in the Legend on the Changes by User page, clicking on one of the user names will display a list of all the changes that have been submitted by that user. As indicated by the Legend on the Change History page, click on a change number to display the Change <number> page and see the details of that change. (Refer to the section on View change number for more information regarding the Change <number> page.)

    Get Help
    Click on Get Help to access this help page.

    The Great Submit Race
    Have fun! …

    Mail
    If you have any questions or concerns about the P4 source tree (e.g., some branch looks wrong, is obsolete, a file isn't showing up where it should be, etc.), click on P4 Administrator to send mail.

    If you have questions, suggestions, problems, bugs to report, etc. about P4DB itself, click on P4DB Administrator to send mail.

    Displaying the Contents of a File
    Revision Number
    On any page that includes a revision number for a file, click on the revision number to see the text of the file at that revision. The contents of the file will be displayed on the File View page. The Legend for this page varies, depending on the type of file being displayed. Some types of files can be displayed as their end-product rather than their source. The following file extensions are treated by P4DB as specially viewable files:

  • .html and .htm for HTML files
  • .gif for GIF files
  • .jpeg and .jpg for JPEG files
  • .doc for MS-Word files
  • .dot for MS-Word Template files
  • .ppt for MS-PowerPoint files
  • .pdf for PDF files
  • .rtf for RTF files
  • For example, if you are viewing the source-file for an HTML file, the Legend will contain four “action” options. Select the View HTML file using browser option to display the file as it would appear if you brought it up in your browser as a URL. Select the About Links and the HTML File Viewer option to display a short explanation of how links are handled by the HTML file viewer.

    For all except binary files, you can click on the View line-by-line history trace option to display the file as output from the p4pr utility, which produces an audit of the file, showing for each line the change number, who made the change, and at what revision the line was changed.

    All file types offer the the Download file “action” option. Select this option to save the file locally.

    Displaying File Data
    Change Number
    On any page that includes a change number for the file, click on the change number to see the details of that change.

    Action
    On any page that includes an action for the file, click on the action to see the diffs that action generated.

    Filename
    On any page that includes a filename, click on the filename to see a P4 filelog (revision history) for that file.

    The File Log Page
    The File Log page displays the revision history of a file. As the Legend for the File Log page indicates, clicking on a change number will display the details of that change. Clicking on an action will display the diffs that were generated by that change. Clicking on a revision number will display the contents of the file at that revision. Clicking on the user who submitted the change will display the P4 user information for that user.

    Also included in the File Log page Legend are two “action” options. The Changes option will display the Change History page, which will contain a list of all the changes that have been submitted that included this file. The List labels option will redisplay the File Log page, additionally displaying information about any labels this file is included on.

    The File Log page also includes a form that allows you to diff two revisions of the file. The default setting for the Show diff between revision form is the latest revision and the next-to-latest revision. To change the revision numbers, click on either the “down arrow” or inside the box to get the list of revision numbers, then click on Go.

    P4DB FAQ
    At this point, there isn't one. If you have any questions about how to use P4DB that haven't been covered by this help page, you are welcome to send mail to the P4DB Administrator — click on P4DB Administrator on the Mail line at the bottom of any P4DB page. The FAQ for P4DB will grow as questions about it come up.