{"id":32,"date":"2007-05-01T15:39:01","date_gmt":"2007-05-01T23:39:01","guid":{"rendered":"http:\/\/blog.mozilla.org\/webdev\/2007\/05\/01\/tagging-in-svn\/"},"modified":"2017-03-08T14:50:18","modified_gmt":"2017-03-08T22:50:18","slug":"tagging-in-svn","status":"publish","type":"post","link":"https:\/\/blog.mozilla.org\/webdev\/2007\/05\/01\/tagging-in-svn\/","title":{"rendered":"Tagging in SVN"},"content":{"rendered":"<p>So we decided to use SVN because it&#8217;s cooler and more modern.  It&#8217;s not so bad, especially for webapps.  We like the atomic commits, webdav, yadda yadda.  You know why it&#8217;s better than CVS we aren&#8217;t going to regurgitate that to you.<\/p>\n<p>But when deploying we ran into some issues with SVN merge.  If you always do updates in a batch and never have an &#8220;oh crap update this now&#8221; update then you&#8217;re fine.  But as we all know, stuff happens.  So when we have tried to merge the entire tree after merging single files manually we&#8217;ve had some interesting results &#8212; conflicts in certain places and an overall headache.<\/p>\n<p>The typical way of tagging is using an svn cp and placing a snapshot of a particular trunk revision into the tags directory.  This <a href=\"http:\/\/wiki.mozilla.org\/Webtools:SVN_Guidelines#Tagging_for_Staging_.2F_Production_using_svn_merge\">SVN tagging approach using svn merge<\/a> was supposed to be analogous to our <a href=\"http:\/\/wiki.mozilla.org\/Webtools:CVS_Guidelines#General_Tagging_Rules_.28quick_version.29\">previous way of tagging prod checkouts with CVS<\/a>.<\/p>\n<p>However, as clouserw put it, &#8220;the recommended strategy is only useful when merging the complete trunk to a tag, and when individual revisions\/files are involved, svn eats itself&#8221;.  So to avoid the merge issues with SVN that we found using svn merge we have come up with a <a href=\"http:\/\/wiki.mozilla.org\/Webtools:SVN_Guidelines#Tagging_for_Staging_.2F_Production_using_svn_externals\">new method that uses SVN externals instead<\/a>.<\/p>\n<p>Both methods have weaknesses.  SVN merge has the &#8220;eating itself&#8221; problem that presents a lot of conflicts and makes merging painful because of all the manual conflict resolution.  When merging the entire tree, though, it is desirable because it doesn&#8217;t have the weaknesses below.  Using SVN externals, you run into some interesting issues but you don&#8217;t get the SVN eating itself problem:<\/p>\n<ul>\n<li>Any locally modified files not in SVN (even when ignored) will kill a prod update in the event where an external must be updated (you get stuff like &#8220;svn: Failed to add directory &#8216;site\/app\/tests&#8217;: object of the same name already exists&#8221;)<\/li>\n<li>SVN externals cannot be a single file (they must be a directory so SVN can store info in an explicit .svn directory related to that checkout)<\/li>\n<\/ul>\n<p>Aside from those two issues, just remembering the trunk revision we want in prod has been working for us.  We&#8217;d like to find a good middle ground that doesn&#8217;t have us taking extra steps to update production when deploying trunk changes to the lives site.<\/p>\n<p>So, if you guys have any input please let us know.  We&#8217;re always open to suggestions.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>So we decided to use SVN because it&#8217;s cooler and more modern. It&#8217;s not so bad, especially for webapps. We like the atomic commits, webdav, yadda yadda. You know why it&#8217;s better than CVS we aren&#8217;t going to regurgitate that &hellip; <a class=\"go\" href=\"https:\/\/blog.mozilla.org\/webdev\/2007\/05\/01\/tagging-in-svn\/\">Continue reading<\/a><\/p>\n","protected":false},"author":24,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[17],"tags":[],"coauthors":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v22.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Tagging in SVN - Mozilla Web Development<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/blog.mozilla.org\/webdev\/2007\/05\/01\/tagging-in-svn\/\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Mike Morgan\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/blog.mozilla.org\/webdev\/2007\/05\/01\/tagging-in-svn\/\",\"url\":\"https:\/\/blog.mozilla.org\/webdev\/2007\/05\/01\/tagging-in-svn\/\",\"name\":\"Tagging in SVN - Mozilla Web Development\",\"isPartOf\":{\"@id\":\"https:\/\/blog.mozilla.org\/webdev\/#website\"},\"datePublished\":\"2007-05-01T23:39:01+00:00\",\"dateModified\":\"2017-03-08T22:50:18+00:00\",\"author\":{\"@id\":\"https:\/\/blog.mozilla.org\/webdev\/#\/schema\/person\/373fd84922ef95d8d5171d1a72770d4f\"},\"breadcrumb\":{\"@id\":\"https:\/\/blog.mozilla.org\/webdev\/2007\/05\/01\/tagging-in-svn\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/blog.mozilla.org\/webdev\/2007\/05\/01\/tagging-in-svn\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/blog.mozilla.org\/webdev\/2007\/05\/01\/tagging-in-svn\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/blog.mozilla.org\/webdev\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Tagging in SVN\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/blog.mozilla.org\/webdev\/#website\",\"url\":\"https:\/\/blog.mozilla.org\/webdev\/\",\"name\":\"Mozilla Web Development\",\"description\":\"For make benefit of glorious tubes\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/blog.mozilla.org\/webdev\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/blog.mozilla.org\/webdev\/#\/schema\/person\/373fd84922ef95d8d5171d1a72770d4f\",\"name\":\"Mike Morgan\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/blog.mozilla.org\/webdev\/#\/schema\/person\/image\/1d6151e93e27d281a7fc06534ee8eae0\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/ff5890a3252cd74f006ee33360e71c76?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/ff5890a3252cd74f006ee33360e71c76?s=96&d=mm&r=g\",\"caption\":\"Mike Morgan\"},\"description\":\"Mike Morgan is the former Director of Web Development for the Mozilla Corporation.\",\"url\":\"https:\/\/blog.mozilla.org\/webdev\/author\/morgamicmozillacom\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Tagging in SVN - Mozilla Web Development","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/blog.mozilla.org\/webdev\/2007\/05\/01\/tagging-in-svn\/","twitter_misc":{"Written by":"Mike Morgan","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/blog.mozilla.org\/webdev\/2007\/05\/01\/tagging-in-svn\/","url":"https:\/\/blog.mozilla.org\/webdev\/2007\/05\/01\/tagging-in-svn\/","name":"Tagging in SVN - Mozilla Web Development","isPartOf":{"@id":"https:\/\/blog.mozilla.org\/webdev\/#website"},"datePublished":"2007-05-01T23:39:01+00:00","dateModified":"2017-03-08T22:50:18+00:00","author":{"@id":"https:\/\/blog.mozilla.org\/webdev\/#\/schema\/person\/373fd84922ef95d8d5171d1a72770d4f"},"breadcrumb":{"@id":"https:\/\/blog.mozilla.org\/webdev\/2007\/05\/01\/tagging-in-svn\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/blog.mozilla.org\/webdev\/2007\/05\/01\/tagging-in-svn\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/blog.mozilla.org\/webdev\/2007\/05\/01\/tagging-in-svn\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/blog.mozilla.org\/webdev\/"},{"@type":"ListItem","position":2,"name":"Tagging in SVN"}]},{"@type":"WebSite","@id":"https:\/\/blog.mozilla.org\/webdev\/#website","url":"https:\/\/blog.mozilla.org\/webdev\/","name":"Mozilla Web Development","description":"For make benefit of glorious tubes","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/blog.mozilla.org\/webdev\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/blog.mozilla.org\/webdev\/#\/schema\/person\/373fd84922ef95d8d5171d1a72770d4f","name":"Mike Morgan","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/blog.mozilla.org\/webdev\/#\/schema\/person\/image\/1d6151e93e27d281a7fc06534ee8eae0","url":"https:\/\/secure.gravatar.com\/avatar\/ff5890a3252cd74f006ee33360e71c76?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/ff5890a3252cd74f006ee33360e71c76?s=96&d=mm&r=g","caption":"Mike Morgan"},"description":"Mike Morgan is the former Director of Web Development for the Mozilla Corporation.","url":"https:\/\/blog.mozilla.org\/webdev\/author\/morgamicmozillacom\/"}]}},"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/blog.mozilla.org\/webdev\/wp-json\/wp\/v2\/posts\/32"}],"collection":[{"href":"https:\/\/blog.mozilla.org\/webdev\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.mozilla.org\/webdev\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.mozilla.org\/webdev\/wp-json\/wp\/v2\/users\/24"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.mozilla.org\/webdev\/wp-json\/wp\/v2\/comments?post=32"}],"version-history":[{"count":0,"href":"https:\/\/blog.mozilla.org\/webdev\/wp-json\/wp\/v2\/posts\/32\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.mozilla.org\/webdev\/wp-json\/wp\/v2\/media?parent=32"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.mozilla.org\/webdev\/wp-json\/wp\/v2\/categories?post=32"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.mozilla.org\/webdev\/wp-json\/wp\/v2\/tags?post=32"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/blog.mozilla.org\/webdev\/wp-json\/wp\/v2\/coauthors?post=32"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}