1. Miguel Morin
  2. PowerBuilder
  3. Thursday, 26 July 2018 13:20 PM UTC

Hi
We are planning to migrate from PB 11 to PB 2017R2 to be able to use git in our powerbuilder app (right now we use git for everything else and svn for PB apps)

The git integration seems to work well when the PB source are alone on the repository. It seems to create the .git folder required.

Our problem is that we need to have the powerbuilder app git repository shared with other app on the same git repository. Each app have its own folder, resulting in that kind of directory structure :
- .git (already existing git folder repository where we also want the PB app)
- PowerbuilderApp
- AnotherApp
- AnotherApp

So, as soon as we add the source control to git to the powerbuilder app, it is creating in own .git folder in the PowerbuilderApp folder (as a separate git repo). The only way I was able to workaround that was to setup the source control to git in the PowerbuilderApp (to have the ws_objects folder generated and make the PB think that is setup for source control properly) and then delete the .git folder in the PowerbuilderApp folder.

After that, I am able to keep all apps in the same repo in the root .git folder repository. But, this “solution” have 2 concerns for us:

1) We will not be able to use any of the PB integration of git (because doing so will recreate the .git folder in the PowerbuilderApp folder and we are back withanother repo again). We will have to do all the git command outside of powerbuilder with git bash like we do for the already existing repo with other non-pb app.


2) I am doing the powerbuilder only to have the ws_objects generated, but I’m scared that at some point PB will detect that it dosen’t have git setup properly and stop generating those ws_objects. Because I’m not sure what is the “relation” between pbl and ws_object and the git repo ?

In brief, is there another way to do things to have the powerbuilder app in the same git repository with other apps? Is it something that I’ve missed?

This git integration is really critical for us to be able to work with PB 2017

Thanks for your help

Arthur Hefti Accepted Answer Pending Moderation
  1. Thursday, 26 July 2018 13:41 PM UTC
  2. PowerBuilder
  3. # 1

Hi

we placed the workspace in the root folder. PB creates the ws_objects folder in the rool folder as well. That's not really nice but the only way we managed to make it work.

We have something like






pbproject.pbw

And in the client "ws_folder" you have a folder "client" and subfolders depending on how the structure is set up

Regards
Arthur

Comment
  1. Miguel Morin
  2. Thursday, 26 July 2018 14:10 PM UTC
Hi Mr Hefti,



Thank you for this tips.



Do you add the files of the other apps when selecting the file to add to the source control in powerbuilder or you just select the file of the pb app ?
  1. Helpful
  1. Arthur Hefti
  2. Thursday, 26 July 2018 14:24 PM UTC
Hi

we moved all the files except PB to a new git repository. Then I created the workspace and copyied target and pbls to the appropriate folder. Then from the System Tree I did 'Add to Source Control'
  1. Helpful
There are no comments made yet.
Tom Jiang @Appeon Accepted Answer Pending Moderation
  1. Friday, 27 July 2018 05:25 AM UTC
  2. PowerBuilder
  3. # 2

Hi, 

It seems what you are trying to achieve is exactly what the Git Submodules is for. You can have your PowerBuilder workspace in a dedicated repository and then you can add it as a submodule in your overall repository.

You can check the following link for more information on Git Submodules:

https://gist.github.com/gitaarik/8735255

Regards,

Tom Jiang

Comment
  1. Miguel Morin
  2. Friday, 27 July 2018 13:20 PM UTC
Hi Tom,



Thanks for the tip, I didn't know about git submodules.



It seems to require extra commands like "git submodule update" to work. Do you know if powerbuilder 2017 R2 support those extra commands ?
  1. Helpful
  1. Tom Jiang @Appeon
  2. Monday, 30 July 2018 03:39 AM UTC
No. 2017 R2 doesn't have this command. You will need to use a dedicated Git client tool to do that. PowerBuilder only intend to implement the basic and most frequently-used functions to interact with Git. I don't think this command will be implemented in the foreseeable future neither.



On the other hand, I just realize that this Git Submodules may still not work for you. Because when the repository is not created by PowerBuilder using Add to Source Control or Connect to Workspace, you will not be able to use the Git integration from PowerBuilder, even when you cloned the repository that has been uploaded with PowerBuilder to the Git server with a Git client tool. So you will still need to do the PB development on a separate repository that initiated or cloned (Connect to Workspace) from PowerBuilder.



But if you still want to put all your source code together, the only option that I can think of is to create the repository from PB and then put the other non-PB projects inside the root folder.. Then you can put your PB target in a sub-folder so the root folder won't be filled with PBLs. The folder structure would be something like this:

- PowerbuilderApp

- AnotherApp

- AnotherApp

- ws_objects

- myworkspace.pbw





  1. Helpful
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.