CrossWorks has a source control integration capability that can be used on the files of a CrossWorks project. The capability is implemented by a number of different source control providers, however the set of functions that are provided by CrossWorks aim to be provider independent. The source control integration capability provides:

Configuring the source control system

The source control system you are using must be enabled using:

The source control provider information is stored in the CrossWorks global environment, so you can only use one provider for all of your CrossWorks projects.

Connecting to the source control system

You must connect to the source control system for each different CrossWorks project you have. To connect to the source control system, do the following:

This displays a source control system login dialog that enables you to specify your username, password and select the source control database to connect to. These details will be saved in the session file (the password is enciphered) so that you don't need to repeat this information each time the project is loaded.

To map files in the project to those in the source control system, you need to specify a local root directory and the corresponding directory in source control (called the remote root). Once you have provided this information the files in your project that are within the local root directory are considered to be in (or can be added to) source control.

After the login dialog has completed you will be presented with a dialog that you use to specify the local and remote roots. The local root can be selected using a directory browser and the remote root can be selected using the source control explorer. With both browsers you can create new directories if you are starting a new project or you don't have an existing project in source control.

Opening a project from source control

To fetch a project that is already in source control to a local directory:

Source control status

Determining the source control status of a file can be an expensive operation. CrossWorks will do this when:

A file can be in one of the following states:

When the status is displayed in the project explorer if the file has been modified then the status is displayed in red. Note that if a file is not under the local root then it will not have a source control status.

You can reset any stored source control file status using the Project | Source Control | Refresh Status operation.

Source control operations

Source control operations can be performed on single files or recursively on multiple files in the project explorer hierarchy. Single file operations are available using the Source Control toolbar and also the right click menu of the text editor. All operations are available using the menu at Project | Source Control and on the Project Explorer right click menu. The operations are described in terms of the Project Explorer right click menu.

Adding files to source control

You can add a file in the project that is not in source control using:

To add multiple files to the source control system do the following:

Checking files out

To check out a file in the project from source control, do the following:

To check out multiple files in the project from source control, do the following:

Checking files in

To check in files in the project to source control, do the following:

To check in multiple files in the project from source control, do the following:

Undoing Check Outs

To undo a check out of a file in the project, do the following:

To undo check out of multiple files in the project, do the following:

Get Latest Version

To get the latest version of a file in the project, do the following:

To get the latest version of multiple files in the project, do the following:

Showing the differences between files

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

You can use an external diff tool if you have one installed in preference to the built-in CrossWorks diff tool. You define the diff command line CrossWorks generates using Tools | Options | Source Control | Diff Command Line - note that command line is defined as a list of strings to avoid problems with spaces in arguments. The diff command line can contain the following macros:

Merging files

To use merging you must have a merge tool installed. You define the merge command line CrossWorks generates using Tools | Options | Source Control | Merge Command Line - note that command line is defined as a list of strings to avoid problems with spaces in arguments. The merge command line can contain the following macros:

To merge the file in the project and the version checked into source control, do the following:

Source control explorer

By selecting the Project | Source Control | Show Explorer.. menu a dialog is displayed that lists the directories and files that are in source control. This dialog is used for selecting the remote root directory and when Project | Source Control | Open Solution From.. is selected.

You can use the directory side of the dialog to create new directories and to refresh the list if this is required by the source control provider.

Source control properties

When a file in the project is in source control, 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.
Local Revision
The revision number/name of the local file.
Old Version
If Yes, the file in the project location is an old version compared to the latest version in the source control system.
Provider Status
The source control provider status of the file.
Remote Revision
The revision number/name of the most recent version in source control.
Status
The source control status of the file.

Provider Specific Help