Team Collaboration Using Subversion (SVN)
- Project Setup
For each Project that you want to place under collaborative Subversion control, here are the steps you need to perform to set it up:
- Create the GUI Design Studio project
- Create the project repository (optional)
- Set up authentication on the repository (optional)
- Import the project into the repository
- Update your working copy of the project
- Re-open the project
1. Create the GUI Design Studio project
Create the GUI Design Studio project in the normal way on your regular machine (it's okay if this is also the server). Feel free to add files and folders to the project before activating Subversion control.
You can, of course, set up any existing project for collaboration using these instructions.
Ensure all project files are saved to disk (use the "File | Save All" menu command). Although it's not actually necessary, it's best to close GUI Design Studio at this point or at least close the project since it will need to be closed and re-opened later to complete the setup anyway.
2. Create the project repository (optional)
If you are using an existing, master repository for your project (recommeded) then you can skip to the Import step.
Otherwise, you'll need to create a new Subversion repository for it.
Create a suitable folder within the designated root folder on your server (see Preparation Step 2), based on your project name. For example, this might be "C:\svn\MyProject\".
Use the "Create Repository" command in your SVN client to create a repository within the new folder. With TortoiseSVN, you can do this from the right-click context menu on the folder:

New files and sub-folders will appear within the folder:

3. Set up authentication on the repository (optional)
If you just created a dedicated repository for the project (Step 2) then you will need to set up user names and passwords so that your team members can access the server repository from their own machines.
For detailed instructions on how to do this with both an Apache server and svnserve, please refer to the TortoiseSVN documentation.
If you are using svnserve, the simplest approach is to:
- Open the "/conf/svnserve.conf" file in a text editor and replace these lines:
# anon-access = read
# auth-access = write
# password-db = passwd
With these lines:
anon-access = none
auth-access = write
password-db = passwd
Then save the file. - Open the "/conf/passwd" file in a text editor and add an entry into the "[users]" section for each user:
[users]
Harry = harryspassword
Sally = sallyspassword
Then save the file. If you add more users later, you can simply edit this file again.
4. Import the project into the repository
Now you need to get your project files into the repository. In Subversion, this is called 'importing' and you will need to do this from your SVN client.
With TortoiseSVN, select the top-level folder of your project in Windows Explorer and use the "TortoiseSVN | Import..." command in the context menu to open the Import dialog:

The URL you enter will depend on:
- Where your server is and how it was set up. The first part of this will point to your designated root folder. In the example above, "svn://192.168.1.101/" points to our LAN server and, ultimately, the "C:\svn\" root folder on that server.
- Whether you are using a master repository or a dedicated repository for the project. For a dedicated repository, the second part will simply be the name of the folder you created in Step 2, e.g. "MyProject". In the example above, we are using a master repository called "GUIDesigns" and are placing the new "Web Real Estate" project into a "/Samples/Web Real Estate" sub-folder.
Note that forward slashes ('/') are used in repository URLs just like for Internet Web page URLs. The import command will create sub-folders if they don't already exist.
You can also enter a comment in the "Import message" box if you want to. This isn't necessary but can be useful if you're using a master repository that's already had a lot of activity.
When you hit "OK", the files will be imported and the resulting repository revision number will be reported:

5. Update your working copy of the project
To create a working copy of a project from a repository, you need to check it out.
Unfortunately, Subversion (and TortoiseSVN) doesn't do this automatically when you import your files so you'll need to do this as an extra step here.
If you're using TortoiseSVN, from the parent folder of your project in Windows Explorer, use the "SVN Checkout..." context menu command:

Once you've verified that the URL and Checkout directory are correct, hit "OK" and, unless you chose a new destination folder, you'll be prompted to confirm the operation because the target folder is not empty (it already contains a copy of the files you're trying to check out!):

Subversion will then version each of your project files and folders:

If you have hidden files turned on in Windows Explorer then you might notice that Subversion has created a hidden ".svn" folder within each of your project folders. GUI Design Studio will ignore these folders and so should you.
6. Re-open the project
That's it! The project has now been converted for Subversion control and you can now re-open it in GUI Design Studio.
If everything has gone according to plan, you should now see the version control icons in the Project file tree:
