1. Sverre Tvedt
  2. PowerBuilder
  3. Monday, 14 August 2023 18:19 PM UTC

Having made some experimental changes to an object and regretting it, how do I get back the last locally commited object code?

 

 

After some back-and-forth I found this way:

1.Right-click on object in PB object browser and select "Open containing folder"

2. Right-click on object file marked red in the containing folder and select TortoiseGit

3. Select TortoiseGit->Revert

4. Click OK a couple of times

5. Refresh the pbl in the PB object browser.

 

Is this the only way?

Accepted Answer
Sverre Tvedt Accepted Answer Pending Moderation
  1. Friday, 15 September 2023 17:55 PM UTC
  2. PowerBuilder
  3. # Permalink

The proper term involved here is "Git Revert", that is, reset the code unit to the last local commit.

 

This fails because the revert operation i Powerbuilderruns on a local system account that is prevented to write by the group policy within the company domain.

So better stick with TortoiseGit.

 

regards sverre

Comment
There are no comments made yet.
Arnd Schmidt Accepted Answer Pending Moderation
  1. Monday, 14 August 2023 22:31 PM UTC
  2. PowerBuilder
  3. # 1

AFAIK, you can use "Git Revert" from the context menu.

hth

Arnd

 

 

Comment
  1. Sverre Tvedt
  2. Tuesday, 15 August 2023 10:15 AM UTC
Thats what I thought, too. Until version R2, the context menu item " GIT revert" always gave me an error message, reported elsewhere in this forum. Now the error message is gone, but no action is performed. Perhaps there is a way of configuring TortoiseGIT that I have missed?
  1. Helpful
There are no comments made yet.
so th Accepted Answer Pending Moderation
  1. Tuesday, 15 August 2023 00:37 AM UTC
  2. PowerBuilder
  3. # 2

As long as you do not exit out of IntelliJ Idea (meaning kill/close IntelliJ application), you should be able to recover from Local History. Select main folder -> right click -> Local History -> show history.

GIT Reset---> hard command is another way probably it works

Comment
There are no comments made yet.
kitty he @Appeon Accepted Answer Pending Moderation
  1. Thursday, 17 August 2023 01:59 AM UTC
  2. PowerBuilder
  3. # 3

Hi Sverre,

 

Git Revert can be used to undo local modifications before the local modifications are committed to the server.

But I see that you have not successfully executed using Git Revert, because we have not received any bugs of this kind, and our local is normal, so I want to know the operation steps you used, or the status of the object before you execute Git revert.

 

Regards,

Kitty

Comment
  1. Sverre Tvedt
  2. Thursday, 17 August 2023 13:40 PM UTC
We have set up a a set of GIT repositories (One for each workspace) on Azure Devops and have basically two workstations connected. The configurations have been done according to the available Appeon documentation. It works mostly, but a couple of times a year I have to reset one of the workstations for one application and connect to the central repository again.

Both workstations have TortoiseGIT (2.6.0.0) installed and is configured in the recommende way. TortoiseGITProc.exe for both DiffViewer and Showlog/Editconflicts (Advanced settings, workspace settings).

TortoiseGIT has a universe of settings and configuration possibilities both in operation and during installation, so here I miss some better documentation from Appeon.

The status of the object befort Git revert is changes , uncommitted to the local repository. Before those changes, both workstations are in sync.

Now according to Appeon documentatio GIT Revert does "PowerBuilder downloads the object from the server repository and replaces the copy in the local repository".

This is not what I ask for. I want to undo local, uncommitted changes and have back the last locally committed version. I thought this was "GIT reset", hence the title. This is a VERY frequent need.
  1. Helpful
  1. Benjamin Gaesslein
  2. Monday, 21 August 2023 08:37 AM UTC
I haven't tested it but I doubt that PB actually "downloads the object from the server repository" on "Git Revert", that wouldn't make much sense and goes against what git is all about - local repositories being completely independent. What should happen is that PB replaces the current uncommitted state of the object with the one from the current local HEAD commit.
  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.