svn mkdir http://manoj.com/repos/sandbox/manoj -m “created sandbox directory manoj”
SVN is one of those things that you love once you know what and how it works. SVN is a version control system used by almost all major open source projects and is an absolute dream to work with. If you have ever worked with a team of developers you probably have had the experience of having your code accidentally written over or deleted.
With SVN you have version control where you can revert changes, kinda like Wikipedia. It also keeps track of which files were actually modified and gives you an option to describe to other developers what changes were made. No more unfortunate mishaps.
What is great about SVN is that the code can be checked out to any server at any time with the latest code. I use SVN to make a “sandbox” server. A server that I can play around in without worrying about deleting code or messing something up. When I am happy with my changes I can type one command and the two servers are synced with the newest changes. If for some reason it doesn’t work out I can revert back to the old way in one easy command.
Getting Setup (using the command line svn)
The Open Source Flex SDK Sandbox is currently using Subversion 1.4 (version 1.5+ is out). You should make sure you are familiar with standard SVN usage (check out that book above).
1.Install the subversion command line client
2.Create a sandbox directory in the flex/sdk/sandbox repository:
svn mkdir http://manoj.com/svn/opensource/flex/sdk/sandbox/[ your sandbox name ] -m “created sandbox directory [ your sandbox name ]”
3.Copy the flex/sdk/trunk to your sandbox (create your own branch):
svn copy http://manoj.com/svn/opensource/flex/sdk/trunk http://manoj.com/svn/opensource/flex/sdk/sandbox/[ your sandbox name ] -m “copy the trunk to my sandbox dir”
4.Checkout the sdk to your local filesystem:
svn checkout http://manoj.com/svn/opensource/flex/sdk/sandbox/[ your sandbox name ] 5.Commit changes to your sandbox at your leisure
svn commit [ path to local copy ]
6.Get up-to-date sdk/trunk changes:
svn update
Reminder: The Subversion server is still on version 1.4 therefore merge tracking is not yet implemented. Make sure you are familiar with merging best practices
Run the merge command:
svn merge http://manoj.com/svn/opensource/flex/sdk/trunk http://manoj.com/svn/opensource/flex/sdk/sandbox/[ your sandbox name ]
This command does not commit changes to your repository
(This merge command will default to the HEAD revision of the trunk. Revisions can be specified, see the Subversion 1.4 merge documentation for more information.)
7.Check the differences between your branch and the new merging changes:
svn diff
8.Build and Test to make sure everything works
This is kind of a pain because it all goes into the terminal and it’s hard to read. I like git a lot better.
9.View the status of your working copy (make sure you have a clean working copy so you can commit):
svn status [ path to your local copy ]
10.Resolve any conflicts:
-svn diff
11.Commit the changes to your sandbox:
svn commit [ path to local copy ] -m ‘Merged latest trunk changes to [ your sandbox name ]‘
12.…A few days pass and you want to merge again, check what you need to merge:
svn mergeinfo http://manoj.com/svn/opensource/flex/sdk/trunk –show-revs eligible
or to see what might happen if you merge:
svn merge http://manoj.com/svn/opensource/flex/sdk/trunk –dry-run
