<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	
	xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>igorbrejc.net &#187; SVN</title>
	<atom:link href="http://igorbrejc.net/category/development/svn/feed" rel="self" type="application/rss+xml" />
	<link>http://igorbrejc.net</link>
	<description>Just another developer's weblog</description>
	<lastBuildDate>Sun, 12 Feb 2012 06:47:47 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Storing Your Source Code</title>
		<link>http://igorbrejc.net/development/storing-your-source-code</link>
		<comments>http://igorbrejc.net/development/storing-your-source-code#comments</comments>
		<pubDate>Sat, 11 Sep 2010 19:11:20 +0000</pubDate>
		<dc:creator>breki</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[SVN]]></category>

		<guid isPermaLink="false">http://igorbrejc.net/?p=1266</guid>
		<description><![CDATA[photo credit: eisenrah UPDATE: I received a very helpful comment, which seems to invalidate some of my statements in the post. Be sure to read the comment. I’ll make further updates when I do some more investigating on the matter. For the past three or four years I’ve been using Subversion installed on my local [...]]]></description>
			<content:encoded><![CDATA[<p><a title="bb source" href="http://www.flickr.com/photos/89082145@N00/2244075454/" target="_blank"><img border="0" alt="bb source" src="http://farm3.static.flickr.com/2334/2244075454_e250a93b9f_m.jpg" /></a>    <br /><small><a title="Attribution-NonCommercial License" href="http://creativecommons.org/licenses/by-nc/2.0/" target="_blank"><img border="0" alt="Creative Commons License" align="absMiddle" src="http://igorbrejc.net/wp-content/plugins/photo-dropper/images/cc.png" width="16" height="16" /></a> <a href="http://www.photodropper.com/photos/" target="_blank">photo</a> credit: <a title="eisenrah" href="http://www.flickr.com/photos/89082145@N00/2244075454/" target="_blank">eisenrah</a></small></p>

<p><strong>UPDATE: </strong>I received a <a href="http://igorbrejc.net/development/storing-your-source-code/comment-page-1#comment-106042">very helpful comment</a>, which seems to invalidate some of my statements in the post. Be sure to read the comment. I’ll make further updates when I do some more investigating on the matter.</p>

<p>For the past three or four years I’ve been using Subversion installed on my local development machine. Initially I used a custom installation on Apache, which took me quite a few hours to set up (basically if you want to have more than one repository, Apache is a must). Later, after couple of years, I started using <a href="http://www.visualsvn.com/server/" target="_blank">VisualSVN Server</a>, which is a great free self-contained SVN server installation.</p>

<p>This all works great, but the biggest problem is accessing the repository from the outside world, both in terms of security and in terms of me not wanting to have my SVN repository computer running all of the time (I’m a believer in keeping machines turned off if you’re not using them).</p>

<p>On the other hand, I started using distributed VCS systems like git and Mercurial for my open-source projects. The biggest benefit I see in the fact that you keep your own repository on your development computer, so you can have the history of changes, which isn’t really an option when you’re working with SVN in an offline mode.</p>

<p>So I started thinking about experimenting with a commercial VCS hosting solution like <a href="http://www.assembla.com/" target="_blank">Assembla</a> or <a href="http://www.xp-dev.com/" target="_blank">xp-dev.com</a> for my closed-source projects. Apart from the decision on which provider to use (they both seem to get <a href="http://stackoverflow.com/questions/69384/opinion-of-hosted-svn-providers" target="_blank">good reviews</a>), the biggest question is: <strong>which VCS</strong>?</p>

<p>Although git and Mercurial are all the rage now, I don’t see much benefit in using them for a one-man projects on a VisualStudio platform. Let me explain why.</p>

<h2>Integration With VisualStudio</h2>

<p>I got so much used to AnkhSVN, that I simply cannot work without it. Renaming files, moving them around the solution, automatic refactoring using Resharper, that’s all handled pretty well by AnhkSVN. I still use TortoiseSVN for commits, but in VisualStudio, Ankh is the king. I <strong>never</strong> use SVN from the command line and I don’t need to. AnkhSVN is simply a great productivity booster.</p>

<p>And this is why using git or Mercurial is such a pain in VisualStudio. I frequently use “Rename class” refactoring in Resharper and it renames the class file, too. This gets undetected by git and Mercurial and I end up with “missing files” when committing.</p>

<h2>Local Repositories</h2>

<p>While having your own repositories on development computers is a truly great thing, not having them isn’t such an issue if your online SVN repository is available most of the time. And the problem with VS integration far outweighs other benefits of a distributed VCS when you’re running a one-man shop.</p>

<h2>Decisions, Decisions…</h2>

<p>So I’ll probably start using a commercial SVN hosting option, at least as a trial. Most of the providers offer limited free plans, so it’s a good place to start…</p>
]]></content:encoded>
			<wfw:commentRss>http://igorbrejc.net/development/storing-your-source-code/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:thumbnail url="http://farm3.static.flickr.com/2334/2244075454_e250a93b9f_m.jpg" />
		<media:content url="http://farm3.static.flickr.com/2334/2244075454_e250a93b9f_m.jpg" medium="image">
			<media:title type="html">bb source</media:title>
		</media:content>
		<media:content url="http://igorbrejc.net/wp-content/plugins/photo-dropper/images/cc.png" medium="image">
			<media:title type="html">Creative Commons License</media:title>
		</media:content>
	</item>
		<item>
		<title>Too Much Version Control?</title>
		<link>http://igorbrejc.net/development/too-much-version-control</link>
		<comments>http://igorbrejc.net/development/too-much-version-control#comments</comments>
		<pubDate>Wed, 21 Jul 2010 08:03:02 +0000</pubDate>
		<dc:creator>breki</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[SVN]]></category>

		<guid isPermaLink="false">http://igorbrejc.net/development/too-much-version-control</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<p><a title="Too much version control?" href="http://www.flickr.com/photos/28786233@N03/4814879806/"><img border="0" alt="Too much version control?" src="http://farm5.static.flickr.com/4096/4814879806_97ecefdb26_b.jpg" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://igorbrejc.net/development/too-much-version-control/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:thumbnail url="http://farm5.static.flickr.com/4096/4814879806_97ecefdb26_b.jpg" />
		<media:content url="http://farm5.static.flickr.com/4096/4814879806_97ecefdb26_b.jpg" medium="image">
			<media:title type="html">Too much version control?</media:title>
		</media:content>
	</item>
		<item>
		<title>Tracking activity on your project in Subversion</title>
		<link>http://igorbrejc.net/development/continuous-integration/tracking-activity-on-your-project-in-subversion</link>
		<comments>http://igorbrejc.net/development/continuous-integration/tracking-activity-on-your-project-in-subversion#comments</comments>
		<pubDate>Thu, 07 Feb 2008 14:37:52 +0000</pubDate>
		<dc:creator>breki</dc:creator>
				<category><![CDATA[continuous integration]]></category>
		<category><![CDATA[SVN]]></category>

		<guid isPermaLink="false">http://igorbrejc.net/development/continuous-integration/tracking-activity-on-your-project-in-subversion</guid>
		<description><![CDATA[A few months ago I was looking for some way of tracking activity on our new software project. What I wanted is a free and simple tool which could analyze Subversion logs and generate some statistics and graphs on lines of code, commits and similar stuff. So I did a search on Google, SourceForge and [...]]]></description>
			<content:encoded><![CDATA[<p>A few months ago I was looking for some way of tracking activity on our new software project. What I wanted is a free and simple tool which could analyze Subversion logs and generate some statistics and graphs on lines of code, commits and similar stuff.</p>

<p>So I did a search on Google, SourceForge and some other search engines and I found two tools: <a href="http://www.statsvn.org/">StatSVN</a> and (oddly enough) <a href="http://sourceforge.net/projects/svnstat">SvnStat</a>. The latter generates a single HTML page with a collection of statistics graphs on daily commits (here is a <a href="http://svnstat.sourceforge.net/">sample report</a>), while the former is more sophisticated and does analysis on lines of code, file and directory sizes, commit activity analyzed per hours of day and days of week and other things (see <a href="http://www.statsvn.org/statsvn/developers.html">sample report</a>). It even shows a repository heatmap &#8211; a clickable hierarchical map of your SVN repository with indicated increases or decreases of lines of code per directory or file.</p>

<p>The biggest difference between them is that StatSVN not only analyzes the SVN log file, but also goes through the latest version of your SVN repository. That&#8217;s how it calculates the lines of code in your project, for example.</p>

<p>I decided to use both of them, since they complement each other (SvnStat generates some graphs which the other one does not). I created a batch script and set it to run as a scheduled task on our build server. Here is a generalized version of the script, you have to fill in your specifics (see below):</p>

<div class="dean_ch" style="white-space: wrap;"><br />
PATH %PATH%;C:\Program Files\Subversion\bin<br />
svn update &lt;1&gt;<br />
svn log &lt;1&gt; -v &#8211;xml &#8211;non-interactive &gt;&lt;2&gt;<br />
cd D:\Programs\Development\SvnStat-1.0<br />
java -classpath SvnStat-all.jar de.agentlab.svnstat.SvnStat -jar SvnStat-all.jar -r &lt;2&gt; -d &lt;3&gt;<br />
cd D:\Programs\Development\statsvn-0.3.1<br />
java -jar statsvn.jar -exclude &lt;4&gt; -output-dir &lt;4&gt; -cache-dir cache &lt;2&gt; &lt;1&gt;</div>

<p>&lt;1&gt; = a file path to your checked out repository</p>

<p>&lt;2&gt; = a place where you want to put the SVN XML log file (the whole file path including the name)</p>

<p>&lt;3&gt; = a place where the first (SvnStat) report will be generated</p>

<p>&lt;4&gt; = a place where the second (StateSVN) report will be generated</p>

<p>One warning: the reports also analyze activity for each SVN user, so watch out if you have members in your team that feel that this is a little too Big Brother-ish.</p>
]]></content:encoded>
			<wfw:commentRss>http://igorbrejc.net/development/continuous-integration/tracking-activity-on-your-project-in-subversion/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
	</item>
		<item>
		<title>C# Source Code Search Engines For Internal Use</title>
		<link>http://igorbrejc.net/development/c/c-source-code-search-engines-for-internal-use</link>
		<comments>http://igorbrejc.net/development/c/c-source-code-search-engines-for-internal-use#comments</comments>
		<pubDate>Tue, 29 Jan 2008 19:20:48 +0000</pubDate>
		<dc:creator>breki</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[documentation]]></category>
		<category><![CDATA[SVN]]></category>

		<guid isPermaLink="false">http://igorbrejc.net/development/c/c-source-code-search-engines-for-internal-use</guid>
		<description><![CDATA[I work on a lot of different projects, both in the company I work for and in my spare time. A lot of code has been produced during that time and I constantly find myself searching for that &#8220;I remember I once wrote something like this&#8221; code. Google helps, but its search engine is not [...]]]></description>
			<content:encoded><![CDATA[<p>I work on a lot of different projects, both in the company I work for and in my spare time. A lot of code has been produced during that time and I constantly find myself searching for that &#8220;<em>I remember I once wrote something like this</em>&#8221; code. Google helps, but its search engine is not specialized for C# code and I sometimes have to do a lot of searching before finding a snippet that is perfect for my needs. Snippets in VisualStudio are helpful too, but I use them mostly for really repetitive code which merits taking time to write the snippet.</p>

<p>So I started to look for a search engine that would be able to go through my C# source code (and possibly source code repositories like SVN) and offer more developer-oriented search capabilities (like, for example, searching for all classes that implement a certain interface).</p>

<h4>Desktop Search</h4>

<p>The first thing popping up in my mind was using general desktop search engines (like Google Desktop or similar). In fact I used this approach few years ago when I played around with desktop search engines on my laptop. The problem with general search engines is the fact that they are too general: when you search for code using general search, all kinds of unrelated results pop up. And besides, installing Google Desktop just to search for my source code is a bit of an overkill for me.</p>

<h4>Specialized Search Engines</h4>

<p>My first stop was <a href="http://www.koders.com/corp/products/pro/">Koders Pro</a>. This is a professional solution provided by Koders, an Internet source code search engine which indexes open source projects. I tried Koders Pro beta version just before it went to market and I liked it. It offers most of the features I was looking for. I liked the fact that it knows how to connect to various code versioning systems like SVN. What I didn&#8217;t like is the fact that you have to sign up online on Koders website in order to access your company&#8217;s internal search site. I like to have those things separated: what I do on my (or my company&#8217;s) private network is my own business, thank you (<a href="http://bugsquash.blogspot.com/2007/09/code-search-engines-mini-review.html">looks like someone else agrees with me</a>).</p>

<h4>Open Source Solutions</h4>

<p>But since I wanted to have the search capability available not only on projects I work on professionally, but also for my own personal stuff, I was looking for a free (or not too expensive) preferably open source solution. So I started investigating (more or less googling).</p>

<p>I found a very interesting article called <span id="intelliTxt"><a href="http://www.onjava.com/pub/a/onjava/2006/01/18/using-lucene-to-search-java-source.html?page=1">Using Lucene to Search Java Source Code</a>. As the name says, it describes how to implement a search engine for Java source code using <a href="http://lucene.apache.org/">Lucene</a>, an open source search engine library. The article describes the approach in quite a detail, I won&#8217;t go into it since this is not the purpose of this post. But anyway, it was a good point from which to start searching in a more focused way. I also found a related article, </span><span id="intelliTxt"><a href="http://cs343-spr0607.stanford.edu/index.php/Projects:Source_Code_Search_with_Syntax-Based_Heuristics">Source Code Search with Syntax-Based Heuristics</a>, which builds upon the first article&#8217;s idea, but is more ambitious.</span></p>

<h4><span id="intelliTxt"></span></h4>

<p><span id="intelliTxt"></span></p>

<h4>CS2 Project</h4>

<p>Finally, I stumbled upon <a href="http://code.google.com/p/cs2project/">CS2 Project</a>. This is an open source academic project created by <a href="http://dotnetslackers.com/community/blogs/simoneb/default.aspx">Simone Busoli</a>. It too uses Lucene (<a href="http://incubator.apache.org/lucene.net/">Lucene.Net</a> actually) as a search engine. What I like about CS2 is its extreme simplicity. You just download the zipped binaries package, extract it somewhere on your disk, create an IIS web application for it and that&#8217;s it! No MSI installations, no extra Windows services.</p>

<p>When you browse to the CS2 application page, you get two text boxes: the first one is used for entering search keywords, the second one for registering paths on your disk which contain source code and should be indexed.</p>

<p>CS2 even offers some basic query parameters, like searching for method names, comments etc. It also supports search wildcards.</p>

<p>Okey, it&#8217;s not feature rich as Koders, but on the other hand the basic functionality it offers is a step in the right direction.</p>

<h4>OpenGrok</h4>

<p>While I was writing this post I ran into <a href="http://www.opensolaris.org/os/project/opengrok/">OpenGrok</a>, an open source search engine written in Java. It supports multiple languages search, but I couldn&#8217;t find any information on whether it supports indexing of C# sources.</p>

<p>I will post about any new findings in the future.</p>
]]></content:encoded>
			<wfw:commentRss>http://igorbrejc.net/development/c/c-source-code-search-engines-for-internal-use/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
	
	</item>
	</channel>
</rss>

