Login a perforce server: using shelf script login_p4.sh
#!/bin/sh
export p4user=user_name
export p4client=client_name export
p4port=server_address
Then run the script:
$. login-p4.sh
Here you create a
Then log on to the Perforce server:
$p 4 Login
You will be prompted to enter a password.
After you log in, you can save a folder for your project, of course it's mkdir. Suppose the items downloaded from the server are placed under the MyProject directory.
Enter the MyProject directory. Perform
$p 4 Client
Then modify the path where you need to download a project folder under the server and the local MyProject that holds the project.
After everything set the number, then it is downloaded. You can use the following command:
$p 4 Sync
After the execution, the machine will slowly download.
To do the project directory and how to modify a file, execute:
P4 edit file_name
To view the Changelist command:
P4 Changelist
If you modify a lot of files, and you need to see the modified files:
P4 opened
If you need to discard the modified file:
P4 revert file_name
Submit directly when required.
P4 submit
If a changelist number is prompted, the changelist number is required to submit:
P4 Submit-c Changelist_num
Common Perforce Commands:
1, P4 client #配置本地信息, where the file download is configured in this area, root
2, p4 sync #从perforce download files
3, P4 login #登陆perforce
4. P4 Help #显示关于命令的帮助
5, P4-h #显示关于p4的帮助
6, P4 labels ... #显示和这个目录相关的标签
7, P4 sync @dyoldfish_label #同步标签dyoldfish_label中的所有文件
8, P4 files @dyoldfish_label #查看标签dyoldfish_label所包含的文件列表
9, P4 revert #回复所有打开的文件
10, p4 revert-n ... #回复所有打开却没提交的文件
11, P4 branch Dyoldfish_brach #新建分支
12, p4 Integrate-b Dyoldfish_brach #合并分支dyoldfish_brach中描述的文件
13, P4 opened #查看打开的文件
14, p4 help commands #查看p4所有命令的帮助
15, P4 dirs-h. #显示当前目录
16, p4 branches #显示所有的分支
17. P4 Delete filename #从p4删除文件
18, p4 changelists-l ... #显示当前目录下面所有文件的修改注释
19, P4 label Dyoldfish_label #新建标签 Dyoldfish_label, edit label
20, p4 tag-l Dyoldfish_label ... #把当前目录下面的所有文件添加到标签 dyoldfish_label
21, p4 changes ... #当前目录的changelist
22. P4 Sync @10931 #sync file @changelist
23, P4 sync ... @10929 #only sync localfile@changelist
24, p4 help revisions #查看关于文件范围的帮助
25. P4 edit FileName Edits the file, which is equivalent to check out in the graphical interface for more information about the use of the Perforce command:
PERFORCE 2014.1:command REFERENCE
How to use P4 on a virtual machine