SVN for firmware projects
This How-to is intended for:
Any audience.
Purpose
You'd like to track the MakingThings firmware code via Subversion (SVN) so you can get the latest updates, but you'd like to keep your projects in your own Subversion repository.
Prerequisities
This assumes you have Subversion installed on your computer, and a Subversion repository set up.
Step by step
As of firmware release 1.5.0, it's easy to checkout only the directories you need from the MakingThings firmware code. Using the Subversion externals property, you can pull changes into your working copy from more than one repository.
The MakingThings firmware directory structure looks like:
- core
- libraries
- doc
- projects
We only really need the core and the libraries folders - you'll maintain your own projects folder in your SVN repo. Let's get started.
- Create a new directory in your SVN repo called myfirmware or whatever you like
- In myfirmware, create a directory called projects
- Also in myfirmware create a file called EXTERNALS.txt
- Copy and paste the following into EXTERNALS.txt
# Apply/update externals definitions with this file by typing # svn propset svn:externals -F EXTERNALS.txt . core https://www.makingthings.com/svn/firmware/trunk/core libraries https://www.makingthings.com/svn/firmware/trunk/libraries
Now, add everything to your repo and check it in. Navigate to the myfirmware directory in a shell and type
svn propset svn:externals -F EXTERNALS.txt .
If you use a GUI client, there may be another technique for modifying the properties of your repo, but the command above should do the trick.
Then you'll need to commit your changes once more. Now, the next time you check out myfirmware, the checkout process will get the core and libraries folders from the MakingThings repository, and the projects folder from your repo and combine them into a single working copy. Best of all, when you update, you'll also pull in any changes from the MakingThings repo, as well as your own.
Further information
- For more info about Subversion, see http://subversion.tigris.org

