Using svndev

Intended Audience

This document is for Shelly, Rick and other designated SCCC web editors. Anyone else can read it, but I have no idea why they would want to.

Changes

/!\ I've renamed the 'trunk' branch 'dev'. This changes nothing except you now have to specify 'dev' where you would have specified 'trunk' before. I've changed all references in this doc to reflect this. In other words, if you haven't read this doc before, you can ignore this paragraph.

Overview

I've finished a simplified workflow automation that makes using SVN when editing files on dev much more usable. Rather than send a zillion emails back and forth, I'm starting this document as a central place for our wisdom.

Basically, dev has a virtual host called svndev. For all intents and purposes, another web server. Point your web browser at http://svndev.seattlecentral.edu, and you'll see a clone of tintin.

The cool part is, when you make changes to the correct SVN repository and branch, those changes will automatically appear on svndev, so there's no more extra steps. My next feature will be a system that allows you to choose which branch/version/tag you want to display on svndev.

There is no versioning of MySQL content at this time. I'll have to think about how to implement that.

HOWTO

The following are the steps you need to follow in order to make changes on svndev.

Mini Glossary

working copy or WC
The copy of the files you have on your computer, in your office, on your desk. Not the copy on the SVN server or the web server.
repository or repo
Where SVN stores it's data. This is not the files on your computer or the web server
check out or co
Make a working copy of the data in the repository on your local machine
check in or co
Upload any changes from your working copy to the repository
update or up
download anyone else's changes from the repository

Initial Checkout

You do this only once when you get started working on svndev. You would need to do it again if you delete your local working copy, or if you started working on a different computer.

  1. open windows explorer and go to directory where you like to keep files you work on ( e.g. My Documents ).
  2. use Tortoise SVN to check out the repository at https://www.seattlecentral.edu/svn/web/dev

  3. you will be required to log into the SVN server. You shold already know your password and username. Dylan can fix that for you if you like, or you can do it yourself. To do it yourself, use htpasswd to add your credentials to /usr/local/svn/.htpasswd on arthur.

  4. You should get a shiny new directory called 'dev'.

/!\ The SVN repo lives on Arthur. The web pages live on Svndev. Your working copy lives on your computer.

Update your Working Copy

Before you make any changes, you need to make sure your working copy has any changes made by anyone else.

You should do this a lot. If you're pedantic, you do it before you make any changes to your working copy. If you're less pedantic, you do it every now and again as you work, between major changes, but not between each little change. If you're lazy, you only do it once a day, which I don't recommend.

  1. using Tortoise SVN, do 'up' or 'update'. I think it's best to do this by right-clicking on the 'dev' folder, but I could be wrong.

Making Changes

You save your changes into your working copy first, then use SVN's check in command to upload the changes to the SVN repository and the web server.

  1. Using your editor of choice (Dreamweaver?) open the appropriate files in your working directory, edit them and save them. The copies in your working copy are now changed.
  2. Using Tortoise SVN do a "check in". Again, I think it's best to do this by right clicking the 'dev' folder and selecting 'check in'.

See your Changes

This is the cool part. Normally with SVN or another VCS, you would have to log onto dev with putty and do some SVN commands and run some build scripts. This is done automatically for you.

  1. go to http://svnweb.seattlecentral.edu and you will see your changes.

A More Concrete Example

Just to be totally complete, here's a made up example. I don't have windows or Tourtoise SVN in front of me, so I'm making this all up. Any corrections would be awesome.

  1. Go to My Documents with the windows explorer.

  2. Right click on My Documents, find the Tortoise SVN 'check out' command.

  3. It will ask you for a URL, type https://www.seattlecentral.edu/svn/web/dev

  4. It will ask you for a username and password. These are SVN specific.
  5. It will spend some time copying files to your My Documents\dev directory.

  6. You will find a dev directory inside My Documents.

  7. Go into that dev directory.

  8. Go to webroot.

  9. Open index.php with Dreamweaver.

  10. Find the bit that looks like
    <!--- Announcements -->
    
    <?php echo $news->Announcement(1) ?>
    <!-- SNOW CLOSURE MESSAGE 
  11. Write something silly, preferably in <h1> or <h2> tags. For example,

    <!--- Announcements -->
    <h1>All classes involving pudding are suspended until further notice!</h1>
    <?php echo $news->Announcement(1) ?>
    <!-- SNOW CLOSURE MESSAGE 
  12. Save your changes
  13. Using the windows explorer, right click on the dev directory

  14. Find and run the 'check in' Tortoise SVN command.
  15. Go to http://svndev.seattlecentral.edu and see your change

  16. Right click on dev again

  17. Find and run the 'update' command
  18. Open webroot\index.php with Dreamweaver again.

  19. Make another change
    <!--- Announcements -->
    <h1>All classes involving ice cream are suspended until further notice!</h1>
    <?php echo $news->Announcement(1) ?>
    <!-- SNOW CLOSURE MESSAGE 
  20. Right click on dev again

  21. Find and run the 'check in' command
  22. Go to http://svndev.seattlecentral.edu and see your new change


CategoryDocs

Using svndev (last edited 2009-05-15 22:50:24 by dmartin)