{"id":700,"date":"2015-01-28T10:17:30","date_gmt":"2015-01-28T14:17:30","guid":{"rendered":"http:\/\/192.168.1.60\/techblog\/?p=700"},"modified":"2015-03-14T11:20:49","modified_gmt":"2015-03-14T15:20:49","slug":"wordpress-svn-on-a-mac","status":"publish","type":"post","link":"https:\/\/tech.creed3.com\/?p=700","title":{"rendered":"WordPress SVN on a Mac"},"content":{"rendered":"<p><img decoding=\"async\" style=\"margin: 0 4px 4px 0;\" alt=\"\" src=\"images\/stories\/wordpress-logo-simplified-rgb.png\" width=\"120\" align=\"right\" border=\"0\" \/>Having recently taken the plunge in to WordPress plugin development, I decided to offer one to the community and become &#8216;official&#8217;. &nbsp;To do so one must be at least somewhat familiar with the idea of version control, but then I needed to dig in to the system WP uses, Apache Subversion.<!--more--><\/p>\n<p>Not even being acquainted I first needed to find out about it and could I run it on a Mac. &nbsp;In short order I discovered that Apple installs Subversion on every Mac. &nbsp;Wonderful! &nbsp;Or. . . not. &nbsp;Maybe they used to, but today it&#8217;s part of the Xcode library which is not automatically installed on Macs, but it is a free developer library. &nbsp;Okay no prob. &nbsp;Except, ummmm, I&#8217;m still using Mountain Lion (yeah, yeah, I know) for my main production machine and Apple no longer makes Xcode available for that OS. &nbsp;After some digging I discovered it&#8217;s possible to install Subversion on a Mac via a number of <a href=\"https:\/\/subversion.apache.org\/packages.html#osx\" target=\"_blank\">different methods<\/a> of which I chose to install <a href=\"http:\/\/brew.sh\/\" target=\"_blank\">Homebrew<\/a> to handle this task. &nbsp;Done!<\/p>\n<p>Time to read up on <a href=\"http:\/\/svnbook.red-bean.com\/\" target=\"_blank\">how Subversion works<\/a> and what it does.<\/p>\n<p>Subversion is a command line tool. &nbsp;I can do command line stuff but much prefer a GUI when ever possible. &nbsp;More digging, and I discover the awesome Mac community comes through with an open source offering (among the many purchase-able options) in <a href=\"https:\/\/code.google.com\/p\/svnx\/\" target=\"_blank\">SvnX<\/a>, which is also pretty highly rated to boot. &nbsp;After downloading and installing, I then poke around at SvnX for a while to get a feel for how it works in relation to Subversion.<\/p>\n<p>There was also reading to do on what <a href=\"https:\/\/wordpress.org\/plugins\/about\/svn\/#task-1\" target=\"_blank\">WP has to say<\/a> about how they use Subversion.<\/p>\n<p>After hours of careful reading and research it was finally time to give it a shot. &nbsp;Using my WP credentials and the location of my newly attained plugin repository, I was able to log in and &#8216;check out&#8217; the empty project. &nbsp;Worked like a charm, creating the necessary folders where I directed. &nbsp;Then per WP instructions I needed to copy my files in to the &#8216;working copy&#8217; trunk folder and then commit the changes (or, upload the files). &nbsp;But, I kept getting an authentication error, which was completely unexpected since I just used those same credentials to log in and initiate all of this. &nbsp;Back to searching.<\/p>\n<p>After an hour and numerous attempts to get it york I came up empty handed. &nbsp;So I opted to quit SvnX and restart in hopes that for some reason my credentials I had entered were not getting written to a config file somewhere which was affecting this. &nbsp;That did seem to be what was happening. &nbsp;But when I opened the working files window again, this time I got an error that the current version of Subversion wasn&#8217;t high enough to work on those files. &nbsp;The very files it had created not an hour earlier. &nbsp;Back to searching.<\/p>\n<p>All I could find was something indicating this error was caused by trying out a newer version of Subversion, and then going back to a previous version, which I had not done. &nbsp;I checked and had the absolute latest version installed. &nbsp;So forget that, I&#8217;ll &#8216;check out&#8217; the project again and let it work with a fresh copy. &nbsp;None doing. &nbsp;There was a hidden project file that wouldn&#8217;t allow that. &nbsp;Grrrrr. . . . &nbsp;So I delete the entire folder structure, recreate the base folder, then &#8216;check out&#8217; the project again. &nbsp;This time it worked. &nbsp;I re-copied my files in to the trunk folder.<\/p>\n<p>I need to mention during all of my searching I read that there are 2 &#8216;commit&#8217; buttons in SvnX, one on the &#8216;working copy&#8217; main window, and then another on the review window, which is the method <a href=\"http:\/\/blogjunkie.net\/2010\/08\/absolute-basic-subversion-for-newbies-with-svnx\" target=\"_blank\">someone associated with SvnX said to use<\/a>.<\/p>\n<p>So time to try it again and this time with the review button. &nbsp;Success!<\/p>\n<p>Hopefully something here will help someone struggling with this same problem.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Having recently taken the plunge in to WordPress plugin development, I decided to offer one to the community and become &#8216;official&#8217;. &nbsp;To do so one must be at least somewhat familiar with the idea of version control, but then I needed to dig in to the system WP uses, Apache Subversion.<\/p>\n","protected":false},"author":9,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[19,16,30,41],"tags":[32,31],"class_list":["post-700","post","type-post","status-publish","format-standard","hentry","category-mac","category-technology","category-web-development","category-wordpress","tag-plugin","tag-wordpress"],"views":1869,"_links":{"self":[{"href":"https:\/\/tech.creed3.com\/index.php?rest_route=\/wp\/v2\/posts\/700","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tech.creed3.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tech.creed3.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tech.creed3.com\/index.php?rest_route=\/wp\/v2\/users\/9"}],"replies":[{"embeddable":true,"href":"https:\/\/tech.creed3.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=700"}],"version-history":[{"count":0,"href":"https:\/\/tech.creed3.com\/index.php?rest_route=\/wp\/v2\/posts\/700\/revisions"}],"wp:attachment":[{"href":"https:\/\/tech.creed3.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=700"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tech.creed3.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=700"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tech.creed3.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=700"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}