Implementation

Before you can use the CVS functionality you have to setup the GEDI and your WinCC OA project. The following paragraphs describe the required preparations.

Setting up the WinCC OA project

In order to use the CVS functionality in an WinCC OA project, at first you have to check-in the whole WinCC OA project directory (without the database directory) into your CVS repository and secondary you have to check-out this directory onto your WinCC OA system.

In the following instruction will be described step by step how to create a repository or how to import a WinCC OA project in order to use the CVS functions in this project.

This is how you setup your WinCC OA project repository

  1. Create a folder for the root directory (CVSRoot), which will contain the repository.

  2. Initialize the created directory using the console of the operating system (->command line) by entering locally the following command:

cvs -d <absolute_path_to_CVSRoot> init

  1. Check whether the CVS functionality is basically possible by trying to log-in with the CVS login.

cvs -d :pserver:<Username>@<Hostname>:<absolute_path_to_CVSRoot> login

  1. The password will be asked. Please enter the password.

  2. Import the WinCC OA project into the created root directory depending on the location of the repository. Please be sure that the command line directory is the WinCC OA project directory:

Local repository:

cvs -d :local:<absolute_path_to_CVSRoot> import -m "<comment>" <project_name> <tag, e.g. user_name> <startTag, e.g. start>

Repository in network (not local):

cvs -d :pserver:<Username>@<Hostname>:<absolute_path_to_CVSRoot> import -m "<comment>" <project_name> <tag, e.g. user_name> <startTag, e.g. start>

  1. The WinCC OA project is now located in the repository.

  2. Check-out the WinCC OA project on your local system. Change the target directory in the command line into this directory in which the project shall be saved. Then enter the following command:

Local repository:

cvs -d :local:<absolute_path_to_CVSRoot> checkout <project_name>

Repository in network (not local):

cvs -d :pserver:<Username>@<Hostname>:<absolute_path_to_CVSRoot> checkout <project_name>

  1. Register the WinCC OA project by using the WinCC OA project administration.

Settings in the GEDI

In order to activate the CVS functionality in GEDI and to add the CVS functions into the context menu of the project view, you have to complete the config file in the section [ui] with the following entries:

[ui]

versionControl = "CVS"

numPanelBakFiles = 0

versionControlDiff = "<path>/<diff UNIX utility name>"

The config entry is used in gedi/projectView.ctl to check if it contains "CVS" to activate this version control system. If other VCS shall be used, it's possible to create separate scripts for each VCS. The name must be exactly the name defined as value of the config entry. E.g. versionControl = "XYZ" means that there must be the script XYZ.ctl. This script must be located in thescripts/gedifolder (e.g.:scripts/gedi/xyz.ctl).

See also: [ui]versionControl

A requirement for setting the entry versionControlDiff and also using the CVS diff function is an installed program which can compare two files. So it is an optional entry and you can leave it out if the CVS diff function will not be used.