IDE script for a quick backup

I will sometimes rework portions of a project that, if unsuccessful, may prove very destructive and difficult to undo. Therefore I would like to make a temporary backup copy of the code just before embarking on the changes so that I can roll back if I foul it up beyond all recognition. Ideally, there would be the equivalent of a button or menu item to make these snapshots of the code.

I presume that an IDE script would be the way to do this. Ideally, it would prompt for a phrase to embed in the filename of a copy of the current code and/or embed a fie creation timestamp.

Can someone please share an example of an IDE script that does this?

That’s what SVN or Git are fore.

What @Beatrix Willius said. Don’t reinvent the wheel, dive into source control, especially since you now realize that you need it.

Believe me, we’ve all been where you are now, and I guarantee that once you start using some source control protocol, you’ll wonder what you did before.

I recommend the free SourceTree app as a good starting point.

I know a guy that did some Xojo webinars on Git a while back, might help you out. :wink:

https://documentation.xojo.com/resources/videos/webinars.html#2014

Getting to Know Git, Part 1 - Getting to know Git, Part 1 - YouTube
Getting to Know Git, Part 2 - Getting to Know Git, Part 2 - YouTube

Oh, that guy…

pfft not that guy ?

YEP, HIM! :wink:

Thanks but I just don’t git it. Looking for a simple, workable solution - one that doesn’t require downloading additional 3rd party software stocked with features for which I have no interest or need, requiring watching hours of video tutorials and reading manuals.

I do appreciate the advice, but please forgive if I feel I’m being upsold something that I don’t need and likely cannot even use.

I assumed that a few IDE scripts steps might meet my needs.

PS: I should explain that it appears that these systems require XOJO projects to be saved as a series of text files. My version of XOJO cannot do this (though that option is oddly present in Preferences under “Default project format:”

The Xojo version doesn’t matter. You can use SVN/Git with the basic version. Just make all project items external.

And no, a few IDE scripts aren’t going to do the trick.

For the Mac there is a cheap app called XVersion, which costs about 15$.

text files are the easiest to do anything useful in terms of comparing current and older versions
this is because version control software has no understanding of the custom binary format that Xojo uses for binary format projects

while you CAN diff XML it’s … well … not pleasant

text format simply works best for this

You’re not. You’re being given sound advice by experienced developers who’ve all been where you are now, sought solutions along the lines of what you’re considering, and finally took the plunge (or, my case, was dragged kicking) into version control. Our insistence is borne of our own past failures and aggravation, and we’re looking to spare you that inevitable fate.

OK… thanks to all. I’m starting to git it.