Using CVS as source control for Sybase PowerBuilder

· Read in about 3 min · (458 words) ·

This article in short describes, how to use CVS for Powerbuilder. This solution we are using for about 6 years and it works very good.

PBL problems

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 inclinable to faults (in Power Builder 7 it was not very surprissing that after fullrebuild failure were PBLs completely broken).
  • Object sources saved in PBLs are not easily comparable.
  • Also built-in support for inefficience (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 tooks for about half a day per week and it was quiet often, that some changes were lost).


  • Use CVS as source control (use 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 differencies 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 the scratch (PowerGen can resolve all dependecies between objects and import them back into PBLs in the correct order).
  • Every developer takes fresh PBLs after every build.

Editing sources

  • 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 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 who and why made the change.
  • You can simply resolve any conflicts (no more hell with sharing and synchronizing PBLs between developers).
  • PBLs cann’t contain any old errors from rebuilding etc.
  • You can also connect additional actions to every souce file commit/checkout/tag and automatically connect those into other company systems.

You can also use tags and branches for tracking your builds.