Join Michael Lehman for an in-depth discussion in this video Working with GUI clients and IDE integration, part of Learning Software Version Control.
For the final part of our exploration of Subversion, we'll use the TortoiseSVN Shell integration tool. TortoiseSVN is free, and you can find the link to download the installer in the Links.rtf file in the Exercise File directory. Here we have it on our desktop, double-click on it. TortoiseSVN, as I said, is a shell extension, meaning there isn't going to be an icon that you run it from. It runs all of the time, anytime you have a Windows Explorer window open.
Remember, as I said, TortoiseSVN is free, but the developers like to have your appreciation and support. You can donate to them by clicking on the Donate button there. All right, we have it installed. In order to get the icons in the Shell integration fully operational, after you've installed the TortoiseSVN tool, you have to do a reboot. So let's go, go to the Computer, go here, and we'll see now that there is a nice icon right here on our project folder. With TortoiseSVN, we can perform almost all subversion functions right from inside the Windows Explorer using the right-click Context menu.
Note that this does slow down the display of the Context menu just a little bit, as it queries the repository behind the scenes every time you right-click. But the power you get in exchange is substantial. So let's go ahead and open up this directory, and we'll open up the trunk directory and look around. The first thing you can see is that our file f1.c has a nice check mark icon inside of a green circle. This means that TortoiseSVN has queried the repository and shows us that the status of this file is checked in and up to date. So, let's open it up and make one more change.
We're going to add ellipses to he end of the word cloud and save it. Note now that the icon on f1.c has changed to an exclamation point inside a red circle, indicating the file has uncommitted changes. To commit, we simply right-click again, come down here and select SVN Commit, and you can see that TortoiseSVN has its own built-in Commit Editor. And it doesn't use the value of SVN underbar editor the environment variable we set before, so let's add a message and then we'll save it.
It automatically runs the commit now and shows us the log at that particular spot. Once we click OK here, you notice the icon returns back to the white check mark inside of the green circle. If we explore the TortoiseSVN fly-out menu, you can see that you can perform Diffs, Show the Log, Browse the whole Repository, perform Updates, Deletes, Locks and even Branch and Merge. As our last exploration of this, however, let's select the Blame command and see it was made changes to our files.
You can see that the Blame dialog opens, and you can select a range of revision you wish to examine and get some diff options. In our case, let's just click OK and see what we get. So you can see that in this case, of course I made all of the changes here, but you can see the revision number in each line over here, and you can see the section here indicates this is the most recent set of changes. So you can see exactly what it is that's happening with the file in its current state in the repository. One last note, if you remember back to the command line section, all of the URIs I used to describe where the repository was or the form file:///c:/SVN and so forth.
Those are URIs, which means you're using a local repository. If you are using a remote repository, you would substitute either an http or https URI or even one that says SSH depending on the protocol and the location point of the remote repository that you're actually using. So, that's our tour around subversion. There is many more features but these are the essential things you need to know to use subversion day to day.
- Comparing centralized vs. distributed systems
- Saving changes and tracking history
- Using revert or rollback
- Working with the GUI tools
- Using IDE and shell integration
- Installing different systems
- Creating a repository
- Tagging code
- Branching and merging code
- Selecting a software version control system that's right for you