IRCan Initiative Management
How do I use IRCan's SVN Respository on a Windows Operating System?¶
This section explains the process of configuring, developing and packaging a sub-project for a project. These instructions are suitable any developer wanting to contribute code from a Windows Environment and using the Tortoise SVN Subversion Client. TortoiseSVN is not the only one but it is the most popular. Here's a list of clients available: http://en.wikipedia.org/wiki/Comparison_of_Subversion_clients AnkSVN or Visual SVN are options if you have Visual Studio. There's also a SVN for Dreamweaver if you use that software.
The process is probably very similar to set-up with the other client-side applications mentioned above. To begin, you must have an account on IRCan, and you must have the Manager role on a project hosted on IRCan.
1. Configuring the sub-project
1.1 Creating the local workspace- First, create a folder where to store a local copy of the sub-project and where to do the development
- From the contextual menu of the folder created in step 1, select SVN Checkout…
- For the URL of repository field enter the following URL: http://svn.ircan.gc.ca/svn/ followed by your sub-project ID. The sub-project id can be found by getting to you sub-projects overview page and selecting the text between the last slash (/) and the question mark (?). In the case of the HTML5 Core Markup Structure project the project ID would be gcwwwmark-bali. The URL for that project repository would be : http://svn.ircan.gc.ca/svn/gcwwwmark-bali
- In the folder created in the previous step, create the two following folders
- Trunk – This folder will contain the most recent version of the code (separate folders will be created for each versions through branching while the development continues on the trunk)
- Package – The code will be exported to this location to package it for release
1.2 Setting up the core framework
- The core framework is placed in the trunk (the development area) to allow developers to test their project but excluded from source control so that it is not duplicated in the package.
- From a Download Page download the HTML5 Core Markup Structure, CSS Presentation Layer and the jQuery Integration sub-projects
- Extract each package to the trunk folder.
- From the root folder, select the package folder then select from the contextual menu TortoiseSVN > Add to ignore list > package
- Select the trunk folder then select from the contextual menu TortoiseSVN > Add…
- From the dialog window, select only the folders and then select the Add button
- Select all the html files from the trunk folder then Ignore x items by name
- From the contextual menu of the css folder at the root for the trunk, select TortoiseSVN > Add to ignore list > css
- From the lib folder in trunk/js/ select all files then select from the contextual menu TortoiseSVN > Add to ignore list > Ignore x items by name
- From the js/plugin folder repeat the steps from the preceding step.
- From the js/support folder, select all sub-folders then select from the contextual menu TortoiseSVN > Add to ignore list > Ignore x items by name
- From the js folder, select the pe-ap.js file then select from the contextual menu TortoiseSVN > Add to ignore list > pe-ap.js
- From the theme-base folder select the css sub-folder and select from the contextual menu TortoiseSVN > Add to ignore list > Ignore x items by name
- From the theme-clf2-nsi2 and theme-general (non-clf-nsi) select all files and sub-folders and select from the contextual menu TortoiseSVN > Add to ignore list > Ignore x items by name
Important: It is very important to follow the previous step carefully because incorrect exclusion (for example excluding by file type) will make it difficult to add new files to repository.
*2. Packaging the sub-project
To structure created previously makes sure sub-projects are easy to install and don’t contain any duplication of code from other projects. The Tortoise SVN client can be used to extract specifically the files belonging to the project to another location where it can be packaged.
- Select the trunk folder (or a version folder you want to package) then from the contextual menu select Tortoise SVN > Export…
- Make sure that the Export unversioned files checkbox is unselected (so that it only exports your projects files)
- Select the package folder and press OK
- Go to the trunk (or the selected version folder) inside the package folder, select all the files and sub-folders and from the contextual menu, select the compression menu from you’re compression software that allows to select a name for the archive
- If your compression software allows for more formats than ZIP, make sure to select the ZIP format
- Name your archive according to the following specification
- a. Prefix: projectidentifier-boew-
- b. Project ID all in lowercase (See section 1.1, Step 4 for more information about the project ID)
- c. Version: -vX.X
- If package is an alpha or beta release, include a for alpha and b for beta followed by the number of the release.
- d. Extension: .zip
Example :
The package for the 3rd beta release for version 1.1 of the Core markup structure project would have the following name:
projectidentifier-boew- gcwwwmark-bali-v1.1b3.zip
Important: Respecting this naming structure is essential for the deployment script to successfully export your project to the alpha and beta servers.