Perforce基本概念
IDE with versioning plug-in | Other commonly used terms | Corresponding Perforce command |
Add to source control/Perforce | Add | p4 add |
Check out | Edit | p4 edit |
Check in | Submit | p4 submit |
Show differences | Diff | p4 diff |
Get latest version | Sync, Refresh | p4 sync |
Show history | Filelog | p4 filelog |
Undo checkout | Revert | p4 revert |
Remove from source control | Delete | p4 delete |
Basic versioning tasks
Task | Description | Perforce activity |
Add files to the depot | After you add files to your project, you add them to the depot. | Files are opened for add in a pending changelist. |
Retrieve files | Get a copy of a file from the depot. | Files are synced to your computer. |
Check files out | Get the latest version from the depot for editing. | Files are opened for edit in a pending changelist. |
Check files in | Put your edited files in the depot as the most recent revisions. | A pending changelist is submitted. |
Diff files | Compare a file with a previous revision to see what's changed. | The Perforce diff utility is launched to display differences between two versions of a file. |
Revert files | Discard changes you've made to your local copy of a depot file. | The head revision is synced to your client workspace and removed from its pending changelist. |
Delete files | Remove a file from a project and from the depot. | Files are opened for delete in a pending changelist. |
Note that deleting files is a two-part operation: when you delete a file from the project, the file is physically deleted from the file system and opened for delete in a pending changelist. However, the file remains in the depot until you submit the changelist.
Perforce操作的几个点
- 以199.221:10086以及用户名VP01建立connection,注意这个Connection概念。
- Open上述Connection后,需要在本地建立一个workspace,并取名。通常,每个p4 client端的workspace name都各不相同,这会对Switchboard的配置造成一定的困扰
- p4 workspace的本地路径在nDisplay集群的机器上也可能各不相同,这个也会对switchboard的配置造成一定的困扰。尽量保证所有机器上的workspace的本地路径一致
- p4 client界面,左边有两个Tree控件,分别是服务器端depot和本地workspace
- 需要存放到depot进行版本管理的工程,必须放置在本地workspace路径下
- 明白revision与changelist是有区别的。一个changelist是由一些处于特定revision的改动构成的
- 回滚、修改并提交的全流程是:回滚、修改、拉新、处突、提交。
- 新建UE4工程后,首先需要将其提交到depot
- 工程需放置在本地workspace目录下
- 在本地workspace tree中定位到工程目录节点,右键选择[Mark for Add],然后在Saved和Intermediate目录节点上右键并选择[]