Powerbuilder OrcaScript:如何获取 PBL 子集的最新内容

发布于 2024-11-16 00:24:29 字数 2944 浏览 3 评论 0原文

OrcaScript 很方便

我以前使用过 PowerBuilder OrcaScript 来自动将构建 PC 连接到源代码管理,获取应用程序对象的最新副本,然后构建应用程序。但那是在一个项目中,整个应用程序都可供我们使用,并且我们拥有所有代码,并且 OrcaScript 构建整个应用程序没有任何问题。

但现在我只需要了解 PBL 子集的最新信息

我现在正在开发一个项目,我们正在该项目中自定义现有的第三方应用程序。因此,我需要能够引用所有专有的第三方 PBD,但仅从包含集成到供应商应用程序框架中的自定义代码的源中刷新 PBL。刷新完成后,我们只会将更新的自定义 PBL 移动到应用程序目录。

我已经进行了相当多的实验,但未能成功地仅刷新我想要的 PBL 子集。

首先,这可以在 OrcaScript 中做到吗?

其次,如果可能的话,我错过了什么?我已经成功:

  • 设置属性并连接到源代码管理
  • 在目标上执行了“获取最新”,这似乎导致 OrcaScript 创建所需的空 PBL
  • 从库列表中排除了专有的第三方 PBD

问题出在 < code>scc 刷新目标 命令。日志显示进程由于写入访问问题而失败,但未指定问题对象或库。我尝试从列表中的对象中删除只读状态,但这似乎不是问题。

我尝试过各种刷新类型和构建选项,但似乎无法通过刷新。

--- 附录 ---

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

运行 orcascr9.exe 最终会在刷新时产生此错误: “scc 刷新目标”中 Orca 错误。结果代码-22。

日志如下。

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

如果我从目录中删除 PBL,刷新时会出现以下错误

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

如果我将 PBL 保留在原处,则会出现此错误

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.

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:

  • set the properties and connected to source control
  • performed a "get latest" on the target, which seems to cause OrcaScript to create the needed empty PBLs
  • excluded the proprietary third-party PBDs from the lib list

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

心是晴朗的。 2024-11-23 00:24:29

感谢休·布拉克特(Hugh Brackett)试图帮助我。使用本机 OrcaScript 时,我无法克服读取错误。因此,不幸的是,我没有对所写问题的实际答案,只是根据我的经验,“不,当 PBD 是库列表的一部分时,PB 9 不支持从源代码管理刷新 PBL 的子集。 ”

我确实有一种解决办法,尽管并不便宜。我只听说过关于 PowerGen 的一些好消息,PowerGen 是一个用于 PowerBuilder 构建和部署的第三方工具。我试用了试用版应用程序,我必须说它非常出色。它似乎能够做任何你需要的事情。

我测试了构建自动化脚本。 PowerGen 通知我它无法打开 PBD 文件,但继续刷新我想要加载的自定义 PBL 对象。问题解决了,尽管要花一些钱。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文