SVN CLI Commands for OS X for WordPress Plugin Developers are quite nice to learn. Rely us, instead of finding a GUI tool for OS X SVN, Command Line is cleaner. Obviously, for Windows Operating System, there is a very good GUI software for SVN – Tortoise SVN, we wrote that in details in an previous article. Also we wrote about OS X SVN Client Softwares. In this article, we will write about SVN CLI Commands for OS X for WordPress Plugin Developers, which can be used to update or commit WordPress Plugins.
SVN CLI Commands for OS X for WordPress Plugin Developers : Introduction
We usually use iTerm2 and HomeBrew as package manager. The components which are installed for our Macs has been written here – Customize iTerm2 with Color Schemes, Syntax Highlighting. User/Reader can use any other package manger, including apt-get on OS X (yes!). So, we will initially show you the installation of SVN using HomeBrew, if you are using other package manager, you need to change that part only. Possibly SVN is by default installedwhen we install XCode, run this command to check :
1 | which svn |
If it returns the Path, thats fine. You need not to install SVN again. But if returns nothing, there are many ways to install SVN. The OS X version is availble here :
---
1 | http://subversion.apache.org/packages.html#osx |
Problem is that, if you run :
1 | svn --version |
It might return version 1.6 at the time of writing. This command :
1 | brew install subversion |
Should install SVN properly, but if returns error, then –
To find out the version currently active with Homebrew:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | brew info subversion #You can check the versions of subversion which are available using:1 brew update brew versions subversion #This will return multiple lines, one per version, each containing a version number and the checkout command git checkout 55577bb Library/Formula/subversion.rb #Choose the version you want to install e.g. here 1.8.1, switch Homebrew™s prefix,checkout the package and install cd `brew --prefix` git checkout 55577bb Library/Formula/subversion.rb brew install subversion git checkout -- Library/Formula/subversion.rb #Also you can use this way for 1.7 #ref - https://gist.github.com/gcatlin/1847248 brew install https://raw.github.com/Homebrew/homebrew-versions/master/subversion17.rb #switch between versions using brew switch brew switch subversion 1.7.3 |
SVN CLI Commands for OS X for WordPress Plugin Developers
The needed SVN CLI Commands for OS X for WordPress Plugin Developers all are here :
1 | http://svnbook.red-bean.com/en/1.1/ch03s05.html#svn-ch-3-sect-5.1 |
You can perform a test by cloning your own WordPress Plugin or Theme repository :
1 | svn export http://plugins.svn.wordpress.org/ftp-to-zip/ |
ftp-to-zip is our plugin. You will obviously want to replace it. Export command seems odd, actually its the export from the server, not considering the import on local computer. Now, obviously, you can see visually the folders files on Finder. Run pwd command to grab the full path of the repo (local computer, your Mac) and right click on Finder icon > paste the path after clicking the Go To Folder option. You can visually see the things, right? Its just for initial usage – you can not do work with it, in the same way like git. You have only downloaded them. It is not the working copy – its only copied as read only from server. svn export is like svn checkout but it won’t create all the .svn folders. You will get here, how to make a working copy :
1 | http://svnbook.red-bean.com/en/1.6/svn.tour.initial.html |
Yes, here is where the import command works! When you will run import command. You can tally with WordPress core project as reference :
1 | http://codex.wordpress.org/Using_Subversion |
This is not for plugin but the basics will be the same. Plugin specific is :
1 | http://wordpress.org/plugins/about/svn/ |
SVN – Not a working copy error is quite common, usually happens for using improper workflow.
Tagged With 3LCB , QKY7