I have several virtual hosts setup, three of them pull files via SVN when needed(though only the trunk folder actually needs this), using SVN for other versions make for easy patch creation, or easy file replacement if i hack a core file.
My question is whether i can checkin a plugin from directly inside the plugins directory?
So take this plugin located in wp-content/plugins/post-ui-tabs
for example.
Can i use that folder to house my WordPress.org plugin or does my plugin’s folder need to mimic the directory structure of the SVN, eg..
- brances/
- tags/
- trunk/
UPDATE:
Thanks for the feedback guys! All helpful in getting to understand local vs remote directory structure.
I’ve got my plugin up in the repo now, see here.
Post UI Tabs
Direct answer to my question, was Yes, i can do commits directly from my plugins folder, i simply have a typical local structure of wp-content/plugins/myplugin
which is just a checkout of http://svn.wp-plugins.org/myplugin/trunk
. I commit directly to trunk, then when i want to push a new version, i branch onto a tag(do that directly in Tortoise) and update the readme.txt stable tag to reference the new tag, ie. the operation creates the remote http://svn.wp-plugins.org/myplugin/tag/VER
with all my files, and makes that available to uses, whilst my local working copy remains on trunk(i’ll blog about it in the future when i’ve had more practice).
Easier then i thought!… thanks for all the advice guys.. all valuable pieces of information, Andy i felt your answer helped the most, so i’m giving you the accept, everyone else i still really appreciate your help, unfortunately i can only accept one answer… but thank you all the same.
I run a WordPress checkout of trunk, a branch, or a tag. This way I can switch WordPress versions easily:
In
wp-content/plugins
I have a trunk checkout for each of my plugins:I do my work on the stats plugin (updating the changelog in the readme), then I commit directly from there:
When it’s time to push a new version, I copy from trunk to the new tag:
Finally I bump the stable tag in the readme and commit that to trunk.
I do all of this in Linux or Mac. In my former life as a Windows user, I’d SSH (PuTTY) into a Linux box or (last resort) virtualize Linux.
First of all, I’m also a beginner in SVN. I’m happy when it’s working 😉
I’m not completely sure if I understand your question correctly. You have checked out the WordPress trunk and inside this working copy, you want to checkout a plugin from the WordPress plugin directory?
Well, I don’t know if this is going to work – But you could store your
wp-config.php
andwp-content
directory outside of your WordPress directory as explained by Otto in his article.For example
Document Root:
/var/www/
This way you could checkout multiple versions of WordPress and all your desired plugins with svn-externals. The hole
site1
could then also be stored in your ownsite1
svn repo so that your buddy only have to checkout this repo from your svn server.Disclaimer – I am also beginner with SVN.
Should be. I am using similar setup, just with WP checked out not from official repository.
Nope. Externals are links between repositories. WP plugin repository ignores them for packaging downloads (so they are useless with it). And as I understand you are not going to need your plugin in multiple repositories.
The folders are “SVNed” individually. Every folder has its own SVN meta info and there is no obligation for sub-folders to belong to one SVN with tree root. Just be attentive so that new files are added to repository they should be and such.
Nope. You just commit your folder to trunk, then tag/branch trunk into tagged version when you have new release. That is of course if you don’t need to retain older version of plugin on local computer.
I recently asked this question Any guides on using WP SVN with IDE clients? and from answers and poking around best manual type of thing that I found is documentation that comes with TortoiseSVN. It is for Windows and exactly for people who are not very much into command line SVN commands.
By ‘checkin’ do you mean updating the plugin on wp.org (svn commit) or downloading the plugin from wp.org (svn checkout) ?
Plugins on wp.org do require the traditional
trunk
branches
tags
structure.If you want to work on an svn checkout of a plugin within an svn checkout of wp core, you can checkout just the trunk folder: