JavaScript appears to be disabled. We recommend you enable JavaScript while visiting this site.

(All original content on this site is licensed under the Creative Commons License Attribution-Noncommercial-No Derivative Works 3.0.)

Installing CollabNet Subversion Sever 1.6.3 and TortoiseSVN 1.6.3 on Windows Server 2003

For a business to implement version control, they typically want some kind of support, preferrably that they need to pay for, and that may or may not be used, and that may or may not be helpful.

Luckily, CollabNet offers certified binaries of Subversion, available for the low price of the time needed to register. Additionally, they offer support, training, installation, and hosted solutions, in addition to the large Subversion community. Compared to the other solutions out there, including Microsoft's, there's really no question on what your first choice should be.

In this article I'll be going over the base installation of CollabNet Subversion Server 1.6.3 and TortoiseSVN 1.6.3.16613, on Windows Server 2003 R2 Enterprise Edition, Service Pack 2, running on Sun VirtualBox. Screenshots are available by clicking on the appropriate links. (Due to the size, they are not included here, but I might do some jQuery to have them display nicely, at some point.)

Downloading installers

The first step is to download the installers for CollabNet Subversion Server and TortoiseSVN. At this time, the current versions of each are 1.6.3.

Installing CollabNet Subversion Server

CollabNet Subversion Server relies upon Apache to serve repositories, due to the various benefits (security and etcetera) that it provides. However, for this installation I'll assume that you want to keep IIS running and available.

Start the installer and read and click Next on the first and second screens. On the third screen you'll be able to choose whether you want svnserve to run as a Windows service, as well as Apache. For these, you want to keep the default of having both checked.

Assuming you've done that correctly, on the fourth screen you'll be able to choose what port Subversion should use (default is 3690) and the directory to store repositories (default is c:\svn_repository).

On the next screen you'll setup Apache. If you wish to continue running IIS on port 80, you'll need to use a different port (80 changed to 8080 in my case) and/or change the host to a name that IIS is not using. You'll also set where the repositories are being stored (from the previous screen) and what path to use when navigating via HTTP.

You can also enable viewVC, but Active Python 2.5 must be installed. By default viewVC is not enabled (and I don't go through that installation here).

Finally, you'll choose the location to install CollabNet Subversion Server on screen six, and be presented with the Finished screen once the installation is complete, which includes links to CollabNet products and services.

A restart will be required in order to start the necessary services. Once the restart is complete you can verify that you can access Apache through the browser, as well as run the svnadmin --version command to verify that Subversion is installed. See this.

Installing TortoiseSVN

The next step is to install TortoiseSVN. I've covered TortoiseSVN a number of times on this site, and installing this version isn't much different.

Accepting the defaults will get you through the install process (captures: 1, 2, 3, 4, 5, 6), and you'll need to restart once the installation is complete.

Testing repository creation and usage

At this point, you should be set to begin working with Subversion.

Create a new directory in your repository directory (default is C:\svn_repository). Then right-click on the directory and select TortoiseSVN > Create repository here.

The repository will be created, and you can verify by opening the directory as well as navigating to it via HTTP.

We can now checkout a copy by right-clicking anywhere and selecting SVN Checkout ....

Enter the URL of the repository and a checkout directory to continue. See this.

You should then be able to browse to that path and see that you have a current directory. You can then create a test file and commit your changes to verify things are working correctly.

You can make another change, verify that things commit, and then browse, via HTTP or the repository browser, to ensure that you're at the appropriate number of commits.

Next steps

And with that, you've successfully installed CollabNet Subversion Server 1.6.3 and TortoiseSVN 1.6.3. Now you just need to use Subversion during development.

CollabNet also offers free tools for Eclipse and Visual Studio, to help you integrate with your favorite IDE.

You can also play around with the security options that are available due to Apache, to make Subversion as secure as you need it.

(All original content on this site is licensed under the Creative Commons License Attribution-Noncommercial-No Derivative Works 3.0.)

Multiple network adapters in VirtualBox, for Windows guests

Having just upgraded to VirtualBox 3.0.0, I was running into an issue with being able to access a Windows Server 2003 guest from my Windows Vista host machine.

By default, when creating a Windows Server 2003 guest machine the Network settings are set such that Adapter 1 is PCnet-FAST III, attached to NAT. This allows the virtual machine to get outside, but not in.

However, it's possible to add a second adapter, attached to the host-only adapter. In this way you can access the outside world, as well as allow your host machine to access the guest via it's host-only ip (192.168.56.x, for example).

Unfortunately, there seems to be no way to set this on all future machines you create.

Windows Server 2008

The same, with a different adapter (use the default), is possible on Windows Server 2008, as well. If you're testing via ping-only (you've just set it up, for example) then you can temporarily disable the firewall for the specific adapter you setup as using the host-only adapter. Pinging the ip (from ipconfig) should then work, and provide the correct ip.

