OrcaScript is Handy
I've used PowerBuilder OrcaScript before to automate a build PC's connecting to source control, getting the latest copy of the application objects, and then building the application. But that was on a project where the entire application was at our disposal and we owned all the code, and OrcaScript had no problem building the entire app.
But now I only need to get latest on a subset of PBLs
I'm now working on a project where we are customizing an existing third-party application. So I need to be able to reference all the proprietary third-party PBDs but only refresh the PBLs from source that contain our custom code that integrates into the vendor app's framework. We will only move the updated custom PBLs to the application directory when the refresh is complete.
I've been experimenting quite a bit but haven't been able to successfully refresh only the subset of PBLs that I want.
First, is this possible to do in OrcaScript?
Second, if it is possible, what am I missing? I have successfully:
The problem is on the scc refresh target
command. Logs show the process failing due to a write access issue, but the problem object or library is not specified. I have tried removing the read-only status from the objects in the list but this doesn't seem to be the issue.
I've experimented with various refresh type and build options but can't seem to get past the refresh.
--- ADDENDUM ---
Orcascript:
start session
scc get connect properties "Y:\Project\Release\PBWorkspace.pbw"
scc connect
scc set target "Y:\Project\Release\Starboard.pbt" "outofdate exclude_checkout"
scc get latest version "Y:\Project\Release\Starboard.pbt"
scc exclude liblist “Many proprietary PBDs excluded here”
scc refresh target "migrate"
scc close
;File copies to happen here
end session
Running orcascr9.exe ultimately yields this error at the refresh: Orca error in ‘scc refresh target’. Result Code -22.
The log is below.
6/16/2011 17:15 Source Management Initialization...
Scc Provider: PushOk SVNSCC
Connection to source control established
PBORCA_SccSetTarget: y:\project\release\Starboard.pbt
Target settings: REFRESH OUT OF DATE | EXCLUDE CHECKOUT
PushOk SVNSCC Status: Fetching file list for: Y:/Project/Release/
App Name: Starboard App Lib: y:\Files\StarboardPB\application.pbl
Library List: Many PBLs and PBDs identified
Successfully created library: c:\projects\Starboard scripts\powerbuilderobjects\custom.pbl
Successfully created library: c:\projects\Starboard scripts\powerbuilderobjects\custom_maps.pbl
PBORCA_SccGetLatestVer
PBORCA_SccExcludeLibraryList:
Much excluding going on here
PBORCA_SccRefreshTarget. Migrate and Full Rebuild
PushOk SVNSCC Status: Fetching file list for: C:/Projects/Starboard Scripts/PowerBuilderObjects
PushOk SVNSCC Status: Fetching status for : C:/Projects/Starboard Scripts/PowerBuilderObjects
If I delete the PBLs out of the directory, I get the following errors upon refresh
DIFF2002 SccDiff error. Unable to read PBL source for c:\projects\Starboard scripts\powerbuilderobjects\custom.pbl(d_nautical.srd)
Calling cm_rebuild_application(CM_REBUILD_MIGRATE).
(0002): Error C0193: One or more of the files in your library list could not be opened for write.
Errors encountered during import/compile. Check SMS log.
PBORCA_SccClose
6/16/2011 17:16 Source control terminated
If I leave the PBLs in place, I get this
Calling cm_rebuild_application(CM_REBUILD_MIGRATE).
(0001): Error C0193: One or more of the files in your library list could not be opened for write.
Thanks Hugh Brackett, for trying to help me out. I was unable to get past the read errors when using native OrcaScript. So unfortunately I don't have an actual answer for the question as written, except to say that in my experience, that "No, PB 9 does not support refreshing from source control a subset of PBLs when PBDs are part of the library list."
I do have a work around, albeit one that is not cheap. I have heard nothing but good things about PowerGen, a third-party tool for PowerBuilder builds and deployment. I tried out the trial app, and I must say it is outstanding. It seems to be able to do anything you need.
I tested a build automation script. PowerGen notified me it couldn't open the PBD files but continued to refresh the custom PBL objects I wanted loaded. The problem is solved, though it cost some cash to do it.