Branch and Tag Support in Perforce
Perforce is a Software Configuration Management system which let developers manage the changes they made when developing software. VP products can talk to Perforce directly to provide revision control and collaboration functionality. You can import projects, commit and update you modeling project to the Perforce repository. If them is more than one team member modifying the same set of model at the same time, you can also resolve conflicts with the assistance of the comprehensive conflict resolution UI.
Other than primitive revision control and collaboration, you can also manage your modeling projects with branches and tags. Branches are separate lines for development isolated from the main line, to avoid making unstable changes to the main lone. Once the changes are stable enough, the branch can be merged back into the main project(the trunk). Branches from a project can keep a model going on with the core project is keep stable. Tags are marked for milestone or release-quality projects, so used to keep your work isolated from any changes.
Importing a project into the Repository
Select
Tools > Teamwork > Open Teamwork Client... from the main menu (or click on the
Open Teamwork Client button on the tool bar).
This shows the
Login to the Teamwork Server dialog box. Select
Perforce as the
server and enter the fields. Then click
OK to connect to the server.
| Field | Description |
| User name | The name of user under which to connect |
| Password | Password for user |
| Perforce path | The path of the p4.exe file |
| Host | The address of the host (ip / host name) |
| Port | The port number assigned to the Perforce server |
Since we are going to create a new project, there is no need to select a project, click
Cancel to proceed.
In the
Teamwork Client dialog box, select
Import Project to the Repository (or click on the
Import Project to the Repository button on the tool bar).
This shows the
Import Project dialog box. To create a new project, select the folder for containing the project.
Enter the project name and select the source of the project file. We will create a new one. It is also possible to use the currently opening file to be the source, or import from an external project.
Click OK when it is done.
Managing a project in the Teamwork Client
Follow the first three steps shown in the above section to connect to Perforce Repository.
In the
Teamwork Client dialog box, select
Manage Project (or click on the
Manage Project button on the tool bar).
This show the
Manage Project dialog box. To manage project, select a project node and press the
Add Selected button (
> ) to add it to the
Projects list.
To discard managing a project, select a project from the
Projects list and press the
Remove Selected button (
< ) to remove it from the Projects list.
Click OK to confirm.
Checking out a Project
By importing a project to the server, clients can check that out from the Perforce server to the local drive.
Select a project from
Projects list in the
Teamwork Client dialog box.
Click
Check out.
The details of the project will be shown in the
Project Details pane.
After the project is checked out, you can open it in VP. To do so, simply click
Open project.
Committing Changes to the Repository
At certain point of time, we can commit the project to the server in order to store the local changes made in the project to the server.
Let’s create a Use Case Diagram.

Select Tool > Teamwork > Commit..., there are also two possible ways:
Click on the Commit button on the tool bar
Right-click on the project node of various tree (e.g. tree in diagram navigator) and select
Teamwork > Commit... from the popup menu.
Enter description in the
Commit Project dialog box and click
OK.
The
Commit Model(s) dialog box lists the changes that will be committed to the server. Click
OK to proceed.
Updating Changes from the Repository
When we want to get the changes made by other team members to the local project, we can run the Update function.
Select
Tool > Teamwork > Update (or click on the
Update button on the tool bar)to update the project from the server.
The
Update Model(s) dialog box lists the changes that will be updated to the local project copy. Click
OK to proceed.
The changes made by other team members are brought to the local project copy.
Branching and Tagging a Project
Branch and Tag are quite similar things, but with different purposes. Tags are used to mark milestones or release-quality projects, to keep your work isolated from any changes and therefore rarely modified. Branches are for when modeling activities will be carried out that may make the project unstable, but can always merge back to the trunk, or vice versa.
Creating a Branch
Follow the first three steps shown in the section of Importing a Project to Perforce Repository.
Select the project from the
Projects list in the
Teamwork Client dialog box to create branch.
Select
Project > Branch... (or click on the
Branch button on the tool bar).
Enter branch name.
Select the action after the branch created. We will select
Stay in trunk.
| Action | Description |
| Start working in branch | Check out and switch to the branch |
| Check out branch | Download the branch to the local drive, but keep staying at the current branch, trunk or tag |
| Stay in trunk | Stay at the current branch, trunk or tag |
Click
OK. It may ask if you want to create the
URL, press
Yes to proceed.
The branch is created.
Creating a Tag
Follow the first three steps shown in the section of Importing a Project to Perforce Repository.
Select the project from the
Projects list for creating tag.
Select
Project > Tag... (or click on the
Tag button on the tool bar).
Enter tag name.
Select the action after the tag created. We will select
Stay in trunk.
| Action | Description |
| Start working in tag | Check out and switch to the tag |
| Check out tag | Download the tag to the local drive, but keep staying at the current branch, trunk or tag |
| Stay in trunk | Stay at the current branch, trunk or tag |
Click
OK. It may ask if you want to create the
URL, press
OK to proceed.
The tag is created.
Merge Changes from Trunk to Branch
From time to time the trunk may keep modifying. The reason can fix some modeling issues. You can bring the change from Trunk to branch by using the merge function. Here is the branch. The color of use cases are modified.

On the other hand, the trunk user has just added several use cases. Let’s merge the trunk to branch to bring the changes made in trunk.
Select
Tool > Teamwork > Merge... (or click on the
Merge button on the tool bar).
This shows the
Merge dialog box. Enter the path to merge from. By default, the path of trunk is presented. It is possible to choose another one. But this time, we just keep the path as is.
Click OK.
This shows the
Merge Project dialog box which shows the changes that are made in trunk and will be merge to the branch. Click
OK to proceed.
After the merge is done, it will commit the changes made to the local copy to the repository. Click
OK when th
Commit Project dialog box is shown.
The changes are merged. In this case, the change of formatting done in the trunk is brought to the branch.
The user can keep on with the modification.
Merge Changes from Finished Branch to the Trunk
After the Branch is done, you can merge all the work from Branch to Trunk. Before merge from Branch to Trunk, please make sure that all Trunk work are merged to Branch. The Branch should be deleted after merging. Here is the Trunk. Let’s merge the branch for improving formatting back to trunk.
Select
Tool > Teamwork > Merge... (or click on the
Merge button on the tool bar).
This shows the
Merge dialog box. Press
... next to the path field to select the path to merge from branch.
From the
Repository Browser, select the .vpp file of the branch and click
OK.
The
Merge Project dialog box shows the changes that are made in branch and will be merged to the trunk. Click
OK to continue.
After the merging is done, it will commit the changes made to the local copy to the repository. Click
OK in the
Commit Project dialog box.
Press OK in the
Commit Model(s) dialog box.
The changes are merged. In this case, the change of formatting done in the branch is brought to the trunk.
Deleting a Branch
Normally, no development activities should be done in a branch after it is being merged to the trunk. In such case, you are suggested to delete the branch.
Select
Tool > Teamwork > Open Teamwork Client (or click on the
Open Teamwork Client button on the tool bar).
From the
Teamwork Client dialog box, select
Project > Delete Branch... from menu.
From the
Delete Branch dialog box, select the .vpp file of the branch to be removed. You may enter the comment for the deletion. Click
OK when it is done.
Resources
Visual Paradigm for UML Home
Business Process Visual ARCHITECT
DB Visual ARCHITECT
SDE Home
Download Free Community Edition of Visual Paradigm for UML
Download Business Process Visual ARCHITECT