Sunday, July 29, 2007

Virtual Subversion Appliance, and Ingore Filter for C#

My working with Virtual Subversion appliance has been a breeze. I had problem with network: every time I carried my laptop between two wired and two wireless networks, it used to loss svn server. It was elegantly resolution is to switch VM network adapter settings from Bridged to Host. Now I love it: Fire VMWare Workstation (5 sec), Resume VM (1 sec) yeah, does wake up quickly! Commit changes - I am getting to like Tortoise! Suspend VM, exit VMWare. Done, and the whole svn is gone as if was never present on my computer. In fact it wasn't :-)

To the second point. Working with C# project, I got to filter out the noise when committing changes. Here is my C# ignore list:


bin
obj
*.bin
*.dll
*.exe
*.pdb
*.resources
*.suo
*.cache
*.Cache
*.force

Tip: Files work fine if separated by a blankspace. However directories should be delimited with new lines. If you use TortoiseSVN, make sure to use a new line. Click on the image to see closely.

Labels: , ,

AddThis Social Bookmark Button

Sunday, July 08, 2007

Virtual Subversion for Small Software Project?

Virtual appliance idea is lovely.

You are a .NET developer, starting a small software project. It comes along, and you feel it is time for source control. You want to use Subversion because friends say it is cool and fancy. But installing and configuring subversion is a mess and a pain. You are reluctant, if you never did it. And intimidated, if you have already tried.

The answer is Virtual Appliances. Look how lovely:

I download a virtual appliance with subversion installed and preconfigured. Power up a Virtual machine; with couple of touches my subversion server is up and running. No mess on my laptop. No dusty ubuntu box in the corner. No installing Apache, no configuring subversion. All is prepared and packaged professionally. I bring up the VM when you need it, and where you need it. In the morning, check out, in the evening, check in. The rest of the day it can sleep as a file on my pocket USB hard drive. As the team grows we will run it 24/7 on the network server. Sounds ideal for a small mobile team.

Reality check.

Googling "subversion virtual appliance" brings up JumpBox and Young Technologies. I go for Young[*]. Download VM: 15 min at 180Kb/s. Unzip it: 3 minutes. Fire up VMWare Workstation (VMWare Player or VMWare Server would do just fine). Open VM, boot it up. From my host machine, go http://srvsvc. Hey it works!

As the Youge Tech VM has ssh daemon on, I switched to using Putty. It is convenient: doesn't lock the mouse cursor as VM console, and works faster.

Following the instructions, I created repository, and exposed it with WebSVN.

Figuring out the versions of installed software took another half hour. Yeah, I am slow on Unix. Subversion 1.3.1, Apache 2.0.55. Why should one care about Apache? I don't quite like TortoiseSVN with all that integration to Windows Explorer. And subversion windows clients are different binaries for Apache 2.0 and 2.2. While installing CollabNET my laptop crashed badly. Finally I settled with TortoiseSVN.

Bridged network is a bit funky when I switch from wire to wires and back. No more walking to the balcony and to the office and back.

Another glimpse: I can connect to Samba \\svnsrv\Public share from remote Win200, but can't do it from the host WinXP machine.

The rest of the day was headache with setting up authorization for subversion repositories. I kept on getting "Authorization failed". Before I forgot, here is how it should look to work. Go to /var/svnroot/myrepo/conf . There are three files there. Edit passwd and svnserve.conf. Don't touch authz unless you know what you're doing.

sudo vi passwd

[users]
dmitri=I_Blog_My_Password

sudo vi svnserve.conf

[general]
anon-access = none
anon-access = write
password-db=passwd
#For simplicity, forget about it
#authz-db = authz

realm = MyRep


You say "man it is subversion trivia, it is all in the book, you have to know it to use Subversion". Yes, but it defeats the whole point. A virtual appliance should be appliance! Preferably made in Japan, so that I just power it up and get back to playing with my project.

The biggest disappointment came at the end: I can't run the VM from USB Hard drive! Urrrr! And why? Cause the damn virtual hard drive was configured to be a single file! Wrong: should have been 2GB chunks. Worst part, it can't be changed.

Virtual appliance idea is lovely. Young Tech Subversion implementation is close, but not close enough. Should I have gone for JumpBox?


Results: summer Sunday spent, subversion running, play project checked in, blog post done.

[*]>Why Young Technologies? No particular reason except JumpBox VM also has Track on board, which I didn't care or want at the moment.

See also:
Virtual Subversion Appliance, and Ingore Filter for C#
Further Development of Virtual Subversion applience at "Dmitri on Virtualization"

Labels:

AddThis Social Bookmark Button