|
Displaying branch specifications
Branch specifications map one set of files to another, and are typically used to simplify and standardize the integration of one codeline to another.
To display branch specifications, do any of the following:
- Click
.
- Press F8.
- Choose View>BranchSpecs.
- Choose BranchSpec>View BranchSpecs.
Managing branch specifications
A branch specification enables you to store file relationships for subsequent use when you integrate files. You can use the branch specification instead of a file specification when you integrate files.
To create a branch specification:
- Choose BranchSpec>New... The Perforce Branch Specification dialog is displayed.
- In the Branch field, specify the name you want to assign to the codeline (branch).
- In the View field, specify the locations of the source and target files.
- Click Update to save your entries.
For details about the fields in the Perforce Branch Specification form, click FormInfo.
To edit a branch specification:
- Click
to display branch specifications.
- In the right pane, right-click the specification you want to change and choose Edit Spec... The Perforce Branch Specification dialog is displayed.
- Enter your changes and click Update.
To delete a branch specification:
- Click
to display branch specifications.
- In the right pane, right-click the specification you want to change and choose Delete Spec... An "Are you sure?" prompt is displayed.
- Click Yes to delete the branch specification.
Integrating files into codelines (branches)
Integration enables you to branch new files from existing ones and to merge changes between branched files. There are two ways to integrate files:
- File specification: you specify the source and target files when you open files for integrate.
- Branch specification: you select a branch specification when you open files for integrate. The branch specification identifies the source and target files.
If you open existing files to integrate to merge changes into them, you must resolve the files before you can submit them. For details, see "Resolving files" on page 42.
To branch new files using a file specification:
- In the left pane, select the folders and files you want to integrate.
- Right-click and choose Integrate>Using Filespec... from the context menu.
- In the Target Filespec field, specify the location where you want the branched files to be created.
- Using the Open file(s) under Changelist field, specify the changelist you want to use for the opened files.
- Click OK. The files are added to the specified changelist.
- To branch the files, submit the changelist.
- For details about integration options, see "Specifying file integration options" on page 51.
To branch new files using a branch specification:
- In the left pane, select the folders and files you want to integrate.
- Right-click and choose Integrate>Using Branchspec... from the context menu. The File Integrate - Select Branchspec dialog is displayed.
- Click the branch specification you want to use, then click Next. The File Integrate using Branchspec dialog is displayed.
- To restrict the list of files to be integrated, edit the entries in the File Specifications list.
- Using the Open file(s) under Changelist field, specify the changelist you want to use for the opened files.
- Click Finish. The files are added to the specified changelist.
- To branch the files, submit the changelist.
To integrate files from a submitted changelist:
- In the right pane, display submitted changelists.
- Right-click the submitted changelist that contains the files you want to integrate.
- Choose Integrate>Using Branchspec... or Integrate>Using Filespec... from the context menu, and proceed as described above.
Specifying file integration options
When you integrate files using a file specification, you can specify the following options:
- Integration options tab
Option
|
Description
|
---|
Force reintegration of all source files even if some are already integrated
|
Requires all revisions of the source files to be resolved, regardless of whether the revision has already been integrated.
|
Do not copy new files to workspace
|
Create virtual copies in your workspace when creating a codeline (branch).
|
Delete source file(s), for rename operation
|
Open source file for delete at the same time as opening the target file for integration from the source file.
|
Permit deletes/re-adds
|
Allow an integration that opens the target file for delete when the source file has been deleted, and allow an integration that branches a new target file that was previously deleted.
|
Enable baseless merges
|
Allow merging to target files that were not branched from the selected source files.
|
- Revision range options tab: enables you to specify the range of source file revisions to be integrated. You can specify a revision number, changelist number, label, or date.
|
|
Displaying labels
You can display labels as follows.
- Click
.
- Press F9.
- Choose View>Labels.
- Choose Label>View Labels.
To display the files in a label, right-click the label and choose List files at Labelname. The files in the label are listed in the output pane.
Managing labels
Labels are named collections of file revisions. You can use labels to sync a group of file revisions in a single operation. A label specification describes a subset of depot files using a label view.
To create a label specification:
- Choose Label>New... The Perforce Label Specification form is displayed.
- In the Label field, specify the name of the label.
- In the View field, specify the depot file revisions you want to include in the label.
- Click Update to save your entries.
For details about the fields in the Perforce Label Specification form, click FormInfo.
To create a label specification using a template:
- In the right pane, right-click the label you want to use as a template.
- From the context menu, choose Create/Update Label Using Labelname as Template. The Create or Update Label From Template dialog is displayed.
- Enter the name of the label you want to create. The Perforce Label Specification form is displayed.
- In the Label field, specify the name of the label.
- In the View field, specify the depot file revisions you want to include in the label.
- Click Update to save your entries.
To sync labelled files to your client workspace:
- In the right pane, right-click the label you want to use.
- From the context menu, choose Sync client Clientname to label Labelname. The labelled file revisions are synced to your client workspace.
To change the files a label can contain:
- In the right pane, right-click the label you want to change.
- From the context menu, choose Edit Spec Labelname.
- In the View field, change the entries to specify the files you want to include.
To label files in the client workspace:
- In the right pane, right-click the label you want to change.
- From the context menu, choose Replace files in label Labelname with client Clientname files. A confirmation dialog is displayed.
- Click Yes to replace the files in the label with the file revisions currently in the client workspace.
To delete a label:
- In the right pane, right-click the label you want to delete.
- From the context menu, choose Delete Labelname. An "Are you sure?" prompt is displayed.
- Click Yes to delete the label.
|