PowerBuilder 8.0 Development Environment Integration Using Version Control

xiaoxiao2021-03-06  64

1 PB development environment integrated version control introduction

The PB6 to PB8 integrated version control is different, where only PB8 is used as an example to introduce the integration usage version control.

1.1 setting

Starting with PB8, there is a concept of work interval Workspace. The developer's work is done in a workshort. Version control is also set in the work section.

View the properties of Workspace, in page 3 (Source Control), set up the use of version controls.

Figure 1: PB8 Settings Integration Using Version Control

The following describes the following:

Source Control System version control system. Select the version control system you want to use here. What is listed here is that the operating system is installed, which can be integrated into the version control system in the development environment.

UserId logs in user account. Is the developer's login account in the selected version control system.

Project exists in the version control system database, the project required for this development.

Local root Directory local root directory. This path or its subdirectory contains Workspace.

Connect connection version control. Note: Some versions are controlled in Project, choose Project when connecting.

Advanced ... Sets advanced properties. Equivalent to executing menu Entry → Source Control → Advanced Options (menu in Library Painter).

Require Comments on check-in needs to fill in the annotation instructions when typing. If the item is selected, when check-in, the OK button is gray unless you fill in the annotation instructions.

This Project Requires That I Sometimes Work Offline Select this. When you open this Workspace, you will not actively connect, but a dialog box appears, the interrogation is an online or offline (as shown in Figure 2).

Figure 2: Ask if it works offline

DELETE POWERBUILDER Generated Object FILES is the source file (* .SR?) That decides whether to automatically delete the object generated by the PB. When performing some of the events to execute, such as getlastversion, check-out, check-in, refresh status, PB will be placed from the source code of the object from the version control system to the local. If this option is selected, PB will automatically delete these files after performing operation. If this option is not selected, these temporary source files will remain locally. This option cannot be selected using certain version control systems such as Perforce, ClearCase, or Continuus Source Control Systems, etc. In addition, some operations, even if this option is selected, these temporary source files may not be completely cleared. For example, execute Refresh Status operations. If you don't want to retain these files, you need to handle it. My way is to use a batch file (delsr.bat), the content is DEL * .SR? To delete these files.

Perform Diff On Status Update Cancels this option, you will not see if the local object is different from the object of the version control system database. That is, the refresh status command will be invalid.

Suppress Prompts To overwrite Read-Only Files This option is selected, at some time (forget), you will be overwritten. This option can remind to prevent the use of old files from overwriting new files.

Status Refresh Rate automatically refreshes the time of the state, in minutes. The state referred to here is whether the object of the PB is locked by others, or whether it is changed and the local is different. These can be referred to the online help of the dialog, and it is recommended to read the original text of the English.

1.2 use

Before using the version control, first explain the various status and display icons.

name

Figure

Description

plus

Indicates that this object has not been added to the version control database. Dot

This object is added to the version control and is in a regular state. Can be detected. Green hook

Indicates that this object is detected / locked by the current developer. Redfaire

