P4Web Release 2012.1 User Guide
[Getting Started]  [How To...]  [Browser Tips]  [Glossary]  [Road Map]  

Issuing P4 Commands

For details about p4 commands, refer to the Perforce Command Reference. To issue P4 commands using P4Web:

Click . P4Web displays the P4 Command field.

Type your command into the field (omitting "p4") and click Go. Results are displayed as text.

  To specify paths that include spaces, enclose the path in double quotes. For example:

     fstat "//depot/dir/file name.h"

Note: Due to a limitation of http protocol, you cannot specify filenames that contain the special characters @ or # when issuing commands using the P4 tab.

Embedding P4 Commands in URLs

You can execute p4 commands by embedding them in URLs. Command results are displayed by your browser as text. (This feature is notably useful for Java applications.)

To embed commands in URLs, use the following format::

http://[webhost:port]/p4 command [cmdflags] [args]?ac=160 (or ac=161 for tagged output)

Example: http://localhost:8080/p4 client -d oldclient?ac=160

Entering revision specifiers

On the command line, revision ranges are preceded by either # (for numeric revision specifiers) or @ (for dates, labels, or changelists). To embed revision specifiers in URLs, append %3e followed by %2523 for # or %2540 for @.

Example: for //depot/s/myfile.cpp#9 enter:

//depot/s/myfile.cpp%3e%25239

Specifying special characters

Spaces can be entered as is or specified as %20.

Example: http://localhost:8080/p4%20clients?ac=161

To specify a percent sign in a file name, enter %25.

Example: for //depot/s/per%25cent.txt, enter:

//depot/s/per%2525cent.txt

Limitations on commands

For commands issued through the P4 tab or in URLs, the following limitations apply:


Copyright 2012 Perforce Software. All rights reserved.