May/06/14



You asked for it, and now it’s here: the ability to access previous builds of software Models you’ve been working on in the Electric Imp IDE.

Whenever you click on Build and Run or Build, the IDE saves a new version of your code, both agent and device. Until now, earlier builds were not accessible through the IDE, so if you wanted to put back lines you removed a few versions back, you couldn’t do so unless you made an offline copy by pasting the code into a text file or source control software such as GitHub.

Now you don’t need to. The IDE has a new button alongside Check and Build and Run which allows you to select any past build of your Model, with the newest listed at the top of a pop-up menu. Just choose the build you want to view to see the code at that stage of development.

image

Select any of your Model’s earlier builds.

Past versions of your code can only be viewed, not edited. However, when you select a previous build the IDE adds a button which allows you to copy the code into a new version of the Model. Clicking on the Copy to new build button copies both agent and device code.

While past builds are intended to be read and not edited, don’t forget that if you simply want to recover a section of code – perhaps a function you later modified or deleted – you can select and copy the code using your OS’ standard copy and paste tools then drop the code into your current build.

image

Previous versions can only be read, not edited, but can be copied in their entirety to a new build.

Your new, as yet unsaved version is listed at the top of the build menus list with an asterisk to indicate it has not yet been saved. Should you copy another past build to the current version, you’ll be asked if you want to overwrite the code.

Click on Build and Run or Build, and your code will be saved as a new build. If you change your mind about reverting to an earlier build, just select the most recent build from the list and copy it to a new version.

image

The reinstated early build is now the current one. The asterisk shows it has yet to be saved.

Log in to the IDE to try out this new feature. Don’t forget to post any feedback you have about it in the Electric Imp Forums.

David Kurtz
Senior Frontend Engineer