This article briefly describes how to use CVS for Powerbuilder. We are using this solution for about 6 years and it works very well.
The main difficulty of the Sybase Power Builder is in PBL libraries. PBL libraries are binary libraries containing both - sources and precompiled sources.
This solution causes many problems:
- PBLs are also very inclined to faults (in Power Builder 7, it was not very surprising that after fullrebuild failure, PBLs were completely broken).
- Object sources saved in PBLs are not easily comparable.
- Also, built-in support for inefficiencies (sources are checked-out to temporary PBL library, offline access is not very comfortable, etc.).
- In the case of multiple developers working on the same project, this causes many problems with sources synchronization (you can use many utilities, but it was always hell after one week track all changes and put them together - it took about half a day per week and it was quite often that some changes were lost).
- Use CVS as source control (you can use both *nix or Windows solution).
- Use TortoiseCVS (or any other free CVS GUI clients) for access to sources.
- Use Winmerge or any other free utility for sources differences comparison.
- Export all sources into CVS project source tree (the best way is to export every PBL library into the separate directory in the CVS source tree).
- On building machine, use PowerGen for project compilation and PBLs restore. In each build, you can take your PBLs from scratch (PowerGen can resolve all dependencies between objects and import them back into PBLs in the correct order).
- Every developer takes fresh PBLs after every build.
- Every developer can take fresh PBLs generated by PowerGen after build.
- Before change, perform Update command on existing object.
- Import this object from CVS sandbox into your work PBL (replacing the existing one).
- Perform any required changes.
- Export modified object from working PBL to the CVS sandbox.
- Execute Commit command on the exported object in CVS sandbox, provide proper comment and send it to the CVS source control.
- All sources are stored in plain text (including datawindows).
- All changes are simply trackable (from Power Builder 9 (?8?) this works much better, because in previous versions Power Builder changes order of methods on every save) - at least you know why and who made the change.
- You can simply resolve any conflicts (no more hell with sharing and synchronizing PBLs between developers).
- PBLs can't contain any old errors from rebuilding, etc.
- You can also connect additional actions to every source file commit/checkout/tag and automatically connect those into other company systems.
You can also use tags and branches for tracking your builds.