<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: nita daniel</title>
    <description>The latest articles on DEV Community by nita daniel (@ohmonster).</description>
    <link>https://dev.to/ohmonster</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F248550%2F86b269a6-412b-4895-bcea-6c969c2534d7.jpeg</url>
      <title>DEV Community: nita daniel</title>
      <link>https://dev.to/ohmonster</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ohmonster"/>
    <language>en</language>
    <item>
      <title>Yes, We Still Use TFS</title>
      <dc:creator>nita daniel</dc:creator>
      <pubDate>Thu, 13 Feb 2020 19:12:46 +0000</pubDate>
      <link>https://dev.to/ohmonster/yes-we-still-use-tfs-293i</link>
      <guid>https://dev.to/ohmonster/yes-we-still-use-tfs-293i</guid>
      <description>&lt;p&gt;My employer uses Microsofty technologies in its backbone. We have a large, entertwined codebase that loads 150+ projects at once, and yes, we still use TFS, not git.&lt;/p&gt;

&lt;p&gt;We mark some items for manual merge due to the quirks of our processes, using Visual Studio slns, and Reasons, okay, for &lt;em&gt;reasons&lt;/em&gt;.&lt;/p&gt;

&lt;h1&gt;
  
  
  The problem?
&lt;/h1&gt;

&lt;p&gt;No, the answer isn’t that we still use TFS, and not distributed version control. I mean it is an aspect, but that’s not the problem. The problem is we have years of unmerged items due to some checkins requiring careful hand merging or manual changes.&lt;/p&gt;

&lt;p&gt;Just trust me. For Reasons.&lt;/p&gt;

&lt;p&gt;TFS means VisualStudio, and merging in the Visual Studio UI means retrieving merge candidates. And that list is long.&lt;/p&gt;

&lt;p&gt;I don’t much care for lifting my hands from the keyboard, much less waiting for long lists to load OVER AND OVER, so, for the standard merge, I wrote a powershell script. Wait. No. I went further and wrote a MODULE.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--U5NU0jbt--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://ohmonster.io/files/2020/02/Merge-Code-autoComplete.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--U5NU0jbt--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://ohmonster.io/files/2020/02/Merge-Code-autoComplete.gif" alt="Demo of performing a merge with my powershell"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I could have used a library but our needs are simple.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Merge a changeset or range of changesets&lt;/li&gt;
&lt;li&gt;Make the original comment (where we have a standard of including the work item ID as well) easily accessible.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This module isn’t not perfect. It doesn’t automatically setup or detect workspaces. It doesn’t checkin the subsequent merged files. You have to open it up and update&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The path tfs.exe is suitable for your machine, are any paths to where you keep your local versions of the codebase.&lt;/li&gt;
&lt;li&gt;That you’ve defined the names of any projects and your project default&lt;/li&gt;
&lt;li&gt;The url to the collection on the server&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you want a reminder, this is what command line merging with tf.exe looks like when you have it in  your path, and no workplace shenanigans or mismatches&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="nf"&gt;cd&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;local&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;directory&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;with&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;repo&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;files&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="nf"&gt;tf&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;vc&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;merge&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;/recursive&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;$&lt;/span&gt;&lt;span class="nx"&gt;/VersionControl/Source/Path&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;$&lt;/span&gt;&lt;span class="nx"&gt;/VersionControl/Destination/Path&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;/version:C&lt;/span&gt;&lt;span class="err"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;ChangesetId&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="nx"&gt;~C&lt;/span&gt;&lt;span class="err"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;ChangesetId&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;And now I have&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="nf"&gt;Merge-Code&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;Dev&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;Test&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;12345&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Instead. Less to remember. Less to edit. Faster.&lt;/p&gt;

&lt;p&gt;Merge conflicts open in their own window, and the pending items show up in VS. The script copies the checkin comment of the first changeset in the range, and I paste that in without having to look it up.&lt;/p&gt;

&lt;p&gt;Not exciting, is it? But it vastly speeds up our workflows.&lt;/p&gt;
&lt;h2&gt;
  
  
  Get the goods
&lt;/h2&gt;


&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;



</description>
      <category>powershell</category>
      <category>tfs</category>
      <category>versioncontrol</category>
      <category>workarounds</category>
    </item>
  </channel>
</rss>
