{"id":198,"date":"2008-03-26T17:14:38","date_gmt":"2008-03-26T21:14:38","guid":{"rendered":"http:\/\/benjamin.smedbergs.us\/blog\/2008-03-26\/wandering-around-mercurial-repositories\/"},"modified":"2008-03-26T17:47:46","modified_gmt":"2008-03-26T21:47:46","slug":"wandering-around-mercurial-repositories","status":"publish","type":"post","link":"http:\/\/benjamin.smedbergs.us\/blog\/2008-03-26\/wandering-around-mercurial-repositories\/","title":{"rendered":"Wandering around Mercurial Repositories"},"content":{"rendered":"<p>One of the things that makes mercurial useful and frustrating at the same time is that history is not linear. History can separate and join at multiple places. Tools such as <tt>hg log<\/tt> can&#8217;t show the outline of history clearly. There have been several attempts to remedy this situation: <tt>hg glog<\/tt> prints a revision graph using ASCII art, and <tt>hg view<\/tt> allows browing a repository history in a GUI app written in TK.<\/p>\n<p>I think we can do better, so I started a new project: it is an extension to hgweb which allows browsing repository history graphically in a web browser. You can navigate graphically through revisions, and it will load new revisions on demand. Note that I&#8217;ve only tested it with Firefox, and it won&#8217;t work in IE (no SVG support):<\/p>\n<p><a href=\"http:\/\/office.smedbergs.us\/viewer\/index.xhtml#mozilla-central:1d969540aa4e\" style=\"font-size: 120%;\">mozilla-central on office.smedbergs.us<\/a>.<\/p>\n<p>There is certainly lots more that can and should be done:<\/p>\n<ul>\n<li>The layout algorithm is really dumb\n<li>Revisions should link back to hgweb for viewing diffs, etc\n<li>Would be nice to zoom out to get a larger picture with less detail\n<\/ul>\n<p>Unfortunately I don&#8217;t have any more time to spend on this project. So I&#8217;m looking for volunteers to come forward and finish it.<\/p>\n<h3>Installation Instructions<\/h3>\n<p>The code is <a href=\"http:\/\/hg.mozilla.org\/users\/bsmedberg_mozilla.com\/hgpoller\/\">here<\/a>. It is packaged as a single mercurial extension which must be installed in a global hgrc file, and a www\/ directory with static files. I believe this extension will work correctly against Mercurial 1.0: I&#8217;ve been testing it against a mercurial-crew pull from a couple days ago.<\/p>\n<ul>\n<li>In <tt>www\/navigate.js<\/tt> configure <var>BASEURL<\/var> for your site\n<li>In <tt>www\/index.xhtml<\/tt> populate <var>select-repo<\/var> with the repositories on your site.\n<\/ul>\n<p>The hgweb extension exists primarily to provide repository information in JSON format. I hope that it will be useful for other kinds of projects as well.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>One of the things that makes mercurial useful and frustrating at the same time is that history is not linear. History can separate and join at multiple places. Tools such as hg log can&#8217;t show the outline of history clearly. There have been several attempts to remedy this situation: hg glog prints a revision graph [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[93,41,77],"class_list":["post-198","post","type-post","status-publish","format-standard","hentry","category-mozilla","tag-hgweb","tag-mercurial","tag-svg"],"_links":{"self":[{"href":"http:\/\/benjamin.smedbergs.us\/blog\/wp-json\/wp\/v2\/posts\/198","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/benjamin.smedbergs.us\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/benjamin.smedbergs.us\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/benjamin.smedbergs.us\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/benjamin.smedbergs.us\/blog\/wp-json\/wp\/v2\/comments?post=198"}],"version-history":[{"count":0,"href":"http:\/\/benjamin.smedbergs.us\/blog\/wp-json\/wp\/v2\/posts\/198\/revisions"}],"wp:attachment":[{"href":"http:\/\/benjamin.smedbergs.us\/blog\/wp-json\/wp\/v2\/media?parent=198"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/benjamin.smedbergs.us\/blog\/wp-json\/wp\/v2\/categories?post=198"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/benjamin.smedbergs.us\/blog\/wp-json\/wp\/v2\/tags?post=198"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}