CVS Interface
From PxPlus
PxPlus includes a number of utilities designed to be used with the open-source source control system WINCVS. WINCVS is a windows based source control system that allows a developer to track changes to source and binary files. It includes a number of feature that allow for eacy tracking and merging of multiple changes from multiple programs. It can be obtained from www.wincvs.org and is subject to the terms of the GNU/GPL license.
CVS (the backbone of WINCVS) provides a secure and reliable way the track changes and manage source changes. WINCVS is a windows interface to CVS. Installation instructions can be found at various web sites.
Contents |
Background
The Source control interface for PxPlus provides for automatic generation of source text files for programs and screen libraries. Whenever a program is saved or NOMADS screen updated, the system will look for a ".pluscvs" file in the directory where the updated program/screen was located. This file will contain the location of a "Text Source" directory into which the system will output a text copy of the change.
When using the CVS system, these text files are the files that you will be saving the to source control system. When using this facility you will have both an "Application" version of your programs/screens on your PC and a "CVS source text" version. As you make changes to your programs and screens, the system will automatically update the text files so you can subsequentially check them into the source control system.
Both the CVS source directory and the Application directory point to each other. The Application directory points to the CVS Source directory by ".pluscvs" files imbedded in the application directory. The CVS Source text directory has ".cvsplus" files in its hidden "CVS" subdirectories. These files need to be kept in sync -- a process that the PxPlus utilites will perform for you.
Setup and installation
To setup the CVS system, start PxPlus and issue:
RUN "*plus/proj/setup"
The CVS setup program (*plus/proj/setup) will have add the PxPlus menu to the Macros menu in WINCVS, and will associate the file suffixes ".pvprg" and ".pvpnl" with PxPlus.
Once it has been run from the standard windows explorer you can right click and edit the file and the system will automatically allow you to edit the program/panel in the Application directory. Changes will be recorded both in the Application directory and the CVS source directory.
In addition to EDIT you can also "OPEN" the file. If opening a program (suffix .pvprg) the system will change to Application directory and try to run the program specified. If opening a panel the system will also change to the Application directory and try to "Process" the panel specified.
This provides an easy way to edit/run program directly from the Windows explorer screen and/or the WINCVS screen as pressing ENTER on an entry causes WINCVS to "edit" the entry.
WINCVS Extensions
The *plus/proj/setup will add four utlities currently exist in the PxPlus WINCVS interface.
- Update
- This utility can be run on a directory or single file to update the Application target directory with any changes from the CVS system.
- Extract to CVS
- This utility can be run on an Application directory to initially convert programs and/or screens to CVS text files. During the extraction process unknown file types will be copied asis to the CVS target directory. When a password protected program is encountered the system will prompt for the password. If you give it the proper password the program will be converted to clear text and copied with its password header. If you don't supply the password but press the Copy Asis button the program will be copied in binary form. Since generally it is assumed you want to have the source control system maintain source, the Extract process maintains a list of passwords you supply during each run and tries the same password of subsequent programs. This means if all your critical programs have the same password you will only be prompted once.
- Define Target Application
- This utility should be run once you download an new application or directory from you CVS server. It sets the .pluscvs and .cvsplus files in the CVS and Application directories.
- New Program/Panel
- This utility is used to create a new text file and launch the appropriate editor when creating a new program/panel.
Technical Descriptions
The CVS interface is handled by the progams found in the *plus/proj directory.
These programs/file in the directory are as follows:
| File name | Description |
|---|---|
| edit | Common entry point routine which will be invoked to edit a .pxpnl or .pxprg file based on file suffix. |
| extract | Extract PVX program/panels/files into the CVS system. Create the .pluscvs link in each directory to point to the CVS directory. If the starting directory (which is where we were launched from) has CVS pointer (.cvsplus) already ask user to select new start point. |
| makenew | Create a new program/panel file |
| open | Common entry point routine which will be invoked to edit a .pxpnl or .pxprg file based on file suffix. |
| pxpnl | Panel processing routines. Extract to/from CVS, edit, etc. |
| pxprg | Program processing routines. Extract to/from CVS, edit, etc. |
| python | Directory containing the Python code which is added to the WINCVS setup |
| scrnlib.en | Screen library used by the CVS interface programs |
| setup | This program is used to setup the WINCVS interface and to add the .pxpnl and .pxprg suffixes to the Windows registry |
| target | This program sets the program and CVS sandbox destination files (creates the .pluscvs and .cvsplus files) |
| timeutil | Routine to return date/time stamps from the files in a directory. (No longer used as PxPlus provides a +INFO option when opening/reading directories to get date/time stamps. |
| update | This utility will take a source/text sandbox from the CVS system and update the target application directory. |
