Code

Source control enhancements

The source control management system has the following enhancements:

  • (Git) Enhances the Create Branch and Switch Branch functionalities.

    In the Create Branch dialog, you can select the Switch to new branch option to switch to the new branch after creation. This will automatically change your working directory to the newly created branch, allowing you to start making changes right away without needing to switch branches manually later.

    In the Switch Branch dialog, you can select the Create new branch option to create a new branch while switching. This allows you to specify a name for the new branch and choose whether to base it on the current branch or another existing branch. Once you click OK, the new branch will be created, and your working directory will automatically switch to this new branch. If you encounter a situation where a branch with the same name already exists, you can select the Force if duplicate branch name exists option. This will overwrite the existing branch with the new one you are trying to create, ensuring you can proceed without conflicts.

  • (Git) Adds a right-click menu called Git Merge to merge a selected branch into the current branch.

    When the Git Merge menu is selected, a Git Merge dialog will open and allow you to 1) select a branch, 2) enter the merge message, 3) combine multiple commits into a single commit when merging the selected branch to the current branch.

For detailed instructions, refer to the section called “Use branches” in Users Guide.

Minimizing code merge conflicts

PowerBuilder has the unexpected behavior of changing the order of code blocks in the source code. For example, when the prototype of the function is modified (e.g., by adding an argument or changing the function name), the entire code block of the function will be moved to the end of the code within the window; when multiple objects are modified simultaneously in DataWindow, even though you make no changes but just move them, the corresponding code block is relocated to the end of the source file.

The movement of code blocks creates unnecessary conflicts when merging the source code using SVN, Git etc. And now this behavior has been rectified and the code merge conflicts will be minimized.