L.T.E :: Learning Through Experimenting Using google-svn for MtM Docs Development Denis Thibault Version 3.2 Mar 12 th, 2009
2 Why google-svn ? >google-svn is the public domain implementation of A common subversion (SVN) based repository A mechanism to share, re-use source files >We use google-svn for the configuration management of the various file for the MTM program. Labs (ppt) Programs (NXT-G) Videos (WMA)
3 Using google-svn for MtM Development >You will need a google account (FREE) >Server side is on Google, behind a secure web server I have already registered some of you as collaborators to the project using your google accounts >Client side runs on your PC or UNIX Use TortoiseSVN if you want an integrated solution with the Window’s file explorer You can download the MS installer file from sourceforge URL =
4 The SVN Sandbox ~ a CC snapshot View >SVN provides isolated sandboxes for all development of files or source code >These sandboxes live on a file system local to your work station or PC >These sandboxes are equivalent in concept to ClearCase local snapshot views >The sandboxes are NOT dynamically updated, the synchronization to the main repository is manually initiated >All files in a repository directory are downloaded to the sandbox
5 The SVN Checkout not a CC Checkout ! >The concept of a checkout in SVN is not the same as a ClearCase checkout >The SVN checkout is equivalent to creating and loading a ClearCase snapshot view >The checkout is downloaded from the SVN repository onto a file system locally created on the developer’s workstation >By default the checkout is based on the latest versions (revision = HEAD) >Once the checkout created/downloaded, there are no additional step to be executed in order to start work on files.
6 The SVN KC Designer Work Flow 1.Create a snapshot of the repository with SVN checkout >Do 2.Update your snapshot 3.Edit or add files as required with an editor 4.Verify your work 5.Commit the changes to SVN 6.Looking at version graphs >Repeat until done
7 LTE MtM Docs Repository Structure >You can view the repository structure via the Tortoise SVN Repository Browser. >Right click anywhere in windows to get the Tortoise main window, from the menu box select Repo-Browser. >The root of our repository is: >
8 LTE MtM Docs Repository Structure >The left pane shows the various branches (folders) that we have in the repository. >Up to now, we are only using the main branch stored in the ‘trunk’ directory. (trunk = main) >In ‘trunk’ we find our actual directories. >They are divided by topics, pretty straight forward.
9 Step 1 - Creating a SVN Sandbox 1.Right click on a location where you what the checkout to be stored. This can be a drive or a folder on a drive. (can be your desktop or any file system on your PC) 2.If you have installed TortoiseSVN you will see this menu appear. 3.Select the “SVN Checkout…” menu item
10 Step 1 - Creating a SVN Sandbox - continued 1.The following dialogue window should appear. 2.Enter: as the URL of repository. This is where all our KC files are stored. 3.Ensure that the Checkout directory is the one you want. It defaults to the name of the repository. 4.Leave all other options and text boxes as is. (default) 5.Click OK 6.You will be prompted for a user name and password. Enter your google id and google password. Only load the folders that you need ! Do not create a branch for regular work !
11 Step 2 – Updating Your Snapshot 1.Since SVN work is done in a private sandbox, you need to update your sandbox from time to time. 2.From you window’s explorer, right click on the folder, you should see a menu explorer menu item named SVN Update, select this item. 3.A new dialogue window will open, showing the progress of the update.
12 Step 3 – Editing Your Document 1.Using your window’s explorer, navigate down to the file that you want to edit. You will notice that all the files and folders have check marks on them. This means that the files are part of the repository. 2.Once at this level, you can edit any files..
13 Step 3 - Adding a File to the Repository >Create your file locally in the desired directory in your “checkout/snapshot” >The file will be marked with a question mark, meaning that it is NOT in SVN. >Once edited to contain the desired content, right click on the file, you should see the TortoiseSVN menu items. Select the Add… menu item. >This adds the file to SVN but does not commit the change to the repository.
14 Step 3 - Adding a File to the Repository - continued >A dialogue window will open, verify that the data is correct, then click the OK button. >A progress window will appear and show the redults of the addition(s). >The file icon will now show a “+” sign. >You can now commit the addition to the repository.
15 Step 4 – Verify your Doc >Have someone else proofread the page… Run spell check from your editor Have someone read over the page to ensure that the flow is good and technically correct
16 Step 5 – Submitting a Change 1.SVN provides version control of directories just like CC. So if you have added files, you will need to commit from the parent directory. The directory or file will show a red exclamation mark indicating that it has been modified. 2.From the Window’s explorer, right click on the folder or file. Select the SVN Commit… menu item.
17 Step 5 – Submitting a Change - continued 1.A new dialogue window will appear. 2.Verify that all the files that you updated show up in the “changes made” window. 3.Type in an explanation of the changes in the text box under the “Recent messages” button. 4.Click OK to submit the changes to the repository.
18 Step 5 – Submitting a Change - continued 1.SVN will send the changes to the repository. 2.When completed, it will generate one last line… in the dialogue box. Completed at revision: X
19 Step 6 - Viewing the Revision Tree of a File 1.If you want to see the equivalent of a version tree… 2.Right-click on the file or folder, 3.From the TortoiseSVN menu item, select Revision graph. >CC users, keep in mind that this is a revision tree not a version tree of the element !!!
20 Step 6 - Viewing the Revision Tree of a File - continued By default the revision graph will only show “important” versions… >Click all the “options” to see a full revision graph >If you want to see the latest version at the bottom click on this option (more like ClearCase version tree) >What’s in a revision, all files that have been modified by a commit. >A revision is similar to a ClearCase label/baseline
21 Step 6 - Viewing the Revision Tree of a File - continued What branches look like in a subversion revision tree Revision #’s are unique across the entire project repository. Specifically, this means that revision #’s are unique across all the Docs.
22 SVN Folder/File Status Icons The file has been added, but not committed. The file has been committed. The file has been removed, but not committed. The file has been changed, but no committed. The file is in the directory, but has not been added.
23 Tools of the Trade >Must Have Tortoise SVN : to access the repository (FREE) PowerPoint : to create nice diagrams (part of MS Office $$) OpenOffice (FREE) SnagIt : to capture screen captures and video clips (Shareware $ ) DRT has license Internet Explorer : to check your pages (part of Windows) > To Make Movies Audacity : to author soundtrack (FREE) MS Movie Maker : to assemble & edit videos (part of Windows) To Make Very Nice Complex Flowcharts Visio : to create really nice flowcharts (MS $$$$ ) have a license on work PC