When it is time to get work done, code will need to be checked out. The main steps to checkout code that was imported as described in a previous post is as follows:
- Create a workspace folder for your project
- Change directory into that folder
- Checkout code from the trunk (or tag or even branch) into the current directory.
The following steps will checkout the sqlbuilder project that is part of the perl repo into my local filesystem's sqlbuilder folder.
Create new folder called sqlbuilder. My code is targeted to be on my local file system in a base directory of ~/work/perl/sqlbuilder
cd ~/work/perl/
mkdir sqlbuilder
cd sqlbuilder
svn checkout https://www.inhouse.stoken.net/repos/perl/sqlbuilder/trunk/ ./
Now your code is in a subversion managed folder.
Tagging Current Trunk
Tagging is a common practice in which you create a snapshot of your code as it stood in time or within a version. In this example, the sqlbuilder code needs to be tagged. The tagged version will be stored in the repo within a 20090528 folder.
svn -m 'tagging first release' copy https://www.inhouse.stoken.net/repos/perl/sqlbuilder/trunk/ https://www.inhouse.stoken.net/repos/perl/sqlbuilder/tags/20090528
Use a browser to view trunk and tag using the above URLs.
Final Thoughts
The process of checking out a tagged version is the same as for a trunk version, just ensure that the URL path is correct and it will work.
I personally tag frequently in Subversion since Subversion does it pretty efficiently. Your thoughts may vary on this.
This concludes the series on basic Subversion usage. When I have time, I will post something on Subversion + Netbeans. Netbeans handles Subversion very well but there are few small details that may help. I will post them soon.