<?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: circular firing squad captain</title>
    <description>The latest articles on DEV Community by circular firing squad captain (@nthmost).</description>
    <link>https://dev.to/nthmost</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%2F205362%2F1d7bc1f2-9491-46d6-93c2-65d4617eb637.jpg</url>
      <title>DEV Community: circular firing squad captain</title>
      <link>https://dev.to/nthmost</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/nthmost"/>
    <language>en</language>
    <item>
      <title>Let My People Go: the Hg to Git evacuation process.</title>
      <dc:creator>circular firing squad captain</dc:creator>
      <pubDate>Fri, 13 Sep 2019 04:53:31 +0000</pubDate>
      <link>https://dev.to/nthmost/let-my-people-go-the-hg-to-git-evacuation-process-519o</link>
      <guid>https://dev.to/nthmost/let-my-people-go-the-hg-to-git-evacuation-process-519o</guid>
      <description>&lt;p&gt;When bitbucket recently announced the &lt;a href="https://hub.packtpub.com/bitbucket-to-no-longer-support-mercurial-users-must-migrate-to-git-by-may-2020/"&gt;impending doom of mercurial support come May 2020&lt;/a&gt;, I knew my time had come.  My &lt;a href="https://pypi.org/project/sensate"&gt;various&lt;/a&gt; &lt;a href="https://pypi.org/project/illuminate"&gt;projects&lt;/a&gt; and &lt;a href="https://pypi.org/project/metapub"&gt;Open&lt;/a&gt; &lt;a href="https://pypi.org/project/metavariant"&gt;Source&lt;/a&gt; &lt;a href="https://pypi.org/project/lubdub"&gt;contributions&lt;/a&gt; could abide bitbucket no more.&lt;/p&gt;

&lt;p&gt;It was time -- &lt;em&gt;cringe&lt;/em&gt; -- to figure out how to export my mercurial repositories to git.&lt;/p&gt;

&lt;p&gt;(TL;DR — fast-export worked for me, but with a catch.  See below.)&lt;/p&gt;

&lt;p&gt;I’ve been observing for some time how bitbucket.org cannot quite measure up to the potential of github.com when it comes to promoting the building of Open Source Software.  It seems I've just been waiting for that proverbial kick in the pants to get off my adverbial butt and lead &lt;a href="https://bitbucket.org/nthmost/"&gt;my ragtag bunch of repos&lt;/a&gt; out of the feature-desert of bitbucket and into the Open Source promised land of github.  &lt;/p&gt;

&lt;p&gt;(Now, I &lt;em&gt;too&lt;/em&gt; shall have all manner of pieces of CI/CD flair on my READMEs!)&lt;/p&gt;

&lt;p&gt;My procrastination all centered around transitioning from mercurial (hg) to git.  I have no shortage of experience in git, here in 2019 where we are long past the ambiguity of whether mercurial or git would become the source control worship of choice.  &lt;/p&gt;

&lt;p&gt;However, dark ominous clouds swirled around shuttling my repository histories from one system to the next.&lt;/p&gt;

&lt;p&gt;For when I went looking for utilities to help with this process, I found but two:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;&lt;a href="https://github.com/frej/fast-export"&gt;fast-export&lt;/a&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://hg-git.github.io/"&gt;hg-git&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Very quickly did I audition both, and out of the box both were failures.&lt;br&gt;
 Argh!  Why, O great and powerful Open Source, do you torment me so?&lt;/p&gt;

&lt;p&gt;As ultimately I did not get hg-git working, this article will simply detail the steps I took to get &lt;strong&gt;fast-export&lt;/strong&gt; to perform the correct rituals, along with the main problem I encountered and how I solved it.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://dzone.com/articles/convert-a-mercurial-repository-to-git-using-hg-fas"&gt;https://dzone.com/articles/convert-a-mercurial-repository-to-git-using-hg-fas&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The Logical Steps
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;or, what we’re trying to accomplish:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Create a new empty git repo to serve as the target container for your export.&lt;/li&gt;
&lt;li&gt;Locally, set up your mercurial repo as a git repo.  Set settings to make sure git ignores hg effluvia.&lt;/li&gt;
&lt;li&gt;Configure the repo to take the newly-created git repo from step 1 as its remote.&lt;/li&gt;
&lt;li&gt;Perform the export of HG history using fast-export.&lt;/li&gt;
&lt;li&gt;git commit &amp;amp;&amp;amp; git push —set-upstream origin master&lt;/li&gt;
&lt;li&gt;Check new repo on github to make sure everything’s there.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The Practical Steps
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;or, what we actually have to do.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;First off, you should &lt;em&gt;go create a new empty git repo&lt;/em&gt; on whatever service you're using. Make sure you keep handy the &lt;strong&gt;remote&lt;/strong&gt; information for use later on in the process.&lt;/p&gt;

&lt;p&gt;Now I'm going to take the unusual step of starting with the problem that occurs in the middle, so that the instructions as a whole make more sense.&lt;/p&gt;

&lt;p&gt;When running the fast-export.sh script, many people encounter the following unhelpful error message:&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt; Traceback (most recent call last):
   File "/home/nthmost/fast-export-190107/hg-fast-export.py", line 7, in &amp;lt;module&amp;gt;
     from mercurial.scmutil import revsymbol
 ImportError: cannot import name revsymbol
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;This means it definitely didn’t do the export.  What should we do?&lt;/p&gt;

