Can i do plugin commits directly from a plugin folder inside an installation using the Trunk SVN

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.

enter image description here

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.

enter image description here

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.

4 Answers
4

I run a WordPress checkout of trunk, a branch, or a tag. This way I can switch WordPress versions easily:

svn sw http://svn.automattic.com/wordpress/trunk
svn sw http://svn.automattic.com/wordpress/tags/3.1

In wp-content/plugins I have a trunk checkout for each of my plugins:

cd wp-content/plugins
svn co http://plugins.svn.wordpress.org/stats/trunk/ stats

I do my work on the stats plugin (updating the changelog in the readme), then I commit directly from there:

emacs stats.php readme.txt
svn di stats.php readme.txt
svn ci stats.php readme.txt -m "stats: fixed issue with SSL"

When it’s time to push a new version, I copy from trunk to the new tag:

svn cp http://plugins.svn.wordpress.org/stats/trunk/ http://plugins.svn.wordpress.org/stats/tags/4.2.1/ -m "stats: tag 4.2.1"

Finally I bump the stable tag in the readme and commit that to trunk.

emacs readme.txt
svn di readme.txt
svn ci readme.txt -m "stats: bump stable tag to 4.2.1"

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.

Leave a Comment