DT Consulting Newsletter; Issue 3
Version Control with Enterprise Architect
- svnserve – the easiest and most straightforward option (and the option covered in this newsletter). svnserve installs as a Windows process which starts automatically upon booting.
- Apache – offers more options, but is more complex to setup. There is ample documentation on the Subversion web site, including a complete book, available for download. This documentation discusses the pros and cons of each server installation in more detail.
Double click the installer file CollabNetSubversion-server-1.5.0-23.win32
Click OK and then click Next, until the following dialogue appears:
Ensure that both components are selected as above, then click Next.
The next dialogue indicates the default port for svnserve and the default location for the Subversion repository. Modify these if required.
Ensure that the checkbox to run svnserve as a Windows service is checked and click Next.
The next dialogue is for Apache (under which svnserve runs) and the only setting to be aware of is the Host Port. If you already have a Web Server running on the machine onto which you are installing Subversion, change the port 80 to something else, say 8080 as shown below:
Ensure that the checkbox to run Apache as a Windows service is checked and that the repository path agrees with what was stated in the previous dialogue and ensure that the repository location prefix is /svn then click Next.
The next dialogue is the default location for the Subversion server and can be left as is:
Click Install to start the installation process.
The installation process is pretty quick and after it completes, TortoiseSVN can be installed as described in the next section.
Double click the TortoiseSVN installer file TortoiseSVN-22.214.171.12416-win32-svn-1.5.0
Click Next accepting the Licence agreement and defaults
When the installation completes and Finish has been clicked, your system will have to be restarted in order that Windows File manager can be updated with the new TortoiseSVN extensions.
Before running TortoiseSVN to create a repository, it is necessary to set the Windows Firewall (or any other firewall) to allow svnserve to communicate via TCP port 3690. The process for achieving this for the Windows Firewall is:
1. Use Control Panel and select Windows Firewall
2. Click the Exceptions tab
3. Either click Add Program… and add svnserve.exe
4. Or Add Port… and add 3690
5. Use Control Panel, select Administrative Tools and then Services
6. Scroll down to Subversion Server and the Start this service
Creating a Repository
There are many structures for version control repositories and some suggestions are given the subversion documentation. The two main variations are;
1. A single repository containing a folder for each project, and optionally further subdivided into folders
2. A repository for each project, further subdivided into folders
Whichever strategy is used, all repositories must be created under the root given in the installation process (C:\svn-repository) The easiest method to create a repository is to use Windows File Explorer and TortoiseSVN
1. Open Windows File Explorer and navigate to your subversion repository (C:\svn-repository)
2. Right click this new folder and select TortoiseSVN/Create Repository here
3. The repository should be created successfully
4. We know have to set the access rights for this. Access rights can be set for this repository or folder paths within it. Users can be assigned passwords and users can belong to groups. The options available are well described in the documentation for TortoiseSVN and subversion
5. In the folder created in 2) above, there is now a folder named conf
6. Change the line # anon-access = read to anon-access = none
7. Change the line # auth-access = write to auth-access = write
8. Change the line # password-db = passwd to password-db = passwd
9. Save the changes
10. Edit the file passwd to enter the passwords for the users who will be accessing the repository
11. Enter the name and password as pairs in the [users] section, an example is shown below:
admin = password
Phil = Chudley
Fred = Bloggs
Joe = Savvy
12. Save the changes
13. Right click the folder C:\svn_repository and select TortoiseSVN/Rep-browser
14. Select the repository svn://localhost:3690
15. You will be asked for authentication, enter one of the users (say Admin) and enter the password. Check the checkbox for the Authentication to be remembered, this caches the authentication. (Note, EA will only work with cached authentication)
16. Right click the root and add a new folder as shown below
17. The next steps are exactly the same as illustrated on theSparx Systems website.
18. Using Windows file explorer, create a new folder which will be the working folder for all check-ins/check-outs from the Enterprise Architect project. Note this folder does not have contain the EAP file (and most likely will not)
19. Right click this folder and select TortoiseSVN/Import…
20. Complete the following dialog
21. Ensure that the URL begins with svn:// and the path includes the name of the server (localhost) and the folder where you created your repository. Enter a message if you wish and click OK
22. Finally, check out the folder you just imported to the repository, this creates the necessary folders and files for the check-in/check-out process
This no completes the Subversion, TortoiseSVN installation and Enterprise Architect projects can now be configured o use the repository we have just created. In doing this you would create a version control setting which would use the folder you created at step 18) above as the local working folder and browse to where svn.exe is installed.
The folders and views can then be placed under version control by using the version control setting above.
For further information, please contact us.