CrossWorks supports team development of applications using source code control. At present CrossWorks integrates with Microsoft Visual SourceSafe, SourceGear SourceOffSite 3.5.1. The source code control integration capability provides:

- Connecting to the source control database (sometimes called a repository).
- Mapping files in the project system to those in the source code control system
- Showing the source control status of files and projects
- Adding and removing files and projects from source control
- Typical source control operations such as Add to source control, Remove from source control, and so on.

###### Connecting to the source control system

Before you can check files in and out of source code control, you must connect to the source control system. To connect to the source control system, do the following:

- From the Project menu, click Source Control then Connect...

This displays a source control system specific dialog that enables you specify which source control database to connect to and to enter passwords etc. This dialog will reappear each time you load the solution to provide you with the opportunity to cancel source control connection.

###### Mapping files

In order to map local files to those in the source control database, the project file is taken to be the root of the project hierarchy. The first time CrossWorks tries to check the source control status of the project file it will prompt you to specify the location of this file in the source control database. This mapping will be stored in the session file so you won't need to specify the mapping each time the project is loaded. If you cancel at the prompt to specify the location of a project file in the source control database, use Project | Source Control | Add To Source Control to make CrossWorks prompt again.

If a project directory is defined for a project file then this will be prepended to the filename in the project when mapping to files in the source control system. Note that only relative project directories (and filenames) are supported.

###### Adding files to source control

To add a file to the source control system so that it can be controlled, checked in, checked out, and so on, do the following:

- In the Project Explorer, right click the file to add to source control.
- From the menu, click Source Control then Add To Source Control.

###### Checking files out

To check a file out of the source control system, do the following:

- In the Project Explorer, right click the file to check out.
- From the menu, click Source Control then Check Out.

—or—

- In the Project Explorer, click the file to check out.
- From the Project menu, click Source Control then Check Out.

—or—

- In the Project Explorer, click the file to check out.
- On the Source Control tool bar, click the Check Out button.

###### Checking files in

To check a file into the source control system, do the following:

- In the Project Explorer, right click the file to check in.
- From the menu, click Source Control then Check In.

—or—

- In the Project Explorer, click the file to check out.
- From the Project menu, click Source Control then Check In.

—or—

- In the Project Explorer, click the file to check out.
- On the Source Control tool bar, click the Check In button.

###### Undoing check outs

To under a check out and return a file on disk to its previous checked in state, do the following:

- In the Project Explorer, right click the file to undo the check out of.
- From the menu, click Source Control then Undo Check Out.

###### Getting the latest version of a file

To retrieve the latest version of a file from source control, do the following:

- In the Project Explorer, right click the file to check out.
- From the menu, click Source Control then Get Latest Version.

###### Showing the differences between files

To show the differences between the file on disk and the version checked into source control, do the following:

- In the Project Explorer, right click the file to show the differences of.
- From the menu, click Source Control then Show Differences.

###### Removing a file from source control

To remove a file from being managed by the source control system, do the following:

- In the Project Explorer, right click the file to add to source control.
- From the menu, click Source Control then Add To Source Control.

Note that this deletes the file from the source code control system but does not touch the working file on disk and does not remove the file from the project.

###### Source control properties

When a file is controlled, the Properties window shows the following properties in the Source Control Options group:

Checked Out
  If Yes, the file is checked out by you to the project location; if No, the file is not checked out.
Different
  If Yes, the checked out file differs from the one held in the source control system; if No, they are identical.
File Path
  The file path of the file in the source control system.
Old Version
  If Yes, the file in the project location is an old version compared to the latest version in the source control system.
Status
  Controlled indicates that the file is controlled by the source code control system.

###### Source control status

By selecting Project > Source Control > Show Status a window is displayed that shows the current source control state of each file in the project. If a local file has been changed then this file is displayed in red. You can use this window to do multiple source control operations e.g. add several files to the source control. You can restrict the file list to a node in the project hierarchy e.g. all files of a folder, and supply a filter which enables the file list to be restricted to the source control status e.g. all files that are different.

When a given file or solution is selected in the project explorer, the source control properties appear in the properties window—these properties reflect the local checkout status of the file and whether or not it has been modified.