Yesterday, I wrote up to the point of creating the new SVN repository on my server and checking it out to a folder on my laptop. Next I need to configure the structure of the repository.
SVN repositories really can have any structure you want. Think of the whole thing as a file system where each set of changes to files / folders whether adding, deleting, or modifying them, it is a new point in time that is referred to as a revision.
Each revision can be recreated at any time, so you have complete backups of the entire timeline of “committed” changes.
A basic internal structure that is recommended for SVN as a starting point is to have 3 folders:
/trunk
/branches
/tags
The general idea is that the trunk is the main source of code, like a tree trunk.
Branches are copies of the trunk that are developed individually by other developers. You might branch to develop a certain feature, but not develop it right in the trunk so that you can make other non-related bug fixes or something to the trunk but the new feature isn’t ready yet. Once you are done with the branch, you merge the changes you made to the branch back into the trunk.
Tags are supposed to represent points in time where you release the code live to customers or some other milestone (like a feature gets integrated). Version 1.0 of the database and Version 1.1 of the database might get tagged. Usually tags are just left as historical breadcrumbs.
There are arguments for and against doing things this way, but I’m not going into them now. Right now I generally use this structure, so I’m going to add the folders to the root of my repository that I checked out to the laptop and commit them.
Now I’m going to “Commit” those changes by right clicking on the parent folder and choosing the TortoiseSVN Commit option.
Next, check the three new folders at the bottom to add them (modified files are selected by default, but we don’t have any yet), and then I will fill out a message for this revision. I’m just going to enter Initial Structure Commit.
Next I delete my working copy on my laptop because I want to check out just the trunk folder since that’s where I’ll be working on this project and it will be the basis for new branches and tags.
Ok, so now my folder AccessFormAuditor is tied to the trunk folder of my new repository.
Now I need to copy over the Access files I’m using from my desktop. This would also be the time to make sure the OASIS-SVN program has been installed on your computer. It is a plugin for Access that will allow me to export all the objects I’ve made so far to text files.
DEV2DEV – the page for downloading OASIS-SVN. I’ll go over the options I’m using for that in tomorrow’s article.
In the meantime I did a four part series on generally how and why I use SVN earlier and I will include the links for your convenience:
Access Programming – What I do and Why (source control) | Access JumpStart
Access Programming – What I do and Why (source control part 2) | Access JumpStart
Access Programming – What I do and Why (source control part 3) | Access JumpStart
Access Programming – What I do and Why (source control part 4) | Access JumpStart