This is a wrapper for the Perforce "p4" command. It extends "p4" by
adding highly useful commands to the regular set of Perforce commands.
Most extended subcommands take file and/or directory arguments,
recursing on the directories. If no arguments are supplied to such a
command, it will recurse on the current directory (inclusive) by
default. This is the surprise-free behavior CVS users are used to.
So far, the extended list of commands is:
p4 annotate file|dir ...
Generate an annotated listing of each "file", showing who to
blame for each changed each line.
p4 commit [-m msg] [file|dir] ...
A lot like the CVS commit command. Submit files which have been
changed, issuing "p4 edit" commands as needed. Best used when you
like to operate with the "allwrite" option on your workspace.
But certainly a savior if you made changes to files and manually
overrode the readonly file permission (who hasn't?).
The -m msg option is use to specify the log message, in which case
the operation is non-interactive.
p4 import
Add all files in current directory and below to the depot.
CVS style repository vendortag releasetag options are not
currently handled.
p4 log [file|dir] ...
Produce a long listing of the file(s) revision history.
p4 rename from to
Rename the file "from" to name "to".
N.B. it is currently NOT SAFE to do this:
p4 rename xxx yyy
p4 rename yyy xxx
If you decide you want to rename something back to its original
name, then you must rename it three times:
p4 rename xxx yyy
p4 rename yyy zzz
p4 rename zzz xxx
This appears to be a problem within Perforce and has been mentioned
on the Perforce mailing lists, but Perforce has not offered a
solution as far as I can tell.
p4 stat [file|dir] ...
Short and sweet status summary. Stuff you need to get, and stuff
you need to commit.
p4 submit [p4options] [-m logmsg] [p4filespec] ...
Augmented version of p4 submit that allows more than one P4-style
file specification. It also allows the changelog description to be
specified with -m logmsg.
p4 update [file|dir] ...
Get the latest versions of files from the repository (sync).
Then resolve any conflicts.
p4 ws <wsname> [server:port [user [passwd]]]
Create a new workspace named "<wsname>" in the current directory.
The default server:port is perforce:1666, but may be overridden.
QUICKER START
-------------
Make a workspace to hold (potentially all of) the company wide source tree...
mkdir b
cd b
p4 ws my-bravara-tree
Populate the tree with *everything* (optional)...
# current dir is now, say, $HOME/b
p4 update
Add your project...
mkdir myjunk
cd myjunk
# current dir is now, say, $HOME/b/myjunk
echo foo > xxx.c
echo bar > yyy.c
p4 add *.c
p4 commit
Or add it this way...
mkdir myjunk
cd myjunk
# current dir is now, say, $HOME/b/myjunk
echo foo > xxx.c
echo bar > yyy.c
p4 import