<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Mercurial on The Lone C++ Coder's Blog</title><link>https://www.lonecpluspluscoder.com/tags/mercurial/</link><description>Recent content in Mercurial on The Lone C++ Coder's Blog</description><generator>Hugo -- gohugo.io</generator><language>en</language><lastBuildDate>Sat, 12 Mar 2022 19:47:03 -0500</lastBuildDate><atom:link href="https://www.lonecpluspluscoder.com/tags/mercurial/index.xml" rel="self" type="application/rss+xml"/><item><title>Migrating source code from RCS to Mercurial</title><link>https://www.lonecpluspluscoder.com/2022/03/12/migrating-source-from-rcs-to-mercurial/</link><pubDate>Sat, 12 Mar 2022 19:47:03 -0500</pubDate><author>Timo Geusch</author><guid>https://www.lonecpluspluscoder.com/2022/03/12/migrating-source-from-rcs-to-mercurial/</guid><description>&lt;p&gt;Version control system migrations are a fact of life for developers in any longer lived codebase. In fact, I&amp;rsquo;ve had a hand in quite a few migrations as newer, more workable version control systems became available. Also, like a lot of developers, I&amp;rsquo;ve got fragments of source code dating back quite some years floating around on various servers and development machines of mine. Not necessarily code that is still being used, but still code that I don&amp;rsquo;t want to just delete forever. Some of the oldest code I have uses &lt;a href="https://www.gnu.org/software/rcs/"&gt;RCS&lt;/a&gt; for source control and hasn&amp;rsquo;t been touched for a long, long time. As my machines generally don&amp;rsquo;t have anything as old as RCS installed for version control, I decided this might be a good time to migrate the code to my version control system of choice, &lt;a href="https://www.mercurial-scm.org/"&gt;Mercurial&lt;/a&gt;.&lt;/p&gt;</description></item><item><title>Cherry pick and merge revisions in Mercurial</title><link>https://www.lonecpluspluscoder.com/2016/12/27/cherry-pick-and-merge-revisions-in-mercurial/</link><pubDate>Tue, 27 Dec 2016 06:53:00 +0000</pubDate><author>Timo Geusch</author><guid>https://www.lonecpluspluscoder.com/2016/12/27/cherry-pick-and-merge-revisions-in-mercurial/</guid><description>&lt;p&gt;I&amp;rsquo;ve mentioned before that I prefer &lt;a href="https://www.mercurial-scm.org/"&gt;Mercurial&lt;/a&gt; to &lt;a href="https://git-scm.com/"&gt;Git&lt;/a&gt;, at least for my own work. That said, git has a nice feature that allows you to cherry pick revisions to merge between branches. That&amp;rsquo;s extremely useful if you want to move a single change between branches and not do a full branch merge. Turns out mercurial has that ability, too, but it goes by a slightly different name.&lt;/p&gt;
&lt;p&gt;There are actually two options in Mercurial - the older &lt;a href="https://www.mercurial-scm.org/wiki/TransplantExtension"&gt;transplant&lt;/a&gt; extension and from Mercurial 2.0 onwards, the built-in &lt;a href="https://www.mercurial-scm.org/repo/hg/help/graft"&gt;graft&lt;/a&gt; command. I prefer to use the graft command, mainly because it is built into base mercurial and thus is available everywhere as long as one is running Mercurial 2.0 or up. Given that the current release is 4.0.1 as of the time of writing, you should really run something newer than 2.0. Also, graft uses mercurial&amp;rsquo;s merge abilities to cherry pick the change, you have a somewhat better chance of the change applying cleanly. Transplant uses the patch mechanism with works reasonably well, but in my opinion the merge system works better especially if you&amp;rsquo;re dealing with something that turns into a three way merge.&lt;/p&gt;</description></item><item><title>Using tortoisehg and mercurial on Windows with openssh</title><link>https://www.lonecpluspluscoder.com/2014/11/13/tortoisehg-use-openssh-instead-plink/</link><pubDate>Thu, 13 Nov 2014 11:02:29 +0000</pubDate><author>Timo Geusch</author><guid>https://www.lonecpluspluscoder.com/2014/11/13/tortoisehg-use-openssh-instead-plink/</guid><description>&lt;p&gt;The default setup for the &lt;a href="http://mercurial.selenic.com/"&gt;Mercurial&lt;/a&gt; DVCS on Windows with &lt;a href="http://tortoisehg.bitbucket.org/"&gt;tortoisehg&lt;/a&gt; uses &lt;a href="http://the.earth.li/~sgtatham/putty/0.63/htmldoc/Chapter7.html#plink"&gt;plink&lt;/a&gt; and &lt;a href="http://the.earth.li/~sgtatham/putty/0.63/htmldoc/Chapter9.html#pageant"&gt;Pageant&lt;/a&gt; to manage SSH keys when you are using ssh as the transport protocol for mercurial. That&amp;rsquo;s most likely the right choice for a normal Windows setup, but if you already have &lt;a href="http://www.openssh.com/"&gt;openssh&lt;/a&gt; installed and configured to talk to various servers, it&amp;rsquo;s easy to switch mercurial and tortoisehg to use openssh. It&amp;rsquo;s also very helpful if you&amp;rsquo;re forgetful like me and forget to start pageant, add new keys to it etc.&lt;/p&gt;</description></item></channel></rss>