GIT version control

Hi All,

First of all, thank you for taking the time to read this post.
I would like to know if Opto code has become friendlier to version control tools such as GIT. I know this has been discussed a number of times, for instance :

However, all posts seem to date back to 2012-2016, so I was hoping there has been some improvements to better support GIT version control since then. My main interest will be a way to easily track changes between versions and easily swap around branches to benchmark different implementations of the same pseudocode.

If not much has changed, could you please let me know if there is an ā€œacceptedā€ workaround, say exporting the strategies as a text file (albeit one less obscure than the compiled cdf file).

Thanks a lot for your help.

Andres

No improvement there, maybe everyone gave up and quit asking? :upside_down_face:

I myself keep the archive features turned on and clean up the folder every once in a while. I also found that placing a comment box in the power up chart and recording dated changes in there helps too.

It sure would be nice to be able to compare changes and track things like proper source control though. A text export and import feature would be nice, especially when I accidentally upgrade shared subroutines to a newer PAC Control version :crazy_face:

Yeah, we get about 1 request every 5 or so years. Hard to commit any resources to such a low volume request.

As per the posts you linked to:

  • Save to file the Database.
  • Save to file the Chart Instructions.
  • Save to file the Cross Reference.
  • Export the OTG.
  • Turn on full debug and retain the compiled Forth file.

Keep those in GIT and track changes in your strategy.
That seems to be the best ā€˜acceptedā€™ workaround that people are using.

Thanks @philip and @Beno

Just as a note to myself and any future users:

  • Save to file the Database, Save to file the Chart Instructions, Save to file the Cross Reference. As explained in another post by varland (Way to compare prject files - #2 by mstjohn), in PAC Control go to File>View/Print and choose ā€œDatabaseā€¦ā€, ā€œAll Chart Instructionsā€ and ā€œCross Referenceā€, respectively. Note varlandā€™s comment of using a script to split the ā€œAll Chart Instructionsā€ file into chart-specific files.
  • Export the OTG. In PAC control, right click the I/O unit in the strategy tree and select export. See /t/any-way-to-send-otg-file-to-a-controller-using-linux-instead-of-pac-manager/377/7 and /t/otg-file-format/667/2 for more details.
  • Turn on full debug and retain the compiled Forth file. See /t/revision-control-subversion/277/2 for details
1 Like

Following on the previous. I assume the above files (.txt, .otg, .cdf) get also committed along with the corresponding zip that was last archived when downloading to the PAC.
I assume it also makes sense to save the .idb, .ini and all charts (.cht, .ccd) files.
What about the other extensions (.crf, .inc, .inf, per, libd, .crf)? Are these important or are they recreated/recompiled from the database (idb file)? Further, are all these files even necessary, considering that they are likely already included in the archived zip?

Thanks again for your time,

Andres

You just need to check the Archive on Download box and keep that archive.
Everything you need will be in there.
If you look at Windows Explorer ā€˜liveā€™, you will see that if you unzip the archive, then open it in PAC Control, all those other fluffy files will be created as needed.

I guess I must be the guy who requests this feature every 5 years. Hard to believe Iā€™m the only one, but Iā€™ve given up on Opto addressing this.

One thing to note: in my previous post where I talked about printing files and tracking those text files in Git, none of Optoā€™s built-in printing methods includes printing all subroutine files included in a strategy. If you print all chart instructions, subroutines if your project arenā€™t included, so be aware of that. Subroutines must be printed individually.

While itā€™s not an ideal solution, what Iā€™m actually hoping for is that at some point Opto includes an option to automatically ā€œprintā€ each chart/subroutine to a text file whenever the chart/subroutine is saved. The code for printing these files already exists. I just want a hook in the save method where it happens automatically. Save the file as plain text alongside the other chart/subroutine files in the project directory. This would accomplish everything I need, and while there may not be a ton of people requesting the feature, it doesnā€™t seem like it would be that difficult and it would provide much needed functionality.

The fact of the matter is that when I deal with larger strategies (dozens of charts and dozens of subroutines), itā€™s just not practical to manually print everything every time, and expecting members of my team to do the same just isnā€™t a sustainable solution. Automatically saving a plain text version of each chart/subroutine would be sustainable. Then I can just initialize a Git repository in my project folder and itā€™ll capture these trackable text files as well as archive files, etc.

3 Likes