&lt;p&gt;Well, it turns out that several releases of the fast-export tool over the past year or more have been unreliable.  I found, by &lt;a href="https://github.com/frej/fast-export/issues/132"&gt;poking around the Issues&lt;/a&gt;, that the only reliable recent-enough release is tagged “v180317”.&lt;/p&gt;

&lt;p&gt;So what you should do is the following:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;git clone https://github.com/frej/fast-export.git&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;cd fast-export&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;git checkout tags/v180317&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Once you have this specific version of fast-export, now you can continue on with the next steps:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;cd /your/target/repo&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;git init&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;../fast-export/hg-fast-export.sh -r /your/hg/repo&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;git remote add origin https://github.com/user/repo.git&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;git commit&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;git push —set-upstream origin master&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Note that it’s entirely kosher simply to do all the git work directly within the mercurial directory you started with. If so, you can just replace &lt;code&gt;/your/hg/repo&lt;/code&gt; with a &lt;code&gt;.&lt;/code&gt; for the &lt;code&gt;fast-export&lt;/code&gt; command.&lt;/p&gt;

&lt;p&gt;If you want to keep on using mercurial with git, then you should probably get hg-git working; otherwise, I’d recommend only continuing to develop this project after you’ve cloned from the git repo afresh and wiped out all traces of your former mercurial life.  🙂&lt;/p&gt;

&lt;p&gt;That’s all!  I hope that’s perhaps saved you a few minutes of banging your head on a keyboard.  Keep the faith!&lt;/p&gt;

</description>
      <category>opensource</category>
      <category>github</category>
      <category>bitbucket</category>
      <category>mercurial</category>
    </item>
    <item>
      <title>How to Turn Onboarding Into Hazing and Gaslighting</title>
      <dc:creator>circular firing squad captain</dc:creator>
      <pubDate>Fri, 02 Aug 2019 20:23:31 +0000</pubDate>
      <link>https://dev.to/nthmost/how-to-turn-onboarding-into-hazing-and-gaslighting-1j04</link>
      <guid>https://dev.to/nthmost/how-to-turn-onboarding-into-hazing-and-gaslighting-1j04</guid>
      <description>&lt;p&gt;A guide for the discerning CTO or Engineering Director who knows the value of a 6-month employee turnover rate.&lt;/p&gt;

&lt;p&gt;Many people in the software industry believe the onboarding process for new engineers takes at least 30 days. Balderdash!  We can’t have people wasting time learning how to relate to one another or -- worse -- figuring out how their skills might make them uniquely useful.&lt;/p&gt;

&lt;p&gt;What you need are employees with a proper fear of being fired at any time, who think of themselves as interchangeable cogs in a productivity machine. To get there, you need to make sure your new recruits never learn how others in your company are motivated or what the company's big picture needs really are.  That's YOUR job!&lt;/p&gt;

&lt;p&gt;Many tyrants underestimate the value of a quick onboarding process for achieving that key level of existential dread in their employees.&lt;/p&gt;

&lt;p&gt;In this guide, you'll learn how to shorten that onboarding process to 2 weeks (or less!) and inspire a healthy respect for authority by picking up a few of these easy tips we’ve sourced from various real employers over the years.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Never change your onboarding expectations with the number of people and lines of code in your repositories.  Assume that onboarding is going to be just the same for employee 100 as it was for engineers #1, #23, and #99.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Demand they be producing important new features within 2 weeks, setting standards of productivity that haven’t been reevaluated since the company began and all of the projects were greenfield projects.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Copy your onboarding process verbatim from whatever company you were a director of before you were hired here. Make sure all the managers under you feel like idiots for not being magically already socialized to your previous company's culture, so they can efficiently pass that frustration right along to their direct reports!&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;When people can’t find the documentation you linked to a year ago due to the natural forces of entropy, send them on a days-long odyssey to track it down for themselves. Make sure you don’t account for that time when you consider how long it’s taking them to become productive.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Ignore all turbulence being experienced in your department due to personnel changes. People getting fired or changing responsibilities is no reason why things shouldn’t continue exactly as they did before. Institutional memory is a myth.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Make semi-oblique reference to their salary and/or job title as an indication of their worth as a human being vis-a-vis how long it’s taking for them to implement their first real feature. Teamwork is a zero-sum game, so go ahead and set up implicit competitions between new and existing engineers as a means of motivating people to work harder.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Send all critical feedback or do-ocratic attempts at improving the process directly to /dev/null.  We don’t have time to update onboarding when there’s real work to do.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Remember: all of your decisions have always been perfect.  When multiple people trip over the same pieces of company shrapnel, that’s a good sign that everyone is less smart than you.&lt;/p&gt;

&lt;p&gt;Your newest hires need plenty of pointless challenges and bewildering antagonism to remind them of their commitment to the company based on how bad it would look to quit now.  &lt;/p&gt;

&lt;p&gt;For months to come, they’ll be bonding over onboarding with their coworkers over the 20 minutes you allow them to walk out of the office to get lunch and bring it back to their desks.&lt;/p&gt;

&lt;p&gt;Because, hey: it’s not your fault you promised 200% more than you can reasonably deliver this quarter!&lt;/p&gt;

</description>
      <category>productivity</category>
      <category>psychology</category>
    </item>
  </channel>
</rss>
