Location>code7788 >text

Common Perforce Commands

Popularity:68 ℃/2024-08-13 21:34:28

Perforce tirgger
trig1 change-submit //depot/... " %changelist%"
trig1 change-submit -//depot/products/doc/... " %changelist%"

Parse: trig1 event name, change-submit operation behavior, in addition to submit there are marking and other behaviors can be intercepted
//depot/... Which repository to use - ///depot/products/doc/... Excluding subdirectories
The event run script, which can also be a python py file
%changelist% Script passes information about the submitter, file, etc. of the current event to the script.

In addition to the Perforce trigger, there are a series of automated commands
Create, configure, switch, and delete repository branches
p4 stream 。。。

Create, setup local workspace
p4 client 。。。

Adding files to the server p4 add
Delete file p4 delete
Edit file p4 edit
Query file status p4 filelog/p4 fstat
Query large number of files p4 files
Resolving conflicts between branches p4 resolve
Undo local modifications p4 revert
Undo server version p4 undo
Merge branches p4 copy/p4 merge
Viewing local vs. server differences p4 diff
Submit p4 submit
Grab command returns information
p4 -F %depotFile%;;%clientFile% -ztag fstat file path

Perforce local client setup ignore list
Implementing temporary files without uploading
1. Locally generated .p4ignore text file
2. Setting environment variables
3.p4 set P4IGNORE=.p4ignore
Specific paths or file types are implemented with regulars

Setting up a typemap on a perfore server
Set the encoding and editing permissions for files that are uploaded to the Perforce server by file type
For example, Binary, txt, utf-8, utf16.
Binary+l can only be edited by one person
txt+W can be edited by multiple people

p4 opened -a path to check the status of a file that has been checked out by someone else's checkout add