p4status works like
git status (or
svn status), but works in Perforce.
It will list changelist files and locally modified files that haven’t been added to any changelist (including unadded files) in a readable format.
[dfoster ~/dev/p4/mybranch/path/to/myproject]$ p4status # On changelist 154055 # # Changes to be committed in changelist default: # (use "p4 revert <file>..." to discard changes in working directory) # # deleted: server/apps/setupfx/splunkd/default/extract.conf # # Changes to be committed in changelist 154076: # (use "p4 revert <file>..." to discard changes in working directory) # # new file: server/apps/setupfx/splunkd/default/inputs-NEW.conf # modified: server/apps/setupfx/splunkd/default/inputs.conf # # Changes not staged for commit: # (use "p4 add/edit/delete <file>..." to update what will be committed) # (use "p4 sync -f <file>..." to discard changes in working directory) # # new file: server/apps/setupfx/splunkd/default/inputs-NEW2.conf #
chmod a+x p4status
cdto the primary directory that you’ll be working under.
Only detects unstaged files under the directory in which the command is run. Therefore it is best to reserve a terminal window that is
cd-ed to the correct place where this command can be run safely.
This command is too slow to run from the root of very large branches.