230 likes | 369 Views
Using google-svn for MtM Docs Development. Denis Thibault Version 3.2 Mar 12 th , 2009. 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
E N D
Using google-svn for MtM Docs Development Denis Thibault Version 3.2 Mar 12th , 2009
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)
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 • http://code.google.com/p/mtmlte • 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 = http://downloads.sourceforge.net/tortoisesvn/
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
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.
The SVN KC Designer Work Flow • Create a snapshot of the repository with SVN checkout • Do • Update your snapshot • Edit or add files as required with an editor • Verify your work • Commit the changes to SVN • Looking at version graphs • Repeat until done
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: • https://mtmlte.googlecode.com/svn/trunk
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.
Step 1 - Creating a SVN Sandbox • 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) • If you have installed TortoiseSVN you will see this menu appear. • Select the “SVN Checkout…” menu item
Step 1 - Creating a SVN Sandbox - continued • The following dialogue window should appear. • Enter: https://mtmlte.googlecode.com/svn/trunk as the URL of repository. This is where all our KC files are stored. • Ensure that the Checkout directory is the one you want. It defaults to the name of the repository. • Leave all other options and text boxes as is. (default) • Click OK • 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 !
Step 2 – Updating Your Snapshot • Since SVN work is done in a private sandbox, you need to update your sandbox from time to time. • From you window’s explorer, right click on the folder, you should see a menu explorer menu item named SVN Update, select this item. • A new dialogue window will open, showing the progress of the update.
Step 3 – Editing Your Document • 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. • Once at this level, you can edit any files..
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.
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.
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
Step 5 – Submitting a Change • 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. • From the Window’s explorer, right click on the folder or file. Select the SVN Commit… menu item.
Step 5 – Submitting a Change - continued • A new dialogue window will appear. • Verify that all the files that you updated show up in the “changes made” window. • Type in an explanation of the changes in the text box under the “Recent messages” button. • Click OK to submit the changes to the repository.
Step 5 – Submitting a Change - continued • SVN will send the changes to the repository. • When completed, it will generate one last line… in the dialogue box. Completed at revision: X
Step 6 - Viewing the Revision Tree of a File • If you want to see the equivalent of a version tree… • Right-click on the file or folder, • 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 !!!
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
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.
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.
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