Click here to Skip to main content
15,882,152 members
Articles / All Topics

Using CVS as source control with Sybase PowerBuilder

Rate me:
Please Sign up or sign in to vote.
0.00/5 (No votes)
25 Jun 2010CPOL2 min read 10.2K  
This article describes how to use CVS for Powerbuilder. We are using this solution for about 6 years and it works very well.

This article briefly describes how to use CVS for Powerbuilder. We are using this solution for about 6 years and it works very well.

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 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).

Solution

  • 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.

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 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.

Benefits

  • 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.

Links

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Team Leader NCR
Czech Republic Czech Republic
I'm software developer since 1996. I started with assembler on Intel 8051 CPUs, during years I was interested in C, C++, Sybase PowerBuilder, PHP, Sybase Anywhere Database, MSSQL server and multiplatform development.

Currently I'm developing in C++ and C# (this is my favorit and I spent some time with MCPD achievement). I'm also interested in design patterns.

Comments and Discussions

 
-- There are no messages in this forum --