RULES
Rule #1: Check in only completed functioning code that you believe works. Bugs may be found later, but don’t check in anything that you know is incomplete or broken.
Rule #2: Check in as often as possible without breaking rule #1.
Rule #3: Always perform an update before a check-in.
Rule #4: Reference the svn red book often. http://svnbook.red-bean.com/
Rule #5: Do not mess around with the .svn directories in the check-out unless you’re an expert with subversion.
CRASH COURSE:
Subversion (svn) is a source code repository like microsoft sourcesafe, cvs, or borland starteam. The main repository we use is called simply ‘main’. Beneath main, everything is organized into projects. There is a project for the main website itself, called ‘webroot’. Each project is organized into branches (created at release), and “trunk” where development occurs.
There are a few main functions to svn that you need to be familiar with.
- Checkout – This is how you get a copy of the project.
- Diff – Use this before commit to make sure you are only checking in things you intend to check in.
- Commit – This sends your changes to the server, this is how you check in.
- Status – This will list which files are changed or new.
- Add – Use this to add new files you create to the repository. Must be followed by a commit.
- Update – This brings down any changed files. It will attempt to merge, and warn on failure, if a file on the server has been changed since the last time you ran an update, and your local copy is modified.
Again, read the red book.
WORK CYCLE:
- Checkout the project.
- Modify files and test modifications.
- Update.
- Any new files or directories need to be ADDed.
- Update.
- Repeat 2-4 until your changes are ready to be sent up.
- Commit.