Windows 7 RC

As with Windows Server 2008, you'll need to turn off the firewall to allow pings by ip or computer name. Unfortunately, unlike Windows Server 2008, individual adapters do not seem to be listed in 7, so you'll either need to play with it, or just turn off the firewall for each network listed.

For future use ...

In the VirtualBox documentation, they have a pretty nice example of a network setup.

In this example there is a Web server and a database server. Both are setup as a host-only network. The Web server has an additional, bridged, network. This nicely cuts off the database server from the outside world.

Along these same lines, instead of using NAT for the first adapter, and having to create a second adapter, we could always just change to a bridged network. However, for my development needs, I don't see a reason to do so.

(All original content on this site is licensed under the Creative Commons License Attribution-Noncommercial-No Derivative Works 3.0.)

Muenchian Method grouping in XSLT

I owe a deal of thanks for figuring out the Muenchian Method of grouping in XSLT (1.0) to Jeni's article Grouping Using the Muenchian Method. It took, however, a while for me to get my mind around the method completely, and some experimentation, which I'm sharing below.

Specifically I was looking to get a listing of tracks, from my iTunes Playlists to Xml application's output, and group them by album.

For this, all I really need is the track's album and name, which gives a basic layout of the following.

<playlist>
	<track><name>Smile</name><album>Alright, Still</album></track>
	<track><name>Knock &apos;Em Out</name><album>Alright, Still</album></track>
	<!-- Additional tracks removed. -->
</playlist>

 Now the first thing you'll need is a key, that you'll be using to group things by. In this case, since I want to group by album, that will be my key. Immediately before any <xsl:template/> elements I added the following key.

<xsl:key name="tracks-by-album"
	match="track"
	use="album"/>

Here we're grouping the tracks, by the album value.

Now that we have a key, we can, for example, grab just those tracks that are from a certain album.

<xsl:template match="/">
	<ul>
		<xsl:for-each select="key('tracks-by-album', '1492: Conquest of Paradise')">
			<li><xsl:value-of select="name"></xsl:value-of></li>
		</xsl:for-each>
	</ul>
</xsl:template>

This will only output those tracks from the album Vangelis' 1492: Conquest of Paradise.

Stepping back, if I just wanted to grab the first track's album, I could do the following.

<xsl:template match="/">
	<ul>
		<xsl:for-each select="/playlist/track[1]">
			<li><xsl:value-of select="album"/></li>
		</xsl:for-each>
	</ul>
</xsl:template>

That suggests that this code is doing, which will go through every album, and display the first track.

<xsl:template match="/">
	<ul>
		<xsl:for-each select="/playlist/track[count(. | key('tracks-by-album', album)[1]) = 1]">
			<xsl:sort select="album"/>
			<li><xsl:value-of select="album"/>
				<ul>
					<li><xsl:value-of select="name"/></li>
				</ul>
			</li>
		</xsl:for-each>
	</ul>
</xsl:template>

And with a slight tweak, you can loop through and display all the song names from each album.

<xsl:template match="/">
	<ul>
		<xsl:for-each select="/playlist/track[count(. | key('tracks-by-album', album)[1]) = 1]">
			<xsl:sort select="album"/>
			<li>
				<xsl:value-of select="album"/>
				<ul>
					<xsl:for-each select="key('tracks-by-album', album)">
						<li><xsl:value-of select="name"/></li>
					</xsl:for-each>
				</ul>
			</li>
		</xsl:for-each>
	</ul>
</xsl:template>

And after all that discovery, I have exactly what I want; a listing of tracks, grouped by albums. With only slight modification, the grouping can be changed to artist, or any one of any other number of items.

Now if only IE 7+ supported for-each-group, available in XSLT 2.0, this wouldn't be necessary.

Tags: ,

Categories: article, tutorials/guides

About the author

Something about the author

Page List