<?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/"
	>

<channel>
	<title>Clay Lenhart's Blog &#187; Source Control</title>
	<atom:link href="http://clay.lenharts.net/blog/category/source-control/feed/" rel="self" type="application/rss+xml" />
	<link>http://clay.lenharts.net/blog</link>
	<description>A blog on .Net and SQL Server</description>
	<lastBuildDate>Tue, 31 Oct 2017 10:34:08 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=4.2.2</generator>
	<item>
		<title>Listing checked-out files in Team System (TFS)</title>
		<link>http://clay.lenharts.net/blog/2008/01/28/listing-checked-out-files-in-team-system-tfs/</link>
		<comments>http://clay.lenharts.net/blog/2008/01/28/listing-checked-out-files-in-team-system-tfs/#comments</comments>
		<pubDate>Mon, 28 Jan 2008 21:40:54 +0000</pubDate>
		<dc:creator><![CDATA[Clay Lenhart]]></dc:creator>
				<category><![CDATA[Source Control]]></category>

		<guid isPermaLink="false">http://clay.lenharts.net/blog/2008/01/28/listing-checked-out-files-in-team-system-tfs/</guid>
		<description><![CDATA[You can get a complete list of checked out files by using the tf.exe command line tool found in: C:\Program Files\Microsoft Visual Studio 8\Common7\IDE All checked out files in $/MyProject: tf.exe status $/MyProject /user:* /s:http://MyTfsServer:8080 /recursive All files checked out &#8230; <a href="http://clay.lenharts.net/blog/2008/01/28/listing-checked-out-files-in-team-system-tfs/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>You can get a complete list of checked out files by using the tf.exe command line tool found in: C:\Program Files\Microsoft Visual Studio 8\Common7\IDE</p>
<p>All checked out files in $/MyProject:</p>
<pre>tf.exe status $/MyProject /user:* /s:http://MyTfsServer:8080 /recursive</pre>
<p>All files checked out to Mark:</p>
<pre>tf.exe status /user:mark /s:http://MyTfsServer:8080</pre>
<p>You can write the output to a file:</p>
<pre>tf.exe status /user:* /s:http://MyTfsServer:8080 &gt; c:\checkedout.txt</pre>
]]></content:encoded>
			<wfw:commentRss>http://clay.lenharts.net/blog/2008/01/28/listing-checked-out-files-in-team-system-tfs/feed/</wfw:commentRss>
		<slash:comments>25</slash:comments>
		</item>
		<item>
		<title>Version Control &#8211; Part 4: Distributed Version Control</title>
		<link>http://clay.lenharts.net/blog/2008/01/23/version-control-part-4-distributed-version-control/</link>
		<comments>http://clay.lenharts.net/blog/2008/01/23/version-control-part-4-distributed-version-control/#comments</comments>
		<pubDate>Wed, 23 Jan 2008 15:13:46 +0000</pubDate>
		<dc:creator><![CDATA[Clay Lenhart]]></dc:creator>
				<category><![CDATA[Source Control]]></category>

		<guid isPermaLink="false">http://clay.lenharts.net/blog/2008/01/23/version-control-part-4-distributed-version-control/</guid>
		<description><![CDATA[There are many reasons to create branches in the Update/Commit model and Distributed Version Control really excels in an environment with many branches. Take the examples in the previous post: In Distributed Version Control, each of these would be “repository/working &#8230; <a href="http://clay.lenharts.net/blog/2008/01/23/version-control-part-4-distributed-version-control/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>There are many reasons to create branches in the Update/Commit model and Distributed Version Control really excels in an environment with many branches.  Take the examples in the previous post:</p>
<p><img src="http://clay.lenharts.net/blog/images/VC.trunk%20branches%20features.png" /></p>
<p>In Distributed Version Control, each of these would be “repository/working directories” (repository for short).  I put these terms together, because in distributed version control, your repository contains both the complete history and metadata and the working directory in which to edit the files.  What this means is that you can branch the code without anyone else knowing.  It also means, you *have* to branch in order to get a working directory to edit files.  This encourages developers to segregate their tasks into branches and then merge each feature back to a central repository when the work is done.<br />
On the server you might have the following repositories:</p>
<ul>
<li> Trunk</li>
<li>Released (which contains v1.0, v1.1, and v2.0 labels)</li>
</ul>
<p>On your local machine you might have the following repositories based on the Trunk repository on the server:</p>
<ul>
<li>Foo Feature</li>
<li>Bar Feature</li>
</ul>
<p>Once a feature is complete, you can push the changes to the Trunk repository and then delete your local feature’s repository.</p>
<p>This <a href="http://betterexplained.com/articles/intro-to-distributed-version-control-illustrated/">link </a>has a more detailed explanation on how distributed source control works.</p>
]]></content:encoded>
			<wfw:commentRss>http://clay.lenharts.net/blog/2008/01/23/version-control-part-4-distributed-version-control/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Version Control &#8211; Part 3: Branching/Merging</title>
		<link>http://clay.lenharts.net/blog/2008/01/11/version-control-part-3-branchingmerging/</link>
		<comments>http://clay.lenharts.net/blog/2008/01/11/version-control-part-3-branchingmerging/#comments</comments>
		<pubDate>Fri, 11 Jan 2008 21:56:50 +0000</pubDate>
		<dc:creator><![CDATA[Clay Lenhart]]></dc:creator>
				<category><![CDATA[Source Control]]></category>

		<guid isPermaLink="false">http://clay.lenharts.net/blog/2008/01/11/version-control-part-3-branchingmerging/</guid>
		<description><![CDATA[Branch and Merge Many people who implement Update/Commit typically organize the server into the Trunk and Branches folders: This allows you work on long term, scheduled features in Trunk, while making unexpected bug fixes in the latest branch: v2.0. The &#8230; <a href="http://clay.lenharts.net/blog/2008/01/11/version-control-part-3-branchingmerging/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p><strong>Branch and Merge</strong></p>
<p>Many people who implement Update/Commit typically organize the server into the Trunk and Branches folders:</p>
<p><img src="http://clay.lenharts.net/blog/images/VC.trunk%20branches.png" /></p>
<p>This allows you work on long term, scheduled features in Trunk, while making unexpected bug fixes in the latest branch: v2.0.  The changes in the v2.0 branch can easily be merged back into Trunk using the version control software.</p>
<p><img src="http://clay.lenharts.net/blog/images/VC.branch%20merge.png" /></p>
<p>After you release the code and before working on the next feature, you branch your code to the Branches\v2.0 directory.  When a bug needs to be fixed in the released version, you</p>
<ul>
<li>Fix the bug in the Branches\v2.0 directory (The blue line in the image above)</li>
<li>Commit the fix to the Branches\v2.0 directory</li>
<li>Merge (using your version control software) the change from Branches\v2.0 to the Trunk directory, which happens to have a change (green line).</li>
</ul>
<p><strong>Release Flexibility Problems</strong></p>
<p>Now you have been using update/commit version control and you have released your software and it is being used by end users.  The to-do list is growing and some features can be done quickly and some take longer.  You can easily find yourself in a situation where some of the long-term features have been committed to the Trunk; however the business has requested a quick feature that they need ASAP. For instance, a new client has changed the priority of a quick feature.</p>
<p>Another problem is that developers commit changes to the code unaware of the current release cycle.  You can find that a committed change during testing can delay the release when the committed change should have been held back for a later release.  The fundamental problem is that developers “decide” what is included in the release, when this decision belongs to other people, such as a release manager, project manager or the test manager.</p>
<p><strong>The Hack in the Update / Commit Model</strong></p>
<p>There are several ways to address the problems above using the Update/Commit model, but the hack below will lead you naturally to distributed version control.</p>
<p>If you have become comfortable with branching and merging between Trunk and Branches\v2.0, then there is an easy next step to address this problem.  Branching and merging each feature:</p>
<p><img src="http://clay.lenharts.net/blog/images/VC.trunk%20branches%20features.png" /></p>
<p>When a developer starts to work on a new feature, they branch from Trunk to Features\Bar Feature and start working in the Bar Feature folder.  When it is decided that the Bar feature is finished and ready for release, they merge the code back to Trunk using the version control software.  This allows a manager to decide to release the Bar feature even though the Foo feature is not ready.</p>
<p><strong>Conclusion</strong></p>
<p>Working on features in a branch allows people to decide late in the release cycle what will be included in the release.  It also allows flexibility when priorities change in the middle of a release cycle.</p>
<p>The downside is that there will be many Feature folders that are no longer needed because they have been merged back, or have been orphaned.  Linus calls these “expensive” branches, since they are intended to be either temporary or private.  Distributed version control addresses this…</p>
]]></content:encoded>
			<wfw:commentRss>http://clay.lenharts.net/blog/2008/01/11/version-control-part-3-branchingmerging/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Version Control &#8211; Part 2: Update/Commit</title>
		<link>http://clay.lenharts.net/blog/2008/01/08/version-control-part-2-updatecommit/</link>
		<comments>http://clay.lenharts.net/blog/2008/01/08/version-control-part-2-updatecommit/#comments</comments>
		<pubDate>Tue, 08 Jan 2008 22:33:47 +0000</pubDate>
		<dc:creator><![CDATA[Clay Lenhart]]></dc:creator>
				<category><![CDATA[Source Control]]></category>

		<guid isPermaLink="false">http://clay.lenharts.net/blog/?p=13</guid>
		<description><![CDATA[The problem with Checkin/Checkout Generally speaking, Checkin/Checkout interrupts developers. You want to finish your task, but you can&#8217;t continue on a portion of it, which then interrupts your thought process. The more developers you have with the Checkin/Checkout model, the &#8230; <a href="http://clay.lenharts.net/blog/2008/01/08/version-control-part-2-updatecommit/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p><strong>The problem with Checkin/Checkout<br />
</strong><br />
Generally speaking, Checkin/Checkout interrupts developers. You want to finish your task, but you can&#8217;t continue on a portion of it, which then interrupts your thought process.</p>
<p>The more developers you have with the Checkin/Checkout model, the more interruptions each developer has and then development as a whole slows down.</p>
<p><strong>The Answer: Update/Commit model</strong></p>
<p>The Update/Commit model addresses this by allowing developers to edit the same files at the same time. No one has to wait. No one gets their thought process interrupted.</p>
<p>The two operations you have available are Update (download new code to your machine) and Commit (Upload your changes to the server). SVN&#8217;s docs have a detailed explanation <a href="http://svnbook.red-bean.com/en/1.1/ch03s05.html">here</a>.</p>
<p>The Update/Commit work cycle is:</p>
<ul>
<li>Update (download source code from the server)</li>
<li>Edit</li>
<li>Update (download and resolve conflicts)</li>
<li>Commit (upload source code to the server)</li>
</ul>
<p><img src="http://clay.lenharts.net/blog/images/VC.update.commit.png" /></p>
<p>But, are you ready for two developers editing the same file at the same time? Most developers are wary about making this leap. After awhile you find that it isn&#8217;t an issue. Why isn&#8217;t it an issue? Surely you&#8217;ll have the same number of problems as with Checkin/Checkout?</p>
<p><strong>Resolving Conflicts</strong></p>
<p>Actually you have fewer problems with Update/Commit as compared with Checkin/Checkout. Every time two users want to edit the same file under Checkin/Checkout, it interrupts one developer which is a problem. However when two users edit the same file and commit the change to the server, there are two advantages:</p>
<ul>
<li>Resolving the conflict happens when committing the work, not when editing, which does not interrupt developers&#8217; thought processes.</li>
<li>Most conflicts can be resolved automatically by the version control software. I find that 90% of conflicts can be handled automatically.</li>
</ul>
<p>If you find that you have to manually resolve the conflict in a file, you typically have 3 versions of the file:</p>
<ul>
<li>Your changes to the file</li>
<li>Someone’s changes to the file</li>
<li>The final, resolved file.  You edit this file with the goal of including your changes and other people’s changes.</li>
</ul>
<p><strong>Conclusion</strong></p>
<p>Update/Commit is great.  You and everyone else can work without getting into each other’s way and it seems like all the issues are solved.  Why would you want distributed version control?</p>
]]></content:encoded>
			<wfw:commentRss>http://clay.lenharts.net/blog/2008/01/08/version-control-part-2-updatecommit/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>Version Control &#8211; Part 1: Checkin/Checkout</title>
		<link>http://clay.lenharts.net/blog/2008/01/07/version-control-part-1-checkincheckout/</link>
		<comments>http://clay.lenharts.net/blog/2008/01/07/version-control-part-1-checkincheckout/#comments</comments>
		<pubDate>Mon, 07 Jan 2008 19:59:41 +0000</pubDate>
		<dc:creator><![CDATA[Clay Lenhart]]></dc:creator>
				<category><![CDATA[Source Control]]></category>

		<guid isPermaLink="false">http://clay.lenharts.net/blog/?p=12</guid>
		<description><![CDATA[Linus Torvalds is big on distributed version control (http://lwn.net/Articles/246381/), and I&#8217;m starting to see the light. Distributed version control is something any organization should seriously consider, not just open source projects. This is a start of a series of blog &#8230; <a href="http://clay.lenharts.net/blog/2008/01/07/version-control-part-1-checkincheckout/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>Linus Torvalds is big on distributed version control (<a href="http://lwn.net/Articles/246381/">http://lwn.net/Articles/246381/</a>), and I&#8217;m starting to see the light. Distributed version control is something any organization should seriously consider, not just open source projects. This is a start of a series of blog entries that shows my progression of version control preferences and the advantages of each.</p>
<ul>
<li>Checkin/Checkout (Source Safe)</li>
<li>Update/Commit (CVS/SVN)</li>
<li>Branching/Merging</li>
<li>Distributed version control (git and others)</li>
</ul>
<p><strong>Checkin/checkout</strong><br />
Checkin/checkout solves the main issue: Multiple developers working on the same body of source code. Developers check out a file, and no one else can edit it. Once the developer is done, they check it in and someone else can edit it. Easy. Simple. Everyone understands how it works.</p>
<p><img src="http://clay.lenharts.net/blog/images/VC.checkout.checkout.png" /></p>
<p>A lot of Microsoft shops historically preferred this model for many reasons, but one is because Source Safe works this way. Source Safe can handle shared checkouts (which is very similar to the Update/Commit model), however anyone who has used it will tell you that shared checkouts in Source Safe will go wrong eventually. It is unfortunate that shared checkouts have scared many people away from the Update/Commit model, because the Update/Commit model has advantages over the Checkin/Checkout model when done right, for instance in <a href="http://en.wikipedia.org/wiki/Team_Foundation_Server">Team System</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://clay.lenharts.net/blog/2008/01/07/version-control-part-1-checkincheckout/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
		</item>
	</channel>
</rss>
