Version Control

So I introduced one of my developers to Ignition today. His first reaction to see the scripts was where/how is version control applied. After the ensure discusion about the history of VC in Ignition he wanted to write a plugin to support our VC system (SVN). I said go for it :smiling_imp:
He ask if he could add two icons to the bottom of script module editor, right beside the import and export ones.

Can we do this?

Hi Robert,

When we wrote our own version control module for Ignition :wink: we ended up adding a new entry called ‘External scripts’ into the Project Browser between Configuration and Transaction Groups. From here you can add a new entry which points to a directory on your hard drive. This directory of course can be a repository - we happen to use Mercurial, but you can use any version control system.

Our module will try to find that local directory when using the Designer or a staging client. If the directory doesn’t exist or it’s running on a published client, it will use the code stored in the project - the external code is stored in the project when you save.

By keeping our Python code in a repository instead of the Script Module, we have all the benefits of change control within Ignition with a fairly clean workflow. We are only using this module internally at the moment, but we are thinking of releasing it for sale early in the new year. It would be good to know if anyone is interested.

1 Like

That sounds pretty good. I like that the external code is saved internally automagicly.

Does it handle windows as well? Or do you still have to export those manually?

A slight correction - the external code is only stored in the project when you explicitly tell it to do so. This ensures developers can work on their own development versions before updating the live version when they are finished.

At the moment this doesn’t handle windows, only centralised scripts. We have another module that exports a number of elements from a window (e.g. scripts, expressions, tag bindings) and saves them to a directory structure on the local hard drive, allowing us to grep the results. This is only one-way and is really just a convenience for developers.

Is that module available for others to use? I tried searching for it but no luck.

No, we never released the module publicly, although we do still use it internally.

Apparently Ignition 8 is going to contain something very similar, allowing you to export resources (such as scripts) to an external repository. Hopefully you won’t have to wait too long for this to be released!

Just for calrity, it’s not exporting or importing resources. The resources will actually be saved on the disk instead of inside an internal DB.

This is even better, as it saves the step of exporting and importing.

Though you could still use a module to allow committing the changes to your VCS. Otherwise that needs to be done manually.

This is in the current beta now. Not quite as you describe: the filesystem is now the storage media for project resources, and changes at the OS level are recognized like edits in the designer. Described here: