{"id":584,"date":"2007-09-06T10:17:40","date_gmt":"2007-09-06T17:17:40","guid":{"rendered":"http:\/\/www.gubatron.com\/blog\/2007\/09\/06\/svn-gotchas-importing-a-folder-in-one-step\/"},"modified":"2007-09-06T10:17:40","modified_gmt":"2007-09-06T17:17:40","slug":"svn-gotchas-importing-a-folder-in-one-step","status":"publish","type":"post","link":"https:\/\/www.gubatron.com\/blog\/svn-gotchas-importing-a-folder-in-one-step\/","title":{"rendered":"svn gotchas: Importing a Folder in one step"},"content":{"rendered":"<p>Up until this day when my friend Gabe told me how, I didn&#8217;t know how to import a folder, without doing this first:<\/p>\n<pre>\nsvn mkdir svn+ssh:\/\/server.com\/path\/to\/repo\/myfolder\nsvn import myFolder svn+ssh:\/\/server.com\/path\/to\/repo\/myfolder\n<\/pre>\n<p>If I didn&#8217;t do that, If I just imported the local &#8220;myFolder&#8221;, it would end up adding all the files inside the folder and it would not create the &#8220;myFolder&#8221; inside the repository, creating a total mess.<\/p>\n<p><strong>Here&#8217;s what you do<\/strong><br \/>\nForget everything you know about copying folders on the command line, and do this:<\/p>\n<ul>\n<li>cd INTO de Local Folder you want to import as a new folder in your repository<\/li>\n<li>svn import REMOTE_SVN_PATH\/nameOfYouLocalFolder<\/li>\n<\/ul>\n<p>This will create that folder as needed on the SVN repository and import all the files and folders of the folder where you&#8217;re standing.<\/p>\n<p>Here&#8217;s an example:<\/p>\n<pre>\ngubatrons-macbook-pro:~\/workspace\/ cd <strong>arcturus-jython-console<\/strong>\ngubatrons-macbook-pro:~\/workspace\/<strong>arcturus-jython-console<\/strong> gubatron$ svn import svn+ssh:\/\/gubatron@myserver\/usr\/local\/svn\/repos\/labs\/arcturus-jython-console -m \"A Jython console to test arcturus core object on the fly\"\nAdding         Main.java\nAdding         lib\nAdding  (bin)  lib\/jython.jar\n\nCommitted revision 7409\n<\/pre>\n<p>If you svn ls the repo, you&#8217;ll see the new folder &#8220;arcturus-jython-console&#8221; is there (for this example)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Up until this day when my friend Gabe told me how, I didn&#8217;t know how to import a folder, without doing this first: svn mkdir svn+ssh:\/\/server.com\/path\/to\/repo\/myfolder svn import myFolder svn+ssh:\/\/server.com\/path\/to\/repo\/myfolder If I didn&#8217;t do that, If I just imported the local &#8220;myFolder&#8221;, it would end up adding all the files inside the folder and it [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":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":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[15,30,43],"tags":[],"class_list":["post-584","post","type-post","status-publish","format-standard","hentry","category-code","category-geeklife","category-linux"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p5Unzf-9q","jetpack-related-posts":[{"id":2087,"url":"https:\/\/www.gubatron.com\/blog\/mercurial-for-subversion-expats-merging-remote-changes-abort-push-creates-new-remote-heads\/","url_meta":{"origin":584,"position":0},"title":"Mercurial for Subversion Expats: Merging remote changes. &#8220;abort: push creates new remote heads!&#8221;","author":"gubatron","date":"November 14, 2010","format":false,"excerpt":"Commit anywhere\/anytime with Mercurial So you have been using subversion for the past few years and now your team has decided to move on to Mercurial for all the benefits. Two or more people are working on the same branch and they're pushing code to the main copy of the\u2026","rel":"","context":"In &quot;Code&quot;","block_context":{"text":"Code","link":"https:\/\/www.gubatron.com\/blog\/category\/code\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":481,"url":"https:\/\/www.gubatron.com\/blog\/svn-cant-create-tunnel-the-system-cannot-find-the-file-specified\/","url_meta":{"origin":584,"position":1},"title":"svn: Can&#8217;t create tunnel: The system cannot find the file specified.","author":"gubatron","date":"March 15, 2007","format":false,"excerpt":"I was trying to checkout a project from a subversion repository using Eclipse's Subversive, and I was having problems with a subversion url that starts with \"svn+ssh:\/\/\" This means all the transport has to be done using a \"ssh\" agent. Eclipse's Subclipse plugin was giving me the error: svn: Can't\u2026","rel":"","context":"In &quot;Code&quot;","block_context":{"text":"Code","link":"https:\/\/www.gubatron.com\/blog\/category\/code\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":272,"url":"https:\/\/www.gubatron.com\/blog\/project-snowrss\/","url_meta":{"origin":584,"position":2},"title":"Project SnowRSS","author":"gubatron","date":"March 18, 2006","format":false,"excerpt":"SnowRSS is a GPL RSS Aggregator engine I wrote in python. Currently it's been under use in wedoit4you.com and its stable. It can read RSS and ATOM feeds. It uses the feedparser python module, and the MySQLdb python module to do the job. DOWNLOAD You can only download the code\u2026","rel":"","context":"In &quot;Gubatron&quot;","block_context":{"text":"Gubatron","link":"https:\/\/www.gubatron.com\/blog\/category\/gubatron\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":273,"url":"https:\/\/www.gubatron.com\/blog\/snowrss\/","url_meta":{"origin":584,"position":3},"title":"SnowRSS","author":"gubatron","date":"March 18, 2006","format":false,"excerpt":"SnowRSS SnowRSS is an RSS Aggregator engine I wrote in python (Licensed under the GPL). Currently it's been under use in wedoit4you.com and its stable. It can read RSS and ATOM feeds. It uses the feedparser python module, and the MySQLdb python module to do the job. DOWNLOAD You can\u2026","rel":"","context":"In &quot;Gubatron&quot;","block_context":{"text":"Gubatron","link":"https:\/\/www.gubatron.com\/blog\/category\/gubatron\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":542,"url":"https:\/\/www.gubatron.com\/blog\/how-to-update-the-location-of-your-subversion-repo-without-checking-out-again-everything\/","url_meta":{"origin":584,"position":4},"title":"How to update the location of your subversion Repo without checking out again everything","author":"gubatron","date":"July 10, 2007","format":false,"excerpt":"So you checked out code from a place, and whoever runs your subversion server decided to change the URL, or decided to switch from http:\/\/ to https:\/\/ or to svn+ssh:\/\/ ... If you're a noob, you'll probably just checkout everything again. Next time this happens just use svn switch Here's\u2026","rel":"","context":"In &quot;Code&quot;","block_context":{"text":"Code","link":"https:\/\/www.gubatron.com\/blog\/category\/code\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":2068,"url":"https:\/\/www.gubatron.com\/blog\/bitbucket-or-github\/","url_meta":{"origin":584,"position":5},"title":"Bitbucket or Github?","author":"gubatron","date":"September 28, 2010","format":false,"excerpt":"This week we have to make a final choice of what technology will be used to replace our somewhat big subversion repository (2 Gigs). Huge imports are beginning to be a pain and we're tired of the .svn folders and not being able to commit if the central server is\u2026","rel":"","context":"In &quot;Geeklife&quot;","block_context":{"text":"Geeklife","link":"https:\/\/www.gubatron.com\/blog\/category\/geeklife\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"https:\/\/www.gubatron.com\/blog\/wp-json\/wp\/v2\/posts\/584","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.gubatron.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.gubatron.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.gubatron.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.gubatron.com\/blog\/wp-json\/wp\/v2\/comments?post=584"}],"version-history":[{"count":0,"href":"https:\/\/www.gubatron.com\/blog\/wp-json\/wp\/v2\/posts\/584\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.gubatron.com\/blog\/wp-json\/wp\/v2\/media?parent=584"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.gubatron.com\/blog\/wp-json\/wp\/v2\/categories?post=584"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.gubatron.com\/blog\/wp-json\/wp\/v2\/tags?post=584"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}