Tuesday, March 3, 2009

repository working copy

3/3/09 - pretty big things today. Today I,

build a couple repositories, 3 i think using the svnadmin.....command to build that - then moving into the source directory to populate the repository. I did this a from about 3 different locations to help grok the concept of populating the repository.

Then I deleted what i had added to the repository from my hd - thats because i needed to make a working copy and synch it up to the repository. I did this on a couple directories, and saw the familiar SVN tortose visual of the green check, once the workking copy was created - synched up to the repository.

Then i got a little braver and created another repository - only this time the entire collection of files that are currently part of the project. Then i deleted all the source code from my localhost and copied it again from the repository - then entire project. Then i realized they way i had copied from the repository was creating a directory structure literally from the stucture of the repository - including the trunk. So, i then removed all the files from my working copy, essentially starting over with my working copy, not the repostory.

I was doing the synching - copy from repository from the command line, which is ok, but then i remembered i have SVN Tortoise installed and started using it to create my working copy from the repository - i started with a single directory, then removed it and tried the to do a group of directories, was not successful, but was able to choose each directory/folder, 1 at a time and get them into the source root properly, the way i needed to get my localhost up!

The only thing i was not able to do, so far, was copy individual files from the repository root to my working copy root?? I ended up just copying them from the old repository. So, currenlty the couple of files are not synched up with the repository - i can see this visually, by the green check not next to each file.

I also manipulated a couple files in my working copy and checked them visually via Tortoise and saw what i expected, the files and the folder the files contained in with a Red explanation point, indicating that the content had changed and were not in synch with the repository.

So - overall - very exciting and getting close to moving out onto a network drive and creation the permanent repository that will be sharable to other developers. I guess i acting as the admin of the repository as well as the policeman to what goes into the initial build of the repository.

Steps to SVN usage:

1 - download svn admin (if creating repository and administering)
2 - download and install client, like Tortoise (integrates with Windows explorer)
3 - decide on intital directory structure - create the folders (directories)
4 - create repository in the path created in step 3 - using svnadmin create
5 - populate the repository using svn import (go to the source folder and populate)
6 - create a working directory of the repository (svn co file....) or better yet, use Tortoise
7 - start using and away you go.