Putting a Project under Perforce Control
When you create the project, make sure that the directory where its files reside
is under the client root of the Perforce workspace you intend to use.
To put a project under Perforce control, perform the following steps:
- In the Resource perspective's Navigator pane, right-click the project and
choose Team>Share Project
The Share Project dialog
is displayed.
- From the Repository Type list, choose Perforce and click Next.
The Server Connection Settings dialog is displayed.
- Specify the required settings as follows:
- Port: the name and port of the Perforce server where you want to
store project files, as follows: host:port
- User: your Perforce user name. If the user has a password, enter
it in the Password field.
- Client Workspace: the name of the client workspace configured on
your computer. (Important: project files must reside under the specified
client workspace's root directory.)
- Charset: set this field only if your server is running in
Unicode mode. Consult your Perforce administrator for the required information.
- Click Finish.
- In the Navigator pane, right-click the project folder and choose Team>Open
for Add... The Add dialog is displayed, listing the project files
you are adding to the depot, and the changelist in which you are adding them.
- To select a different changlist, choose the desired changelist from the
Add to Change drop-down list.
- Click OK.
- To submit the changelist, right-click it in the Perforce Pending Changelists
pane and choose Submit... The Perforce Change Specification
dialog is displayed.
- Enter a description and click OK. The project files are added to the depot
according to the settings you specified.
If you subsequently add files to the project, you must also add them to Perforce
(steps 6 through 10 above, or use the corresponding Perforce task created in
the Tasks View). When you add files to a project, a new Perforce task is appended
to the Tasks View, with the description "Local addition not under Perforce
control". To open the file for add and thereby remove the task:
- Right-click on the task.
- Choose Quick Fix
- Choose the Open for Add fix. (To exclude the file from Perforce control
and remove the task, choose Exclude from Source Control.)
To exclude files from source control: in the directory where the files
reside, create a text file named .p4ignore and enter the directories and file
names you want to exclude. When you specify a directory, all its subdirectories are ignored. You cannot use wildcards in .p4ignore
files.
To change server settings for a project that is already under Perforce
control, right-click the project, choose Properties, and click Perforce.
NOTE: P4WSAD does not support deleting, moving, renaming, or refactoring
linked resources (files and folders that are stored in locations in the file
system outside of the project's location).