{"id":570,"date":"2006-12-08T23:36:17","date_gmt":"2006-12-09T04:36:17","guid":{"rendered":"http:\/\/blogs.law.harvard.edu\/hoanga\/2006\/12\/08\/getting-mercurial-win32-to-use-ssh-and"},"modified":"2007-02-28T21:50:57","modified_gmt":"2007-03-01T02:50:57","slug":"getting-mercurial-win32-to-use-ssh-and-vim-right","status":"publish","type":"post","link":"https:\/\/archive.blogs.harvard.edu\/hoanga\/2006\/12\/08\/getting-mercurial-win32-to-use-ssh-and-vim-right\/","title":{"rendered":"Getting Mercurial Win32 to use SSH and vim right"},"content":{"rendered":"<p>\nI&#8217;ve been playing with <a href=\"http:\/\/www.selenic.com\/mercurial\/\">Mercurial<\/a> a bit recently as I wanted to get the hang of a <a href=\"http:\/\/en.wikipedia.org\/wiki\/Revision_control#distributed_version_control\">Distributed Source Code Management (DSCM)<\/a> tool better.  I&#8217;ll save my reasoning for choosing Mercurial for another time.  Let&#8217;s get to the troubleshooting part.\n<\/p>\n<p>\n<a href=\"http:\/\/www.selenic.com\/mercurial\/\">Mercurial<\/a> provides a <a href>Windows version<\/a> and some instructions on getting it running for basic cases however what I found I needed were:<\/p>\n<ul>\n<li>Repository syncing via SSH<\/li>\n<li>Getting vim to fire up as my default editor when I made commits<\/li>\n<\/ul>\n<p>After a little bit of head-scratching I finally figured out these are the steps you need to get those working:<\/p>\n<ol>\n<li>Install <a href=\"http:\/\/www.selenic.com\/mercurial\/wiki\/index.cgi\/WindowsInstall\">Mercurial Win32<\/a> <\/li>\n<li>Install <a href=\"http:\/\/www.cygwin.com\">cygwin<\/a> and make sure to also choose openssh from the packages you install with cygwin.  If you like some other ssh client from the command line you can use that but I couldn&#8217;t get plink to work properly but cygwin worked fine for me<\/li>\n<li>Install the Windows version of <a href=\"http:\/\/www.vim.org\">vim<\/a> and make sure that vim is added to your PATH (I believe you have to check this setting during install)<\/li>\n<li>Ensure vim works from the command line and you can use ssh from cygwin<\/li>\n<li>Configure in %MERCURIAL_HOME%\\Mercurial.ini (Default is C:\\Mercurial\\Mercurial.ini) the following:<br \/>\n<blockquote><p>\n[ui]<br \/>\neditor = vim<br \/>\nssh = C:\\cygwin\\bin\\ssh.exe\n<\/p><\/blockquote>\n<\/li>\n<\/ol>\n<p>\nDumb trivial aside: It seems you can call cygwin commands directly without the cygwin shell if you have C:\\cygwin\\bin in your path.  Although it might get confusing since cygwin also does path munging to make it feel more like UNIX\n<\/p>\n<p>Now you should be able to use hg from either cygwin or the normal Windows shell properly.  Enjoy.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;ve been playing with Mercurial a bit recently as I wanted to get the hang of a Distributed Source Code Management (DSCM) tool better. I&#8217;ll save my reasoning for choosing Mercurial for another time. Let&#8217;s get to the troubleshooting part. Mercurial provides a Windows version and some instructions on getting it running for basic cases [&hellip;]<\/p>\n","protected":false},"author":703,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1101,1211,972,260],"tags":[],"class_list":["post-570","post","type-post","status-publish","format-standard","hentry","category-geek","category-mercurial","category-programming","category-tech"],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/archive.blogs.harvard.edu\/hoanga\/wp-json\/wp\/v2\/posts\/570","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/archive.blogs.harvard.edu\/hoanga\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/archive.blogs.harvard.edu\/hoanga\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/archive.blogs.harvard.edu\/hoanga\/wp-json\/wp\/v2\/users\/703"}],"replies":[{"embeddable":true,"href":"https:\/\/archive.blogs.harvard.edu\/hoanga\/wp-json\/wp\/v2\/comments?post=570"}],"version-history":[{"count":0,"href":"https:\/\/archive.blogs.harvard.edu\/hoanga\/wp-json\/wp\/v2\/posts\/570\/revisions"}],"wp:attachment":[{"href":"https:\/\/archive.blogs.harvard.edu\/hoanga\/wp-json\/wp\/v2\/media?parent=570"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/archive.blogs.harvard.edu\/hoanga\/wp-json\/wp\/v2\/categories?post=570"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/archive.blogs.harvard.edu\/hoanga\/wp-json\/wp\/v2\/tags?post=570"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}