1. Ashutosh Varshney
  2. PowerBuilder
  3. Wednesday, 21 July 2021 19:17 PM UTC

Hello All,

I have been testing git functionality from the PB IDE. I have a very simple application with one window and a few datawindows. My repos are hosted on a GitLab server.

I was able to upload my application library successfully the first time.

Then using another instance of PB, I connected to my repo using "Connect to Workspace". PB was able to connect and get all objects. Now when I try to make changes to a window and the save them I get an error "Save of object failed."

I went back to the previous PB instance and tried to make changes and save but I got the same error again.

Any ideas what I am missing?

Thank You.

 

Accepted Answer
Drew Buchanan Accepted Answer Pending Moderation
  1. Thursday, 22 July 2021 20:13 PM UTC
  2. PowerBuilder
  3. # Permalink

This is due to a line endings issue. PowerBuilder requires specific line ending characters.

Run this from git bash, then do a workspace refresh:

# Configure line endings
git config --global core.autocrlf true
# Reset line endings for all files
git rm --cached -r .
git reset --hard

Comment
  1. Tom Jiang @Appeon
  2. Wednesday, 28 July 2021 07:03 AM UTC
Hi Ashutosh,



Did Drew's answer resolves your issue? 



I see that you are using PowerBuilder 2017 R2 which is EOL. We suggest that you upgrade to the latest PowerBuilder 2019 R3, which includes many improvement in Git integration.



In PowerBuilder 2019 R3, the IDE will add the autocrlf option and set it to true on Windows if no other Git tool has installed and configured such an option.



However, if you manually change the setting of autocrlf (from true to false or input), and then download objects from the server, these objects will have LF line endings instead of CRLF, which will cause compilation errors in the PowerBuilder IDE.



If such compilation error occurs, you should set autocrlf to true, download files from the server again, and then compile again. For more about the autocrlf option, refer to https://git-scm.com/book/en/v2/Customizing-Git-Git-Configuration.



Regards,



Tom Jiang
  1. Helpful
There are no comments made yet.
Ashutosh Varshney Accepted Answer Pending Moderation
  1. Tuesday, 3 August 2021 14:10 PM UTC
  2. PowerBuilder
  3. # 1

Thanks Drew. Thanks Tom.

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.