So now we're ready to escape the theoretical and get down to the practical. What version control software do I use? I am an unapologetic windows user and I use TortoiseSVN. If you are a real Architect or other such creative type you are more than likely a Mac user and therefore you need something like ScPlugin - I have no direct experience with ScPlugin so the rest of this article may or may not be useful to you Macheads.
TortoiseSVN provides a graphical front-end, integrated into windows explorer, to the Subversion (SVN) source control system. In it's raw state SVN is command-line utility - I may be a big, old geek but even I don't want to have to open a terminal of dos session and navigate around before working on a file. TortoiseSVN gives you the familiar windows ease of use with the power and stability of SVN as the back-end (the 'vault' we talked about previously). If you're a software developer SVN and TortoiseSVN probably don't need an introduction from me, however, if you're not a techie you may not have heard of these programs before. Don't worry, both these free products have been around for years and are solid, brand leaders (if there is such a thing as 'brand' in the open source community. Many open source development projects are controlled using Subversion and, although ubergeeks love command-line utilities, the rest of us work-a-day programmers use a client such as Tortoise to make using version control a painless propositions. In real life I work for the second largest software development company in the world and we make expensive use of both SVN and Tortoise so you can expect industry-strength products.
There is, however, a big difference between how I use TortoiseSVN in my professional, coding life and how I use it for SketchUp. At work version control is primarily used to allow individuals in teams to work on development projects simultaneously. In SketchUp I am usually working alone on a project but it still provides many indispensable features. It allows me to keep several machines in sync with very little effort and it allows me to explore the history of a model when I need to. So let's talk about specifics; in SVN terminology the 'vault' is called a repository. The repository stores the all versions of all the files in it - it is the source of truth. In a professional environment the repository is stored on a server that is accessible to all team members. Unfortunately my personal server is not available from inside the firewall at work and I do sometimes need to work on a SketchUp model on my work machine. To get around this limitation my SketchUp repository lives on a large, fast memory stick. This is not typical but it works for me - if you have a file server that is accessible from all your SketchUp machines that would be a preferable setup. My repository goes everywhere with me in my jeans change pocket. To protect this resource my thumb-drive automatically backs itself up daily - if I should ever loose or damage my drive I can quickly replace it and have my repository back up and running in a very short time span.
To set up my environment I referenced this article called Subversion on a stick. The instructions can be broken into two parts; initial setup and daily working practices. Setup goes like this:
- Download TortoiseSVN - I keep both the 32 and 64 bit versions of TortoiseSVN also on my memory stick then I can setup any client machines without having to access the internet.
- Install TortoiseSVN - run the executable you just downloaded to install the application - it installs both SVN and Tortoise and it requires a reboot to complete the install as it has to integrate itself into the window's file explorer.
- Create a repository - using windows explorer navigate to your memory stick and create a directory in a suitable place to house your repository. Right click on this folder and select Tortoise SVN > Create Repository Here. When you create a repository it can be stored in either a database (Berkeley DB) or as a file system - I use the native file system as it seems faster and more robust. Give the repository a suitably descriptive name - min, unimaginatively, is called SketchUp.
- Create a working directory on your local PC - in my case this is usually in My Documents/SketchUp - navigate to this directory in file explorer. Right click on the working directory and select SVN Checkout. When asked link this directory to the repository you created in step 3 - it asks for a URL as it expects the repository to be on a web-server but you want to point it to the directory on your thumb drive - the URL, therefore, with we something like this: file:///Z:/Repositories/SketchUp
- Populate the working directory by copying the SketchUp file structure you established as per prior articles into your new SketchUp working directory.
- Put the file structure into SVN - select the top folder in file explorer and right click selecting the menu option TortoiseSVN > add. There are two actions to getting a new file into SVN; first you must add it, then you must check it in (see next step). Make sure you have selected the recursive option and Tortoise should now report on all the files and directories it has added to the repository.
- Check in all the added files - don't ask me why you have to both 'add' and 'check in' new files - you just do. Right click on the SketchUp working directory and select SVN Commit. Again the process should recursively go through all your files and directories.
- On your next machine insert the drive and install TortoiseSVN on this machine.
- Repeat step 4 above to create a link to your repository.
- Populate your local working directory using right click, SVN Update - this should put a copy of all the SketchUp files in the repository on to this machine too.
- Repeat this for each of your working machines.
No comments:
Post a Comment