1. Gastón Clara
  2. PowerBuilder
  3. Friday, 16 July 2021 11:56 AM UTC

Hi guys,

We are moving our code to a Git Repository and we are facing and issue with directories. 

As per my tests everything works fine if PB workspace is on the root directory for the repository (ws folder is also created and managed from there). The problem is that the current repository has the application in a subfolder.

If I clone our repo on c:\application and I get the PBW file and its PBTs, PBL, etc from this location everything works pretty well. 

But if I have an intermediate directory like c:\application\Admin\ not. The original git repository works on c:\aplication but PB creates a new one under c:\application\Admin\ so we have alike a sub repository and this is not wanted by my company.

Do it has to be always like this? Is there any way that PB uses the repository from the root directory instead of the one that it creates for itself?

Using PB2019 R3.

Thanks a lot for your help!

 

 

 

Gastón Clara Accepted Answer Pending Moderation
  1. Tuesday, 20 July 2021 12:18 PM UTC
  2. PowerBuilder
  3. # 1

Another option could be the use of Symlinks. We can define a folder ws_objects that it is really a symlink to the destination folder for the objects. We did it, the link is correctly uploaded to Git and, if we clone  the repository from the command line it works fine. But, if we did it from the IDE with Connect to workspace, the link is downloaded just as a text file. It does not work as the directory is not present when PB tries to regenerate PBLs with the exported objects.

Any reason for that? It is also strange that if we change git.config file in order to set core.symlinks = true, in orde to support links after cloning, after cloning form the IDE the values is set back again to false...... probably by PB, right?

Thanks for your help.

Comment
There are no comments made yet.
Tom Jiang @Appeon Accepted Answer Pending Moderation
  1. Monday, 19 July 2021 03:19 AM UTC
  2. PowerBuilder
  3. # 2

Hi Clara,

The workspace file (*.pbw) needs to be in the root directory of the repository. In other words, each workspace needs to have its corresponding git repository. The other files (*.pbt, *.pbl") can be put in a subfolder in this repository. 

It seems that you are trying to put several workspaces into the same repository. This is not supported by PowerBuilder. Note that if you do it like this, it would mean that every developer needs to sync all the changes for all the workspaces, even if he just works with one of the workspaces. This is also part of the reasons that this type of structure is not supported. 

Regards,

Tom Jiang

Comment
  1. Benjamin Gaesslein
  2. Monday, 19 July 2021 11:09 AM UTC
I have not tested this but it might work for you:

- Create a git project that houses all your non-PB code

- Have a seperate project for your PB app

- use git submodule to integrate the PB project into your main repo



PB's native git integration cannot properly handle submodules BUT since it's actually a seperate repo, connecting to the PB repo directly should work from PowerBuilder.
  1. Helpful
  1. Gastón Clara
  2. Tuesday, 20 July 2021 07:52 AM UTC
That would be a good solution but unfortunatelly here tehy dont want to use submodules.

Ok, one more question, is ther a way to manually recreate PBLs from the exported objects like the option that you now have when yo choose Connect to workspace checkbox Refresh PBLs?
  1. Helpful
  1. Tom Jiang @Appeon
  2. Thursday, 22 July 2021 01:33 AM UTC
You have the same refresh function when you right click on the System Tree inside PB IDE. You just need to put the exported objects into the corresponding folder inside ws_objects before you do the refresh.
  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.