<TITLE>Issuing P4 Commands</TITLE> 
  <p> For details about p4 commands, refer to the <i>Perforce Command Reference</i>. 
  To issue P4 commands using P4Web: 
  <p>Click <img src="/p4cmd?icon">. P4Web displays the <b>P4 Command</b> 
    field.
  <p>Type your command into the field (omitting "p4") and click <b>Go</b>. 
    Results are displayed as text. 
  <p>  To specify paths that include spaces, enclose the path in double quotes. 
    For example: 
  <pre>     fstat "//depot/dir/file name.h"</pre>
  <p> 
  <p> <b>Note</b>: Due to a limitation of http protocol, you cannot specify filenames 
    that contain the special characters @ or # when issuing commands using the 
    P4 tab. 
  </p>
  <h4>Embedding P4 Commands in URLs </h4>
  <p>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.)</p>
  <p> To embed commands in URLs, use the following format:: </p>
  <blockquote> 
    <p><tt>http://[<i>webhost</i>:<i>port</i>]/p4 <i>command</i> [<i>cmdflags</i>] 
      [<i>args</i>]?ac=160</tt> (or <tt>ac=161 </tt>for tagged output)</p>
  </blockquote>
  <P><b>Example</b>: <tt>http://localhost:8080/p4 client -d oldclient?ac=160</tt> 
  <h4>Entering revision specifiers</h4>
  <p>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 @. </p>
  <p><b>Example</b>: for <tt>//depot/s/myfile.cpp#9</tt> enter: </p>
  <blockquote> 
    <pre>//depot/s/myfile.cpp%3e%25239</pre>
  </blockquote>
  <p> 
  <h4>Specifying special characters</h4>
  <p>Spaces can be entered as is or specified as %20.</p>
  <p><b>Example</b>: <tt>http://localhost:8080/p4%20clients?ac=161 </tt> 
  <p>To specify a percent sign in a file name, enter %25. 
  <p> <b>Example</b>: for <tt>//depot/s/per%25cent.txt</tt>, enter: 
  <blockquote> 
    <pre>//depot/s/per%2525cent.txt</pre>
  </blockquote>
  <h4>Limitations on commands</h4>
  For commands issued through the P4 tab or in URLs, the following limitations 
  apply: 
  <ul>
    <li>In Browse mode, you cannot issue commands that update the workspace (for 
      example, <tt>p4 sync</tt>).<p></li>
    <li>For commands that display forms to edit specifications (for example, <tt>p4 
      client</tt>), you must specify the <tt>-o</tt> flag. <b>Result</b>: the 
      browser displays the specification text. The following p4 commands require 
      the <tt>-o</tt> flag 
      <ul>
        <li> <tt>branch</tt></li>
        <li><tt> change</tt></li>
        <li><tt> changelist</tt></li>
        <li><tt> client</tt></li>
        <li><tt> depot</tt></li>
        <li><tt> group</tt></li>
        <li><tt> job</tt></li>
        <li><tt> jobspec</tt></li>
        <li><tt> label</tt></li>
        <li><tt> user</tt></li>
        <li><tt> workspace</tt><p></li>
      </ul>
    </li>
 
    <li>You cannot specify p4 flags in URL commands, only command-specific flags. 
      For details about command flags, refer to the <i>Perforce Command Reference</i>. 
      The following p4 flags are invalid in URL commands: 
      <ul>
        <li><tt>-C <i>charset</i></tt></li>
        <li><tt> -c <i>client</i></tt></li>
        <li><tt> -d <i>dir</i></tt></li>
        <li><tt> -G</tt></li>
        <li><tt> -h</tt></li>
        <li><tt> -H <i>host</i></tt></li>
        <li><tt> -L <i>language</i></tt></li>
        <li><tt> -P <i>password</i></tt></li>
        <li><tt> -p <i>port</i></tt></li>
        <li><tt> -s</tt></li>
        <li><tt> -u <i>user</i></tt></li>
        <li><tt> -V</tt></li>
        <li><tt> -x <i>file</i></tt></li>
      </ul>
    </li>
  </ul>
                    | # | Change | User | Description | Committed | |
|---|---|---|---|---|---|
| #1 | 12234 | Matt Attaway | Rejigger P4Web project in preparation for official sunsetting The bin directory contains the last official builds of P4Web from the Perforce download site. P4Web is soon to be completely sunsetted; these builds are here for folks who don't want to build their own. To better handle the archived builds the source code has been moved into a separate src directory. | ||
| //guest/perforce_software/p4web/Help/commands.html | |||||
| #1 | 8914 | Matt Attaway | Initial add of the P4Web source code | ||