{"id":158,"date":"2009-10-27T13:05:45","date_gmt":"2009-10-27T18:05:45","guid":{"rendered":"http:\/\/www.cfchimp.com\/wordpress\/?p=158"},"modified":"2025-01-21T11:23:29","modified_gmt":"2025-01-21T16:23:29","slug":"put-your-junk-in-the-trunk-moving-a-subversion-repo-into-the-trunk","status":"publish","type":"post","link":"https:\/\/csimmons.dev\/blog\/2009\/10\/put-your-junk-in-the-trunk-moving-a-subversion-repo-into-the-trunk\/","title":{"rendered":"Put your junk in the trunk: &#8220;Moving&#8221; a subversion repo into the trunk"},"content":{"rendered":"<p><strong>This post gives you the Windoze commands because this was something I worked on for my Office.<\/strong><\/p>\n<p>We have a project.\u00a0 Let&#8217;s call it project1.\u00a0 When the repo for the project was initially created it was not created with branches, trunk, and tags folders in the root.\u00a0 Going forward, everything was just committed to the root instead of to the trunk folder.\u00a0 Well, now we want to follow best practices and begin committing to the trunk.\u00a0 We don&#8217;t want to lose any of our repo history in the process though if we have to do re-creations of the repo.<\/p>\n<p>We tried to do an svn mv, but you can&#8217;t move a repo to a path within the repo.\u00a0 So here&#8217;s what we did.<\/p>\n<ol>\n<li>Make a dump of the current repo<br \/>\n<code>svnadmin dump c:\\Repositories\\myproject1\\ &gt; c:\\myproject1.dump<\/code><\/li>\n<li>Delete\u00a0 the current repo (I&#8217;m assuming you have a backup if something goes wrong.\u00a0 You do, don&#8217;t you?).<br \/>\n<code>rmdir c:\\svn\\myproject1<\/code><\/li>\n<li>Recreate the repo.\u00a0 This time let&#8217;s be sure to make branches, trunk, and tags folders in the root.<br \/>\n<code>svnadmin create c:\\Repositories\\myproject1<br \/>\nsvn mkdir trunk<br \/>\nsvn mkdir branches<br \/>\nsvn mkdir tags <\/code><\/li>\n<li>Load the dump into the trunk (Gross):<br \/>\n<code>svnadmin load c:\\Repositories\\myproject1\\ --parent-dir trunk &lt; c:\\myproject1.dump<\/code><\/li>\n<\/ol>\n<p>There it is.<\/p>\n<p>You might also give this a try: <a href=\"https:\/\/web.archive.org\/web\/20111031090049\/http:\/\/chipcastle.blogspot.com:80\/2008\/08\/subversion-forgot-to-create-trunk.html\" target=\"_blank\">http:\/\/chipcastle.blogspot.com\/2008\/08\/subversion-forgot-to-create-trunk.html<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>This post gives you the Windoze commands because this was something I worked on for my Office. We have a project.\u00a0 Let&#8217;s call it project1.\u00a0 When the repo for the project was initially created it was not created with branches, trunk, and tags folders in the root.\u00a0 Going forward, everything was just committed to the &#8230; <a title=\"Put your junk in the trunk: &#8220;Moving&#8221; a subversion repo into the trunk\" class=\"read-more\" href=\"https:\/\/csimmons.dev\/blog\/2009\/10\/put-your-junk-in-the-trunk-moving-a-subversion-repo-into-the-trunk\/\" aria-label=\"Read more about Put your junk in the trunk: &#8220;Moving&#8221; a subversion repo into the trunk\">Read more<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"_cloudinary_featured_overwrite":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[1],"tags":[17],"class_list":["post-158","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-subversion"],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/pbVg43-2y","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/csimmons.dev\/blog\/wp-json\/wp\/v2\/posts\/158","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/csimmons.dev\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/csimmons.dev\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/csimmons.dev\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/csimmons.dev\/blog\/wp-json\/wp\/v2\/comments?post=158"}],"version-history":[{"count":0,"href":"https:\/\/csimmons.dev\/blog\/wp-json\/wp\/v2\/posts\/158\/revisions"}],"wp:attachment":[{"href":"https:\/\/csimmons.dev\/blog\/wp-json\/wp\/v2\/media?parent=158"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/csimmons.dev\/blog\/wp-json\/wp\/v2\/categories?post=158"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/csimmons.dev\/blog\/wp-json\/wp\/v2\/tags?post=158"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}