This may be one for the Expansions Forum, however it's also Mac-specific so might be better here.
Does anyone out there use version control to help manage development of their OXPs? As my offerings seem to be getting more complex I thought it might be an idea to try putting them under some proper control so I can avoid losing track of things quite so often.
I've been using SVN in a limited capacity for some other minor stuff but I'm not quite sure how best to use it when it comes to OXPs. In particular, is it possible to place a checked-out package directly in the AddOns folder so that it can be modified, run and (if everything goes well) committed, or would it be necessary to hold a working copy somewhere else and transfer files between the two locations in order to commit back to a repository?
Any pointers would be gratefully received.
OXPs and version control
Moderators: winston, another_commander
OXPs and version control
Download Resistance Commander plus many other exciting OXPs HERE
- maik
- Wiki Wizard
- Posts: 2028
- Joined: Wed Mar 10, 2010 12:30 pm
- Location: Ljubljana, Slovenia (mainly industrial, feudal, TL12)
Re: OXPs and version control
I use SVN quite regularly for work purposes, but not for OXPs. Generally speaking, you can put any directory under version control, so there is no need to copy between locations. So if you want your work-in-progress OXP to be part of your Oolite add-ons you would put the .oxp folder and all its contents directly under version control.
It would probably be best to have two Oolite installations then: one where you work on your OXPs and a second one which contains a copy of the latest released version of your OXP so that you can easily verify reported bugs. In effect you would create a development environment (which is under version control and subject to frequent changes) and a test environment (which is kept stable).
Hope that helps.
It would probably be best to have two Oolite installations then: one where you work on your OXPs and a second one which contains a copy of the latest released version of your OXP so that you can easily verify reported bugs. In effect you would create a development environment (which is under version control and subject to frequent changes) and a test environment (which is kept stable).
Hope that helps.
- JensAyton
- Grand Admiral Emeritus
- Posts: 6657
- Joined: Sat Apr 02, 2005 2:43 pm
- Location: Sweden
- Contact:
Re: OXPs and version control
I do. :-) There are three different test suite OXPs in the Oolite svn repository, plus the debug OXP. The test suites are simply OXPs checked into the repository, while the debug OXP uses a build system like “real” software.
For personal use, you’d probably be better off with a distributed version control system, like Mercurial or Git. These allow you to set up a repository in a folder without requiring a server. (If you’re using a separate server for svn you also get a backup as a side effect, but you can back up a repository like any other directory using normal backup software.)
OXPs in repositories can be put straight into the AddOns directory, and you can do commits and stuff there (I do this with the test suites). For svn, you can check out a subfolder within the repository, which is useful if your repository is a folder with the OXP and additional working files in it (for example,
To publish an OXP from svn, use the
For personal use, you’d probably be better off with a distributed version control system, like Mercurial or Git. These allow you to set up a repository in a folder without requiring a server. (If you’re using a separate server for svn you also get a backup as a side effect, but you can back up a repository like any other directory using normal backup software.)
OXPs in repositories can be put straight into the AddOns directory, and you can do commits and stuff there (I do this with the test suites). For svn, you can check out a subfolder within the repository, which is useful if your repository is a folder with the OXP and additional working files in it (for example,
svn checkout svn://example.net/myoxp/myoxp.oxp
). You can’t do this with Git, so you’d need to make the root of the repository the OXP. I suspect other DCVSes have the same limitation.To publish an OXP from svn, use the
svn export
command to make a copy without the hidden .svn directories. Git and, I believe, all the other “modern” systems use a single hidden folder in the root of the repository, so you can just copy the OXP contents out.E-mail: [email protected]
Re: OXPs and version control
Thanks Ahruman, that's just the kind of info I was after. Will give it a go and see how I get on.
Download Resistance Commander plus many other exciting OXPs HERE