{"id":365,"date":"2008-10-21T00:34:38","date_gmt":"2008-10-21T05:34:38","guid":{"rendered":"http:\/\/poojanwagh.opalstacked.com\/poojanblog\/2008\/10\/picture-by-picture-setting-up-mercurial-with-wikidpad\/"},"modified":"2008-11-15T08:56:55","modified_gmt":"2008-11-15T13:56:55","slug":"picture-by-picture-setting-up-mercurial-with-wikidpad","status":"publish","type":"post","link":"https:\/\/poojanblog.com\/blog\/2008\/10\/picture-by-picture-setting-up-mercurial-with-wikidpad\/","title":{"rendered":"Picture-by-Picture: Setting up Mercurial with WikidPad"},"content":{"rendered":"<p>I&rsquo;m personally using <a href=\"http:\/\/poojanblog.com\/poojanblog\/2008\/09\/wikidpad-on-multiple-computers-synced-with-git\/\" target=\"_blank\">Git to version-control my WikidPad files<\/a>. However, <a href=\"http:\/\/www.selenic.com\/mercurial\/wiki\/\" target=\"_blank\">Mercurial<\/a> (and especially <a href=\"http:\/\/tortoisehg.sourceforge.net\/\" target=\"_blank\">TortoiseHg<\/a>) is equally well suited for this function. In many respects, Mercurial is simpler to use than <a href=\"http:\/\/git.or.cz\/\" target=\"_blank\">Git<\/a>. The only shortcoming I had with Mercurial is that there&rsquo;s no managed branches; to branch, you create an independent copy of the whole repository (clone it).<\/p>\n<p>Nonetheless, for most people, Mercurial will not only suffice but give quicker rewards than Git.<\/p>\n<p>I don&rsquo;t use Subversion for this purpose, because subversion has a centralized approach which requires a repository, separate from a working copy. Importing, merging, branching, etc., with subversion is a bit of a hassle. This &ldquo;hassle&rdquo;, of course, is purely personal taste; others will (strongly) disagree. In fact, for many other purposes, I <a href=\"http:\/\/www.circuitdesign.info\/blog\/2008\/09\/pictorial-introduction-to-using-cadence-subversion\/\" target=\"_blank\">strongly prefer Subversion<\/a> to Mercurial\/Git\/etc.<\/p>\n<h2>Goal<\/h2>\n<p>By the time you&rsquo;re done with the following steps, you should be able to:<\/p>\n<ol>\n<li>Place a WikidPad Wiki under version control<\/li>\n<li>Commit changes as files change<\/li>\n<li>Revert to prior versions<!--more--><\/li>\n<\/ol>\n<h2>Set Up and First Steps<\/h2>\n<ol>\n<li>Download <a href=\"http:\/\/www.selenic.com\/mercurial\/wiki\/\" target=\"_blank\">Mercurial<\/a> with TortoiseHG (I chose TortoiseHg 0.5 w\/ Mercurial 1.02).<a href=\"http:\/\/poojanblog.com\/poojanblog\/wp-content\/uploads\/2008\/10\/image.png\"><br \/>\n<img loading=\"lazy\" decoding=\"async\" style=\"border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px\" title=\"SourceForge Mercurial\/TortoiseHg site\" src=\"http:\/\/poojanblog.com\/poojanblog\/wp-content\/uploads\/2008\/10\/image-thumb.png\" border=\"0\" alt=\"SourceForge Mercurial\/TortoiseHg site\" width=\"244\" height=\"129\" \/><\/a> <a href=\"http:\/\/poojanblog.com\/poojanblog\/wp-content\/uploads\/2008\/10\/image1.png\"><br \/>\n<img loading=\"lazy\" decoding=\"async\" style=\"border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px\" title=\"Use FireFox\" src=\"http:\/\/poojanblog.com\/poojanblog\/wp-content\/uploads\/2008\/10\/image-thumb1.png\" border=\"0\" alt=\"Use FireFox\" width=\"244\" height=\"205\" \/><\/a><\/li>\n<li>Install TortoiseHg\/Mercurial:<br \/>\n<a href=\"http:\/\/poojanblog.com\/poojanblog\/wp-content\/uploads\/2008\/10\/image2.png\"><img loading=\"lazy\" decoding=\"async\" style=\"border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px\" title=\"image\" src=\"http:\/\/poojanblog.com\/poojanblog\/wp-content\/uploads\/2008\/10\/image-thumb2.png\" border=\"0\" alt=\"image\" width=\"244\" height=\"189\" \/><\/a><br \/>\n<a href=\"http:\/\/poojanblog.com\/poojanblog\/wp-content\/uploads\/2008\/10\/image3.png\"><img loading=\"lazy\" decoding=\"async\" style=\"border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px\" title=\"image\" src=\"http:\/\/poojanblog.com\/poojanblog\/wp-content\/uploads\/2008\/10\/image-thumb3.png\" border=\"0\" alt=\"image\" width=\"244\" height=\"189\" \/><\/a><br \/>\n<a href=\"http:\/\/poojanblog.com\/poojanblog\/wp-content\/uploads\/2008\/10\/image4.png\"><img loading=\"lazy\" decoding=\"async\" style=\"border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px\" title=\"image\" src=\"http:\/\/poojanblog.com\/poojanblog\/wp-content\/uploads\/2008\/10\/image-thumb4.png\" border=\"0\" alt=\"image\" width=\"244\" height=\"189\" \/><\/a><\/li>\n<li>Restart computer (if installing TortoiseHg)<\/li>\n<li>Optional: Create a new &ldquo;Original SQLite&rdquo; format wiki using WikidPad:<br \/>\n<a href=\"http:\/\/poojanblog.com\/poojanblog\/wp-content\/uploads\/2008\/10\/image5.png\"><img loading=\"lazy\" decoding=\"async\" style=\"border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px\" title=\"image\" src=\"http:\/\/poojanblog.com\/poojanblog\/wp-content\/uploads\/2008\/10\/image-thumb5.png\" border=\"0\" alt=\"image\" width=\"244\" height=\"105\" \/><\/a><\/li>\n<li>Create a new folder for it (for example on your Desktop):<br \/>\n<img loading=\"lazy\" decoding=\"async\" style=\"border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px\" title=\"image\" src=\"http:\/\/poojanblog.com\/poojanblog\/wp-content\/uploads\/2008\/10\/image-thumb6.png\" border=\"0\" alt=\"image\" width=\"244\" height=\"237\" \/><br \/>\n<a href=\"http:\/\/poojanblog.com\/poojanblog\/wp-content\/uploads\/2008\/10\/image6.png\"><img loading=\"lazy\" decoding=\"async\" style=\"border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px\" title=\"image\" src=\"http:\/\/poojanblog.com\/poojanblog\/wp-content\/uploads\/2008\/10\/image-thumb7.png\" border=\"0\" alt=\"image\" width=\"244\" height=\"237\" \/><\/a><br \/>\nNote that the hierarchy will be:<br \/>\n<a href=\"http:\/\/poojanblog.com\/poojanblog\/wp-content\/uploads\/2008\/10\/image7.png\"><img loading=\"lazy\" decoding=\"async\" style=\"border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px\" title=\"image\" src=\"http:\/\/poojanblog.com\/poojanblog\/wp-content\/uploads\/2008\/10\/image-thumb8.png\" border=\"0\" alt=\"image\" width=\"122\" height=\"79\" \/><\/a><\/li>\n<li>Select Original SQLite format:<br \/>\n<a href=\"http:\/\/poojanblog.com\/poojanblog\/wp-content\/uploads\/2008\/10\/image8.png\"><img loading=\"lazy\" decoding=\"async\" style=\"border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px\" title=\"image\" src=\"http:\/\/poojanblog.com\/poojanblog\/wp-content\/uploads\/2008\/10\/image-thumb9.png\" border=\"0\" alt=\"image\" width=\"202\" height=\"191\" \/><\/a><\/li>\n<li>In Windows Explorer, Right-Click on the new Wiki Directory, select TortoiseHG-&gt;&ldquo;Create Repository Here&rdquo;:<br \/>\n<a href=\"http:\/\/poojanblog.com\/poojanblog\/wp-content\/uploads\/2008\/10\/image9.png\"><img loading=\"lazy\" decoding=\"async\" style=\"border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px\" title=\"image\" src=\"http:\/\/poojanblog.com\/poojanblog\/wp-content\/uploads\/2008\/10\/image-thumb10.png\" border=\"0\" alt=\"image\" width=\"244\" height=\"209\" \/><\/a><br \/>\n<a href=\"http:\/\/poojanblog.com\/poojanblog\/wp-content\/uploads\/2008\/10\/image10.png\"><img loading=\"lazy\" decoding=\"async\" style=\"border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px\" title=\"image\" src=\"http:\/\/poojanblog.com\/poojanblog\/wp-content\/uploads\/2008\/10\/image-thumb11.png\" border=\"0\" alt=\"image\" width=\"244\" height=\"101\" \/><\/a><\/li>\n<li>TortoiseHG-&gt;Add Files:<br \/>\n<a href=\"http:\/\/poojanblog.com\/poojanblog\/wp-content\/uploads\/2008\/10\/image11.png\"><img loading=\"lazy\" decoding=\"async\" style=\"border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px\" title=\"image\" src=\"http:\/\/poojanblog.com\/poojanblog\/wp-content\/uploads\/2008\/10\/image-thumb12.png\" border=\"0\" alt=\"image\" width=\"244\" height=\"188\" \/><\/a><\/li>\n<li>Select all files &amp; click &ldquo;Add&rdquo; button:<br \/>\n<a href=\"http:\/\/poojanblog.com\/poojanblog\/wp-content\/uploads\/2008\/10\/image12.png\"><img loading=\"lazy\" decoding=\"async\" style=\"border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px\" title=\"image\" src=\"http:\/\/poojanblog.com\/poojanblog\/wp-content\/uploads\/2008\/10\/image-thumb13.png\" border=\"0\" alt=\"image\" width=\"244\" height=\"219\" \/><br \/>\n<\/a><\/li>\n<li>Now, click &ldquo;HG Commit&rdquo;:<br \/>\n<a href=\"http:\/\/poojanblog.com\/poojanblog\/wp-content\/uploads\/2008\/10\/image13.png\"><img loading=\"lazy\" decoding=\"async\" style=\"border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px\" title=\"image\" src=\"http:\/\/poojanblog.com\/poojanblog\/wp-content\/uploads\/2008\/10\/image-thumb14.png\" border=\"0\" alt=\"image\" width=\"244\" height=\"238\" \/><\/a><\/li>\n<li>Type in some text (&ldquo;Initial check-in of blank wiki&rdquo;) &amp; hit Commit:<br \/>\n<a href=\"http:\/\/poojanblog.com\/poojanblog\/wp-content\/uploads\/2008\/10\/image14.png\"><img loading=\"lazy\" decoding=\"async\" style=\"border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px\" title=\"image\" src=\"http:\/\/poojanblog.com\/poojanblog\/wp-content\/uploads\/2008\/10\/image-thumb15.png\" border=\"0\" alt=\"image\" width=\"244\" height=\"207\" \/><\/a><\/p>\n<p>Since wikidpad is open, there&#8217;s a .lock file. Normally, we don&#8217;t want to check that in (it&#8217;ll cause conflicts when we try to edit our working copy later), but we&#8217;ll do so right now. I&#8217;ll show you how to get rid of it (WikidPad will automatically delete it for us) and ignore it in the future.<\/li>\n<li>Make some edits:<br \/>\n<a href=\"http:\/\/poojanblog.com\/poojanblog\/wp-content\/uploads\/2008\/10\/image16.png\"><img loading=\"lazy\" decoding=\"async\" style=\"border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px\" title=\"image\" src=\"http:\/\/poojanblog.com\/poojanblog\/wp-content\/uploads\/2008\/10\/image-thumb17.png\" border=\"0\" alt=\"image\" width=\"225\" height=\"244\" \/><\/a><\/li>\n<li>Close WikidPad<\/li>\n<li>Go back up to the parent directory (two levels up), right-click it, and select TortoiseHG-&gt;&ldquo;View File Status&rdquo;:<br \/>\n<a href=\"http:\/\/poojanblog.com\/poojanblog\/wp-content\/uploads\/2008\/10\/image17.png\"><img loading=\"lazy\" decoding=\"async\" style=\"border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px\" title=\"image\" src=\"http:\/\/poojanblog.com\/poojanblog\/wp-content\/uploads\/2008\/10\/image-thumb18.png\" border=\"0\" alt=\"image\" width=\"244\" height=\"200\" \/><\/a><\/li>\n<li>Note the changes (lock file missing) &amp; .wiki files modified:<br \/>\n<a href=\"http:\/\/poojanblog.com\/poojanblog\/wp-content\/uploads\/2008\/10\/image18.png\"><img loading=\"lazy\" decoding=\"async\" style=\"border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px\" title=\"image\" src=\"http:\/\/poojanblog.com\/poojanblog\/wp-content\/uploads\/2008\/10\/image-thumb19.png\" border=\"0\" alt=\"image\" width=\"244\" height=\"219\" \/><\/a><br \/>\nCancel.<\/li>\n<li>Go to TortoiseHG Commit:<br \/>\n<a href=\"http:\/\/poojanblog.com\/poojanblog\/wp-content\/uploads\/2008\/10\/image19.png\"><img loading=\"lazy\" decoding=\"async\" style=\"border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px\" title=\"image\" src=\"http:\/\/poojanblog.com\/poojanblog\/wp-content\/uploads\/2008\/10\/image-thumb20.png\" border=\"0\" alt=\"image\" width=\"185\" height=\"244\" \/><\/a><\/li>\n<li>Select all changes &amp; type in a commit message:<br \/>\n<a href=\"http:\/\/poojanblog.com\/poojanblog\/wp-content\/uploads\/2008\/10\/image20.png\"><img loading=\"lazy\" decoding=\"async\" style=\"border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px\" title=\"image\" src=\"http:\/\/poojanblog.com\/poojanblog\/wp-content\/uploads\/2008\/10\/image-thumb21.png\" border=\"0\" alt=\"image\" width=\"244\" height=\"207\" \/><\/a><br \/>\nHit &ldquo;commit&rdquo; button.<\/li>\n<li>Open the wiki again:<br \/>\n<a href=\"http:\/\/poojanblog.com\/poojanblog\/wp-content\/uploads\/2008\/10\/image21.png\"><img loading=\"lazy\" decoding=\"async\" style=\"border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px\" title=\"image\" src=\"http:\/\/poojanblog.com\/poojanblog\/wp-content\/uploads\/2008\/10\/image-thumb22.png\" border=\"0\" alt=\"image\" width=\"244\" height=\"163\" \/><\/a><\/li>\n<li>This time, right-click on the .lock file (or anywhere else), and select &ldquo;HG Commit&rdquo;:<br \/>\n<a href=\"http:\/\/poojanblog.com\/poojanblog\/wp-content\/uploads\/2008\/10\/image22.png\"><img loading=\"lazy\" decoding=\"async\" style=\"border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px\" title=\"image\" src=\"http:\/\/poojanblog.com\/poojanblog\/wp-content\/uploads\/2008\/10\/image-thumb23.png\" border=\"0\" alt=\"image\" width=\"244\" height=\"160\" \/><\/a><\/li>\n<li>Right click on the .lock file and select &ldquo;Add ignore&rdquo; &hellip; :<br \/>\n<a href=\"http:\/\/poojanblog.com\/poojanblog\/wp-content\/uploads\/2008\/10\/image23.png\"><img loading=\"lazy\" decoding=\"async\" style=\"border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px\" title=\"image\" src=\"http:\/\/poojanblog.com\/poojanblog\/wp-content\/uploads\/2008\/10\/image-thumb24.png\" border=\"0\" alt=\"image\" width=\"244\" height=\"211\" \/><\/a><\/li>\n<li>You&rsquo;ll notice that the &ldquo;.lock&rdquo; file disappears, but .hgignore is now modified (&ldquo;M&rdquo; code):<br \/>\n<a href=\"http:\/\/poojanblog.com\/poojanblog\/wp-content\/uploads\/2008\/10\/image24.png\"><img loading=\"lazy\" decoding=\"async\" style=\"border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px\" title=\"image\" src=\"http:\/\/poojanblog.com\/poojanblog\/wp-content\/uploads\/2008\/10\/image-thumb25.png\" border=\"0\" alt=\"image\" width=\"244\" height=\"207\" \/><\/a><\/li>\n<li>Add a similar ignore attribute for the .sli-journal file:<br \/>\n<a href=\"http:\/\/poojanblog.com\/poojanblog\/wp-content\/uploads\/2008\/10\/image25.png\"><img loading=\"lazy\" decoding=\"async\" style=\"border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px\" title=\"image\" src=\"http:\/\/poojanblog.com\/poojanblog\/wp-content\/uploads\/2008\/10\/image-thumb26.png\" border=\"0\" alt=\"image\" width=\"244\" height=\"207\" \/><\/a><\/li>\n<li>Type in a commit message and hit &ldquo;Commit&rdquo;:<br \/>\n<a href=\"http:\/\/poojanblog.com\/poojanblog\/wp-content\/uploads\/2008\/10\/image26.png\"><img loading=\"lazy\" decoding=\"async\" style=\"border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px\" title=\"image\" src=\"http:\/\/poojanblog.com\/poojanblog\/wp-content\/uploads\/2008\/10\/image-thumb27.png\" border=\"0\" alt=\"image\" width=\"244\" height=\"210\" \/><\/a><\/li>\n<\/ol>\n<p>That&rsquo;s it: as you continue to edit, you can continue to commit as you wish.<\/p>\n<h2>Reverting<\/h2>\n<p>You can revert back to a previous version by selecting &ldquo;Tortoise HG&rdquo;-&gt;&rdquo;Update to Revision&rdquo;:<br \/>\n<a href=\"http:\/\/poojanblog.com\/poojanblog\/wp-content\/uploads\/2008\/10\/image27.png\"><img loading=\"lazy\" decoding=\"async\" style=\"border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px\" title=\"image\" src=\"http:\/\/poojanblog.com\/poojanblog\/wp-content\/uploads\/2008\/10\/image-thumb28.png\" border=\"0\" alt=\"image\" width=\"244\" height=\"167\" \/><\/a><\/p>\n<p>You can then browse revisions (designated by an index number and a hash):<br \/>\n<a href=\"http:\/\/poojanblog.com\/poojanblog\/wp-content\/uploads\/2008\/10\/image28.png\"><img loading=\"lazy\" decoding=\"async\" style=\"border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px\" title=\"image\" src=\"http:\/\/poojanblog.com\/poojanblog\/wp-content\/uploads\/2008\/10\/image-thumb29.png\" border=\"0\" alt=\"image\" width=\"244\" height=\"122\" \/><\/a><br \/>\n<a href=\"http:\/\/poojanblog.com\/poojanblog\/wp-content\/uploads\/2008\/10\/image29.png\"><img loading=\"lazy\" decoding=\"async\" style=\"border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px\" title=\"image\" src=\"http:\/\/poojanblog.com\/poojanblog\/wp-content\/uploads\/2008\/10\/image-thumb30.png\" border=\"0\" alt=\"image\" width=\"244\" height=\"161\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&rsquo;m personally using Git to version-control my WikidPad files. However, Mercurial (and especially TortoiseHg) is equally well suited for this function. In many respects, Mercurial is simpler to use than Git. The only shortcoming I had with Mercurial is that there&rsquo;s no managed branches; to branch, you create an independent copy of the whole repository [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[4],"tags":[12,99,31,98,100,76,78],"class_list":["post-365","post","type-post","status-publish","format-standard","hentry","category-desktop-computing","tag-backup","tag-checkpoint","tag-git","tag-mercurial","tag-revert","tag-version-control","tag-wikidpad"],"jetpack_featured_media_url":"","jetpack_likes_enabled":true,"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/poojanblog.com\/blog\/wp-json\/wp\/v2\/posts\/365","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/poojanblog.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/poojanblog.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/poojanblog.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/poojanblog.com\/blog\/wp-json\/wp\/v2\/comments?post=365"}],"version-history":[{"count":4,"href":"https:\/\/poojanblog.com\/blog\/wp-json\/wp\/v2\/posts\/365\/revisions"}],"predecessor-version":[{"id":489,"href":"https:\/\/poojanblog.com\/blog\/wp-json\/wp\/v2\/posts\/365\/revisions\/489"}],"wp:attachment":[{"href":"https:\/\/poojanblog.com\/blog\/wp-json\/wp\/v2\/media?parent=365"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/poojanblog.com\/blog\/wp-json\/wp\/v2\/categories?post=365"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/poojanblog.com\/blog\/wp-json\/wp\/v2\/tags?post=365"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}