GLBasic forum

Codesnippets => Macros => Topic started by: FutureCow on 2009-Jul-14

Title: Integrated version control
Post by: FutureCow on 2009-Jul-14
I think it would be great to have version control (CVS/RCS etc) built into the editor. I can do version control outside the editor, but it would be handy to have it built in somehow.
Title: Re: Integrated version control
Post by: Moru on 2009-Jul-14
Under project options there are two lines called "cmp" and "lnk". Those can be used to autorun scripts before compiling and linking. This would be the ideal place to call some script for activating your own versioning control software.

We have discussed this before and I still think it's better to just use something that is readymade and tested, no use implementing the wheel twice :-)

I use SVN (see tutorial (http://www.glbasic.com/forum/index.php?topic=2697.0)) and am very happy with it but I haven't tried the cmp idea above yet. It certainly is on my list of things I want to though.
Title: Re: Integrated version control
Post by: FutureCow on 2009-Jul-14
I did a search and didn't find anything about the topic, hence the original post.

I have versioning software (based on CVS) that I use but it wouldn't work to use the compile/link options with it. I like to version my files at various times, not necessarily just at compile / link time. I might also change constants in my file (eg when testing I use a "StartLevel=10" or equivalent variable that I would change to try different things) - I don't want my version numbers going up each time I change the player's start level to ensure whatever bug I'm fixing is fixed in every level.

I'm happy to use something readymade - I'm suggesting building checkout/checkin/etc of CVS/SVN/whichever solution into the GUI, not making Gernot make a brand new solution up.

I would suggest that
* Gernot chooses a versioning system to support (eg. SVN)
* Somewhere in the GUI options you set up where your (previously configured outside GLBasic) source repository is
* Put menu options into the GUI for "checkout/checkin/advance major version" etc which then run the correct SVN commands on the back end against the current file.

Just a thought!
Title: Re: Integrated version control
Post by: Kitty Hello on 2009-Jul-14
The version 7 has a set of macro files that can be used to archive this. Volunteers will hopefully post some SVN scripts here.
I might consider putting an SVN server or something up if you want.
Title: Re: Integrated version control
Post by: Moru on 2009-Jul-14
You don't need to put up a public SVN server, for single-man project this is perfectly easy to set up on your own computer. No server software needs to run in the background either.
Title: Re: Integrated version control
Post by: FutureCow on 2009-Jul-14
I agree, I don't think there's much to be gained with a public SVN server (more likely just lots of pain and issues for Gernot!)
It's easy to set up on your own PC. If GLBasic integrated easily with your own SVN setup it would be a nice to have feature.
Title: Re: Integrated version control
Post by: Moru on 2009-Jul-14
I would not mind but it's nothing that I realy need. I just right-click my folder and select commit and it's done. I will look into these macrofiles when v 7 is out, mabe this will solve the problem easily.
Title: Re: Integrated version control
Post by: trucidare on 2009-Jul-14
Code: GLBasic [Select]
IF "%PROJECT_PATH%" = "" EXIT

svn co svn://remote.address/folder "%PROJECT_PATH%"
 

this or similar for checkout