没有合适的资源?快使用搜索试试~ 我知道了~
首页PowerBuilder 通过SVN实现版本控制操作说明
资源详情
资源评论
资源推荐
Put PowerBuilder Project Under SVN Source
Control
These steps will put an existing PowerBuilder project under SVN source control using the
PBSCC proxy. These steps have been tested in PowerBuilder 11.5 and should work for
earlier versions.
Definitions
Before you get started you should become familiar with these terms.
Workspace
The folder containing your PowerBuilder workspace object and associated targets, each
with their associated PowerBuilder libraries. Although a target’s libraries may reside
anywhere, for this tutorial we’ll assume a simple project where the workspace object,
target and libraries are all under the same folder.
Working copy
The folder in which you check-out your working copy from the project repository. It
contains exported object files (.srm, .sru, .srw, etc.) and does not contain PowerBuilder
libraries (.pbl files).
Create the Repository
Create an svn repository for your PowerBuilder project. Here is an example under Ubuntu.
Install Source Control Software
Install PBSCC which requires TortoiseSVN and Subversion command lines tools.
Note: PBSCC will install by default to C:\Program Files(x86)\TortoiseSVN. It’s OK to leave
it there.
Prepare Your PowerBuilder Project for
Source Control
If you’re starting off with a new project, you can skip this step, although you shouldn’t. This
step explains how PowerBuilder source control works. If you have inherited an existing project,
chances are you’ll have to do some clean up before you can put the project under
source control.
Background
PowerBuilder permits you to have objects with the same name in different libraries within a
target, even though only the first object found in the library list will be used in the application.
This can lead to no small amount of confusion, especially when you’re trying to make changes
that don’t show up when you test your application because you were editing the wrong object.
Because of this lax policy (or extreme flexibility depending on your viewpoint), any project that
Put PowerBuilder Project Under SVN Source Control
http://www.bigsnowball.com/book/export/html/28
第1页 共19页 2011/6/3 下午 02:04
has been around for a while has a good chance of having duplicate objects.
Source Control Enforces A Greater Degree of Uniqueness
Before you place a project under source control, you are able to edit each object, regardless of
name or library, in the normal fashion even though the application only pays attention to the
first object in the library list.
But once a project is under source control, editing objects behaves differently. Each object will
only be unique within its folder in the file system. The fact that two same-named objects are in
different libraries won’t matter. If they are in the same folder, only the first object in the library
list will be seen when you edit it. So, under source control, the library looses its ability to make
an object unique. You can think of all objects in the same folder as residing in a virtual
“common” library, and a second (or third) object with the same name as another object in this
“common” library will be ignored.
So, if you have a w_frame window in libraryA and a w_frame window in libraryB (both libraries
in the same folder), and libraryA occurs before libraryB in the library list, and you edit w_frame
in libraryB, you will in fact be editing w_frame in libraryA.
The reason PBSCC applications behave this way is an object is exported into it’s library’s folder
during check-out and check-in. Same named-objects would simply overwrite each other. So,
the first in the list for a given folder is used.
Solution
If your project does have duplicately-named objects that you must maintain, you must move
their libraries into separate folders.
Locate Duplicate Objects
To locate duplicate objects in your application, import
n_cst_string
n_cst_pb
into your application object.
At the beginning of your application object’s open event, put
n_cst_pb lnv_pb
if lnv_pb.of_inIDE() then
lnv_pb.of_listLibraries( 'c:\myapp-manifest.txt' )
end if
and change the path c:\myapp-manifest.txt to a suitable value.
When you run your application within the PowerBuilder IDE, this will generate a report listing
the location of each object
duplicate objects and the libraries they appear in
duplicate objects within a single folder
The latter must be corrected before you can place your project under source control by moving
the libraries to different folders or simply creating a folder for each library.
Put PowerBuilder Project Under SVN Source Control
http://www.bigsnowball.com/book/export/html/28
第2页 共19页 2011/6/3 下午 02:04
Building Your Target from the Working Copy
If you are joining a project already under source control, your first step will be to check-out a
working copy from the project repository. This gives you all the exported object files, but it does
not give you the stuff you need to work on the project in PowerBuilder. You still need the target
and PowerBuilder libraries. Contrary to the directions on many websites, you do not need to
copy the libraries from an existing workspace. PowerBuilder will generate these for you
automatically (after performing a small step). Copying the libraries means you don’t understand
source control or that you’re using a source control system that’s defective. The whole point of
source control is that you can check-out everything you need to work on the project from the
repository. If you did need to copy the libraries from another developer, then your project isn’t
truly under source control.
Begin by creating a new workspace. The name of the workspace does not matter and does not
need to match the workspace name used by another developer on the project.
Right-click on the (No Workspace) text and choose New. Create a new workspace in a new,
empty folder.
Right-click on the newly created workspace and choose New.
Create a new Application Target.
Put PowerBuilder Project Under SVN Source Control
http://www.bigsnowball.com/book/export/html/28
第3页 共19页 2011/6/3 下午 02:04
The name of your target must match name of the target in your working copy. If it does
not match, you won’t be able to build the libraries automatically in PowerBuilder. Creating the
target object is the one, small step you have to perform to be able to re-create your
PowerBuilder application from the working copy.
If you don’t know the name of the target, look for the .pbt file in your working copy. In this
example, the target name is genapp.
Enter the application (i.e. target) name and press tab. PowerBuilder populates the library and
target file entries automatically.
Now, place your workspace under source control.
Complete the process by getting the latest version first for the target only and then for
everything else. This will overwrite your stub target file, create any additional libraries in the
respective folders and populate the libraries with the objects from the repository.
Accept all imported objects even if they have compile errors. Finally, rebuild the target.
Put PowerBuilder Project Under SVN Source Control
http://www.bigsnowball.com/book/export/html/28
第4页 共19页 2011/6/3 下午 02:04
剩余18页未读,继续阅读
cyh_0769
- 粉丝: 67
- 资源: 64
上传资源 快速赚钱
- 我的内容管理 收起
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
会员权益专享
最新资源
- ExcelVBA中的Range和Cells用法说明.pdf
- 基于单片机的电梯控制模型设计.doc
- 主成分分析和因子分析.pptx
- 共享笔记服务系统论文.doc
- 基于数据治理体系的数据中台实践分享.pptx
- 变压器的铭牌和额定值.pptx
- 计算机网络课程设计报告--用winsock设计Ping应用程序.doc
- 高电压技术课件:第03章 液体和固体介质的电气特性.pdf
- Oracle商务智能精华介绍.pptx
- 基于单片机的输液滴速控制系统设计文档.doc
- dw考试题 5套.pdf
- 学生档案管理系统详细设计说明书.doc
- 操作系统PPT课件.pptx
- 智慧路边停车管理系统方案.pptx
- 【企业内控系列】企业内部控制之人力资源管理控制(17页).doc
- 温度传感器分类与特点.pptx
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论4