Connect to an existing local Git/SVN repository with PowerBuilder
IDE
Symptom
PowerBuilder native support for Git/SVN requires a special folder
structure, like the ws_objects folder. You can use “Add to source
control” to let PowerBuilder create the repository and upload it to a
bare repository on a Git/SVN server. Other developers can then use
“Connect to Workspace” to set up the clone to their local
machines.
If you have already cloned the repository created by PowerBuilder
using another tool or you moved the workspace folder, PowerBuilder will
not automatically recognize the connection.
Environment
-
PB 2017 R2 or above
Cause
PowerBuilder saves the source control information in the registry
for each workspace based on its path and workspace name. When the
workspace folder is moved, it can no longer find the source control
information.
Solution
You can use the following workaround in this situation:
Let us say you have an existing repository in
C:MyWorkspace.
1. Temporarily rename your existing repository to another name
C:MyWorkspace_temp.
2. Create a new folder with the name C:MyWorkspace.
3. Use “Connect to Workspace” to download the workspace from the
Git/SVN server.
4. Delete C:MyWorkspace and rename C:MyWorkspace_temp back to
C:MyWorkspace.
Alternatively for Git, instead of using step 2 and 3, you could do
the following:
2. Create a new folder with the name C:MyWorkspace and a dummy
*.pbw file that has the same name as in your original folder.
3. Add the workspace to source control in PowerBuilder IDE (you
don’t need to push it to your server).
Now you can open your workspace in C:MyWorkspace with
PowerBuilder and it will recognize the source control connection.