Indicates that this object is detected / locked by other developers. (Others can't check again.) Question mark

Indicates that the status of this object is unknown, usually not knowing if it is different from the object of the server. Circle

This object is not the same as the content on the server. If it is detected, the icon does not appear.

Refer to the PB's HTML Help file in PB:

Powerbuilder User's Guide

The Powerbuilder Environment ENVIRONMENT

Chapter 3 Using Source Control

Using a Source Control System

There is an English original explanation.

l Add to version control

When we just use a Project, we must add all objects to version control;

When we have built some objects, we must join them to version control. We can choose the object you want to join, right-click, select "Add to Source Control ..." Add to version control in the menu.

In several cases, we can right-click on the target, select Add to Source Control:

1. The whole project will join the version control for the first time;

2. Add many objects, distributed in different PBLs, find more troublesome.

Note: The command of the version control is mostly in the menu entry-> source control of library painter. The right-click related menu of the object will appear as if the situation is selected.

l Check out the object to work

When we want to modify an object, we need to detect the object. We chose this (some) objects to execute the "check out" command. Object is checked by the current operation user, and the object detected by the current user is updated to the latest version on the server.

l Submit update

After the object is modified, you need to submit it to the server and execute the "check in" command for the object you want to submit. This uses the object on the server with a check-in user local object. Most version control systems are saved by the object in a new version number.

l Check update

We worked for a while, and the companions have modified some objects and submitted to the server. We want to check those objects on the server different from the local? We need to perform the "refresh status" command. Can be performed by two ways:

1. I just want to check a few specified objects, select these objects, and execute the command;

2, I want to check all objects or exclude a few objects. Select Target objects to select all objects. Then remove the object (or default selection all) that does not need to be checked in the pop-up dialog box.

Tip: Select Target to make it easy to perform a lot of objects, but be careful not to overwrite your own work. It is recommended to use the target of the default selection in the dialog as a large number of object operations through Target.

l Update local objects

At appropriate time (such as operator executing refresh status, or PB you update) We know that some objects are inconsistent with the server, we can perform the Get Last Version ... command to synchronize objects. l Execute commands to Target objects

When you execute commands to the target, a window often appears, and the query is to perform operations for all object operations or just a Target object. If you perform actions for all objects, PB will pop up a selection window for developers to select objects to operate. Figure three

Figure 3: Select the range of objects

To perform some commands to perform some commands to perform operations for a large number of objects. But occasionally use improper use of your hard work. The following will make a comprehensive description of the situation of the TARGET performs various commands.

Refresh Status, refreshing state. If you execute this command for all objects, all objects are listed in the selection window, but it is not necessarily all objects. Only those states are still unclear (that is, there is a question mark next to the icon).

Get Last Version, the version of the synchronous object. The pop-up selection window lists all objects, but the default selection is that PB is considered inconsistent, that is, the object with a circle in front of the icon. Other objects can also be selected, but it is recommended not to click on the "All Select" button on the right. If you have an object being detected, this will overwrite your modifications.

Check-out, check out the object. The pop-up selection window lists all the objects that are not detected, that is, you can perform the detected object. By default, all objects are not selected. Unless it is necessary, do not click on the "All Selection" button on the right to detect all objects.

Check-in, check out the object. Talking about the selected window lists all the objects you detected, and it is selected by default.

In summary, it is very convenient to perform a large number of object execution operations through Target, in general, identify the list of default selection. Although sometimes it is not possible to update status information in time, you have to select all objects to operate, especially when get Last Version is operated, be careful.

l show Difference ...

Different. This command is the difference between the latest version and the latest version on the server. If there is no difference, the display dialog information is the same. If there is a difference, a contrast window of the version control system will be displayed.

l Show History ...

Display version history. Select this command to open the Version History dialog box of the version control system. In this dialog box, if two versions are selected, execute the DIFF command, you can compare the differences in these two versions.

1.3 Q & A

Let's explain some of the common problems.

1. When I execute the operation on all objects, I often don't have executed.

A: There is indeed such a phenomenon. I found that this is often a problem that the version control system is more prone to such problems. What's more, it may turn this PB. In this case, only some of the objects can be selected in batches. You can operate an object within a PBL at a time, or half an object within a PBL performs operations.

2. I added some objects to get my companions.

A: You can do it as long as you perform the add to source control. The version control system remembers which PBLs existing in these objects. Your companions do this: In Library Painter, select this PBL, perform GET Last Version to him (by clicking on menu Entry → Source Control System → Get Last Version Does no. PBL's right-click menu without these related commands. Added object The list is listed in the selection list, and the default is selected. Or, perform GET LAST VERSION through the target to the entire application, all servers add new, the local objects appear in the list, and the default is selected .pb These new objects are downloaded locally and placed in the correct PBL file. There is a detailed explanation of this problem in the intermediate articles. 3. How to check out the Target object itself?

A: To detect the Target object itself, when selecting the Target Execute the check out command, select only a single file operation in the pop-up window, which is to operate on the Target object itself. When checking out the Target object, PB will inform "" At this time you need to execute a Get Last Version.

4. I added a PBL, how to get my companion?

A: Your companions will know when appropriate, his target object is inconsistent with the server, and he needs to synchronize his Target object. After synchronization, it will not immediately learn about the Target added a PBL. When he opened this Target next time, PB will tell him that a xxx.pbl file will miss. At this time he needs to manually create this PBL file. Then close and reopen the Target, then the new PBL will appear in the Target list. Then he needs to choose a new PBL and download the new objects using Get Last Version to the local.

5. How to synchronize the Target object correctly?

A: Incorrect synchronization is often unable to successfully get the latest content of the Target object on the server. Since Target is read-only in normal state, often fail when performing Get Last Version, often fail (this is a PB bug). You need to remove the instance properties of the file and then perform Get Last Version.

6. How to delete an abandoned object?

A: First, this requires users with administrator privileges to operate. Second, the content involved here will be introduced in the intermediate article. General User Administrators Contact.

转载请注明原文地址:https://www.9cbs.com/read-112224.html

New Post(0)