Showing posts with label Perforce. Show all posts
Showing posts with label Perforce. Show all posts

Monday, May 11, 2009

Perforce client command line usage start up

更多精彩请到 http://www.139ya.com

转自: http://tomboxfan.javaeye.com/blog/315066

Step 1) Find where perforce is installed on the unix box.

Say this folder: /home/pvprapp1/opt/perforce



Step 2) Export the environment variable.

Issue command: EXPORT PATH=$PATH:$HOME/opt/perforce/bin

Issue command: EXPORT P4PORT=...net:1999





Step 3) At this time, you can issue p4 command, and see a help menu.

Issue command: p4



Step 4) Config the client setup.

Issue command: p4 client



Step 5) The above command will bring you to a vi editor. There, you can edit all the configurations.

Client: --- This is the P4CLIENT value

Root:

View:



Issue command: EXPORT P4CLIENT=

In your later uage, you need to put your 3 EXPORT(PATH, P4PORT, P4CLIENT) into your .bashrc in your ~ folder.



Step 6) Synchronize with Perforce to get all the source code

Issue command: p4 sync

Monday, April 27, 2009

linux下perforce(p4)的使用方法和命令

更多精彩请到 http://www.139ya.com


环境变量:
export P4PASSWD=abcdefg
export P4CLIENT=dyoldfish.com
export P4USER=dyoldfish
export P4PORT=192.168.1.198:1666
命令:
1、p4 client #配置本地信息
2、p4 sync #从perforce 下载文件
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、4 dirs -H . #显示当前目录
16、p4 branches #显示所有的分支
17、 p4 delete filename #从p4删除文件
18、p4 changelists -L ... #显示当前目录下面所有文件的修改注释
19、p4 label dyoldfish_label #新建标签 dyoldfish_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 #查看关于文件范围的帮助