Version control enables the user(s) of a project to store the complete revision history of a Control FPWIN Pro7 project in a special database (project repository) in the granularity of the objects in the navigator. This project repository is the consistent official source for a project with its current and historical development states (revisions). Each revision is characterized by a consistent set of changes compared to the previous revision. At any time, the complete history of revisions can be inspected, sorted, filtered by revision number, date and time, author, and comment. The changes can be inspected, the revisions can be compared to each other, past revisions can be re-created, tags and branches on the project development are possible. The user(s) of this project create their own local working copy from the current revision (“tip”) of the project repository, make and test local changes and by committing those changes to the project repository, create a new revision, which can be updated into the working copies of other users. The same goes for all user libraries in the project that are under version control.
Thus, a version-controlled project also allows the changing of objects in the same project or user library for multiple users. The conventional project or user library is completely split into a "mirror" of the project called "working copy" that is stored in a separate version-controlled folder. Both the project file and the project working copy use the same name and are connected with Control FPWIN Pro7. Both contain the same configuration data in general, but the working copy contains a detailed object structure with the granularity known from the navigator and mostly human-readable files in contrast to the project file. This structure of folders and files is created to allow version control and multi-user development.
Both the user library and its working copy use the same name. The connection of both is realized by the working copy of the user library being located directly in the "Libraries" folder of the project working copy.
Moreover, working copy and project or user library are automatically kept in sync without visible user interaction. Any save of a changed object in Control FPWIN Pro7 is reflected in an instant update of the corresponding object’s file in the corresponding working copy. If the user updates his local working copy with the latest changes stored in the project or user library repository, Control FPWIN Pro7 (normally) reflects the latest changes automatically in the open project or user library.
On the other hand, transferring new data from the project or library repository into the local working copy (“update”) and putting changed data from the working copy into the project or library repository (“commit”) is done manually outside Control FPWIN Pro7 because Control FPWIN Pro7 only knows working copies (which are independent of any external software used) and not the project or library repository or the external version-control software that the user decides to use.
With a separate version-control software, e.g. Apache subversion or TortoiseSVN (not available with the Control FPWIN Pro7 installation), the complete set of version control functions can be used for data exchange in both directions between working copy and the corresponding repository for this project or library. However, this has to be done manually outside Control FPWIN Pro7. Please refer to the corresponding help files of the selected version-control tool.
Not every separated portion of data of a Control FPWIN Pro7 project constitutes an independent, separable object in the working copy because some data portions are too small or have too many interdependencies. Consider or plan in the team of co-workers in advance how to handle special data like the project settings, especially when security passwords or the tasklist are used.
Separable objects such as POUs, DUTs, and tasks are handled as follows:
Each separable object is represented by one file only in the working copy.
Separable objects can only be replaced completely or not at all in a project.
Separable objects can only be replaced completely or not at all in the project repository.
The following objects and their subnodes are not considered separable because they depend on the PLC selected:
System registers
Security passwords
Compile options
Communication parameters
Network parameters
They belong to and are represented by the singleton file "Project.asc" for the project root object in the working copy and the project repository.
The object Program code will not be version-controlled because it changes every time when other objects have been changed and the project is recompiled.
In order to identify, structure and separate separable objects in the project repository (and the local working copy), the objects (nodes) in the navigator of the Control FPWIN Pro7 project are mapped to a folder/file structure, which is also the prerequisite for an external version-control system.
This folder/file structure is the destination of data every time you save the project in Control FPWIN Pro7. It is also the structure for an external version-control system to commit from and to update to. This structure has to contain at least all the data and information the user explicitly added to or changed in the project or library.
Vice versa, this structure also has to be the source of the inverse update (import) process to create or modify an open Control FPWIN Pro7 project with the contained user libraries (whether or not they are under version control).
When users create a project, this update will be done with all valid and recognized files of the folder/file structure in a certain order.
When users modify or update a project, the import can also be done incrementally or only with a subset of files of separable objects or even a single file, but into an open Control FPWIN Pro7 project. This normally completely replaces the revision of the same object in this project.
The following differences apply when you are putting a project under version control:
When you close the project or exit Control FPWIN Pro7, version-controlled projects will be saved automatically. You will not be asked for confirmation.
User libraries in version-controlled projects will be saved automatically.You will not be asked for confirmation.
The option Save as only allows to save the project as a *.pcd or *.pce file, not as a *.pro file.
You cannot rename a user library or modify the path of a user library
You cannot reload a user library. All changes to a user library are saved immediately in the "Libraries" folder of the project working copy so that the user library is always up to date.
When version control is deactivated for a project, the working copy is not deleted. Thus, when version control is activated again for this project, Control FPWIN Pro7 deletes the working copy and creates it completely new from the current project if you confirm that the old working copy can be deleted.