{"id":139,"date":"2008-11-11T16:39:58","date_gmt":"2008-11-11T21:39:58","guid":{"rendered":"http:\/\/blog.red-bean.com\/sussman\/?p=139"},"modified":"2009-09-17T19:56:40","modified_gmt":"2009-09-18T00:56:40","slug":"subversion-over-http-soon-with-less-suck","status":"publish","type":"post","link":"http:\/\/blog.red-bean.com\/sussman\/?p=139","title":{"rendered":"Subversion over HTTP:  soon with less suck!"},"content":{"rendered":"<p>So everyone knows my job at Google is to tech-lead the team responsible for our Subversion servers, as part of our larger open-source <a href=\"http:\/\/code.google.com\/p\/hosting\">project hosting<\/a> service.  Thus, having come to a reasonable temporary stopping point with my <a href=\"\">previous 20% project<\/a>, I&#8217;ve turned to a new 20% project: making Subversion itself better.<\/p>\n<p>Specifically, I want to right a wrong, undo something I&#8217;ve felt nasty about for years.  Subversion&#8217;s HTTP protocol is very complicated and unintelligible to mere mortals.  Honestly, if <a href=\"http:\/\/prng.blogspot.com\">Greg Stein<\/a> and I got hit by buses, nobody would really understand what&#8217;s going on inside mod_dav_svn.  What&#8217;s the backstory here?  Basically, we tried to make mod_dav_svn implement a reasonable subset of <a href=\"http:\/\/www.ietf.org\/rfc\/rfc3253.txt\">DeltaV<\/a>, which was a mostly-failed spec written long ago to implement Clearcase^H^H^H^H version control over HTTP.  Eight years later, this extra complexity hasn&#8217;t bought us any interoperability with other version control systems &mdash; just a big headache to maintain and a icky performance penalty.  The Subversion client, in being a &#8220;good DeltaV citizen&#8221;, isn&#8217;t allowed to directly talk about URLs that represent revisions, transactions, historical objects, and so on.  Instead, it has to play dumb and continually issue a series of requests to &#8220;discover&#8221; opaque URLs that represent these concepts.  It&#8217;s sort of like the client playing a formal game of 20 Questions, when it already knows the answers.<\/p>\n<p>So after some chats with Greg Stein and others, I&#8217;ve collected ideas on how to streamline our existing protocol into something much more simple, tight, and comprehensible.  Way fewer requests too.  You can read our evolving <a href=\"http:\/\/svn.collab.net\/repos\/svn\/trunk\/notes\/http-protocol-v2.txt\">design document<\/a> and send questions\/feedback to dev@subversion.tigris.org.  Subversion 1.6 is planned to be released at year&#8217;s end, so if we&#8217;re lucky we&#8217;ll see this new protocol in Subversion 1.7 next summer.<\/p>\n<p>Speaking of Subversion 1.6, however:  a smaller sort of glastnost is happening there as well.  In this new spirit of HTTP openness, we&#8217;re officially ending our policy of &#8220;not telling people how to access older revisions&#8221; over HTTP.  If you recall, the <a href=\"http:\/\/svnbook.red-bean.com\">Subversion book<\/a> has always said:<\/p>\n<blockquote><p>\nQ:  Can I view older revisions?<br \/>\nA: Your web browser speaks ordinary HTTP only. That means it knows only how to GET public URLs, which represent the latest versions of files and directories.  [&#8230;] To find an older version of a file, a client must follow a specific procedure to \u00e2\u20ac\u0153discover\u00e2\u20ac\u009d the proper URL; the procedure involves issuing a series of WebDAV PROPFIND requests and understanding DeltaV concepts. This is something your web browser simply can&#8217;t do.\n<\/p><\/blockquote>\n<p>I&#8217;m here to break the chains!  Reveal the lies!  RELEASE THE KRAKEN.  In Subversion 1.6, we&#8217;ve gone and implemented an <em>official<\/em> public query syntax for accessing older (revision, path) coordinate pairs:<\/p>\n<pre>\r\nhttp:\/\/host\/repos\/path?r=REV\r\nhttp:\/\/host\/repos\/path?p=PEGREV\r\nhttp:\/\/host\/repos\/path?p=PEGREV&r=REV\r\n<\/pre>\n<p>This query syntax offers the same <a href=\"http:\/\/svnbook.red-bean.com\/en\/1.5\/svn.advanced.pegrevs.html\">peg-revision<\/a> concept that one sees in the Subversion commandline client.  The first syntax means &#8220;start at PATH in the latest revision, then follow the object back in time to revision REV.&#8221;  This works even if the object was renamed and exists at a different place in the older revision.  The second syntax allows one to pinpoint an object with no history tracing:  just jump to revision PEGREV, and find PATH.  The third syntax is very much like running &#8220;svn subcommand -r REV path@PEGREV&#8221;:  start at PEGREV, find PATH, then trace the object back into older revision REV.<\/p>\n<p>In any case, this means source code browsers and other tools can stop using &#8220;secret&#8221; internal urls to access older objects.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>So everyone knows my job at Google is to tech-lead the team responsible for our Subversion servers, as part of our larger open-source project hosting service. Thus, having come to a reasonable temporary stopping point with my previous 20% project, I&#8217;ve turned to a new 20% project: making Subversion itself better. Specifically, I want to [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-139","post","type-post","status-publish","format-standard","hentry","category-subversion"],"_links":{"self":[{"href":"http:\/\/blog.red-bean.com\/sussman\/index.php?rest_route=\/wp\/v2\/posts\/139","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/blog.red-bean.com\/sussman\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/blog.red-bean.com\/sussman\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/blog.red-bean.com\/sussman\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/blog.red-bean.com\/sussman\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=139"}],"version-history":[{"count":8,"href":"http:\/\/blog.red-bean.com\/sussman\/index.php?rest_route=\/wp\/v2\/posts\/139\/revisions"}],"predecessor-version":[{"id":238,"href":"http:\/\/blog.red-bean.com\/sussman\/index.php?rest_route=\/wp\/v2\/posts\/139\/revisions\/238"}],"wp:attachment":[{"href":"http:\/\/blog.red-bean.com\/sussman\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=139"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/blog.red-bean.com\/sussman\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=139"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/blog.red-bean.com\/sussman\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=139"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}