1. Miguel Morin
  2. PowerBuilder
  3. Monday, 26 April 2021 13:24 PM UTC

Hi

I am learning how to use git with our powerbuilder 2019 R3 (freshly migrated) app.

I've successfully created a new git repo in bitbucket for this powerbuilder app. I did a few tests and it worked fine.

But a separated repo is not the ideal scenario for us. What we would like to add our powerbuilder app to an existing repository (that contains multiples C# and angular app, because our powerbuilder app is mixed with winform and angular pages). This way we cant keep all changes for a specific feature in a single branch.

I would like to add the powerbuilder app in a folder \Powerbuilder in the root git repository. I'm not sure how to do the initial commit on this... and can't get it to work.

What I did for a separate repo is that I just added the pbl in a folder, then "Add to source control", but I can't do that for my existing multiple app repo, because the git repo already exists...  and if I select "connect to workspace", then i get an error while pulllig the object  "Failed to perform because the objects already exists"

So my question is : Is there a way to add a powerbuilder app to a repo containing other app? If, yes how to do it correctly ? 

 

Thanks

Miguel Morin Accepted Answer Pending Moderation
  1. Monday, 26 April 2021 20:59 PM UTC
  2. PowerBuilder
  3. # 1

Thank you everyone for your quick replies.

Here is my procedure to add the Powerbuilder app in my existing repository (that contains multiples applications) :

  1. Create a new branch on my existing repository and git checkout in git bash
  2. Copy the pbl and the pbw file in a \Powerbuilder folder in the root directory of my repo
  3. Edit the gitignore file to exclude pb files : *.pbl, *.pbd, *.pbg, *.user.opt
  4. Create a folder ws_objects in the root directory of my repo
  5. Open Powerbuilder and commit to generate and add all the files in the ws_objects folder
  6. Open git bach and add the pbw file and commit the gitgnore to the repo ans push to bitbucket

For the development side on the dev loop, this is what we intend to do:

  1. Create a new branch on my existing repository and git checkout in git bash
  2. Modify the code in Powerbuilder or other languages (C#, angular, etc)
  3. Git add if needed and git commit in git bash

For the retrieving/compiling for version side of the dev loop, we will plan to do this :

  1. Checkout and pull the master branch with git bash
  2. Open Powerbuilder and do a Refresh on the target. From my testing, it seems that this process recreates the pbl from the ws_objects.

I would like to know if there is any issue with this setup

Thanks

Comment
  1. Tom Jiang @Appeon
  2. Wednesday, 28 April 2021 05:44 AM UTC
Hi Miguel,



In order for PB IDE to enable Git, you will need the hidden .git folder and the ws_objects folder and the pbw file all in the same folder. The PBT and PBL files can be put in a sub-folder. For example, you could have a folder structure like below.



.\.git

.\csharp_project

.\ws_objects

.\pb_ws.pbw

.\Powerbuilder

.\Powerbuilder\a.pbt

.\Powerbuilder\a.pbl

.\Powerbuilder\b.pbl

...



AFAIK, if you put the pbw file in a sub-folder, Git will not be enabled in PB IDE. So I suggest that you check if there is a hidden .git folder in your Powerbuilder folder to make sure you didn't accidentally create a nested git repository.



Regards,



Tom Jiang
  1. Helpful
  1. Miguel Morin
  2. Wednesday, 28 April 2021 12:20 PM UTC
Yes this is what I did
  1. Helpful
There are no comments made yet.
Tom Jiang @Appeon Accepted Answer Pending Moderation
  1. Monday, 26 April 2021 15:11 PM UTC
  2. PowerBuilder
  3. # 2

Hi Miguel,

You can try put your PBW, PBT, PBLs in the root folder of the multi-app repo. Then just create an empty ws_objects folder in the root folder too. So when you open the workspace, it will think that its already in source control and allow you to skip the add to source control part. You just need to do a commit to add all the objects to the ws_objects folder. 

Then if you want other developers to be able to setup their environment directly using connect to workspace, you will need to upload all the PBLs to the repo. Or if you don't want to commit the PBLs you could just copy them to the other developers. 

Regards,

Tom Jiang

Comment
There are no comments made yet.
Govinda Lopez @Appeon Accepted Answer Pending Moderation
  1. Monday, 26 April 2021 14:04 PM UTC
  2. PowerBuilder
  3. # 3

Hi Miguel Morin,

 

I would first add it using PowerBuilder (at the Workspace level). Then, I would add any additional files using any third party Git manager (in example, Tortoise Git). That way you can add any html and other source code files you want.

 

You can find more detailed information on how to use Git with PowerBuilder in the following link.

 

 

Regards,

Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.