Subversion Informations

Featured on:

Download the current version 0.7.1 today!

Description

Subversion Informations is a plugin for WordPress, designed to provide informations about local SVN repositories.
It can make use of WebSVN to offer the current version as a direct download.

To display information in your postings, you can make use of one of the new [svn:<element>@<repository>] tags.

Features

  • Informations about current revision, author, date and log message
  • Admin panel for easy usage

See it in action on my site. (Sorry, text is german only… but you get the catch!)

Installation

To install the plugin follow the listed steps:

  1. Download the package
  2. Decompress the archive and upload it to /wp-content/plugins/ on your webspace
  3. Activate the plugin through the ‘Plugins’ menu in WordPress
  4. Change the settings (submenu of the options) according to your machine setup
  5. For the full experience you have to install WebSVN and add your repositories (this provides the download ability)

Usage

To display information about a SVN repository in one of your texts you just have to insert the [svn:<element>@<repository>] tag in the desired spot.

The element can be one of these:

  • head for the current revision
  • author for the username of the last contributer
  • date for the actual time of the last change
  • log for the user provided message
  • box for a predefined box containing all four of the above along with a download link (using WebSVN)

The repository can be either a full path (i.e. /home/user/svn/repo) or just the name of the repository (i.e. repo).
This of course is according to the settings in the admin panel where you have to set the base path of your repositories for the name-method to work.

Example:

The current version of my program is [svn:head@/home/user/svn/program].

The current version of my program is [svn:head@program].
This is only working when the svn base path is set to /home/user/svn in the admin panel.

As of version 0.7 there are additional attributes which you can set for each repository inside the tag:

  • [svn:<element>@<category>*<repository>]
    With a specified WebSVN category. This also works with the full path tag.
  • [svn:<element>@<repository>/path/path/]
    A subdirectory for the WebSVN download. This does not work with full path tag.
  • [svn:<element>@<category>*<repository>/path/path/]
    Or a combination of both…

Please note that in version 0.7.1 the separator for category and repository changed from a dot (.) to an asterisk (*) to allow paths with dots in it. (Bugfix for Josh, thanks for reporting!)

If you want to show the full box, you better insert it between paragraphs and not in the middle of your text, as it will bust your format.
Also it is a good idea to use a wider theme than the default one to get the best formated box.
The result is shown in the screenshot section.

Screenshots

Example text with every five elementsAdmin panel

Frequently Asked Questions

Q: Is the plugin compatible with WordPress 3.0.
A: As far as I can see it is. (Tested with WP 3.0.1)

Q: Where can I report bugs?
A: Feel free to leave a comment below.

Limitations

  • The Plugin is limited quite a bit in its current form, as there is only support for the current (HEAD) revision.
  • Also the use of WebSVN is mandatory to get a working download link.
  • Subdirectory download is only possible if the full path tag isn’t in use.

Changelog

0.7.1
  • The separator for category and repository changed from a dot (.) to an asterisk (*) to allow paths with dots in it. (Bugfix for Josh, thanks for reporting!)
0.7
  • Added possibility to specify WebSVN category and subdirectory for each svn tag.
0.6
  • First public version.
  1. For any support request, drop me a line here.

  2. @VooDoo

    Sorry, I just realized this is where my support comments/and questions should go. Please feel free to delete my previous comments from the other page.

    This page actually helped me to get a little further. My next issue is that the information doesn’t show up completely when I am using the “box” element nor does the download link work. My WebSVN is located here and if it helps, the Ive implemented the shortcode here. Thanks for your help.

  3. @VooDoo My site was down for a while but it is back up and the download link works but the HEAD information is missing. Do you have any suggestions? Thanks.

  4. @Joshua Parker
    there has to be something wrong with your repository path. maybe you didnt use the unix path but the one displayed via ftp, which can be misleading.

  5. @VooDoo I am not sure I understand. Do you mean that my path should be something like this file:///home/username/svn/repos instead of something like this file:///home/username/public_html/svn.domain.com/public/repos?

  6. @Joshua Parker Also, I should note that I have 5 Revisions in the DB: 0 1 2 3 4 and it is looking at Revision 0, which give no information and I believe Revision 0 is HEAD.

  7. @Joshua Parker
    The plugin is not looking at revision 0, those are the default values when there is nothing to display.

    Please have a close look at the syntax of my example screenshot. I am talking about the absolute system path to your repository that you have to provide either in the setup or in every link. You do not have to use the “file://” prefix. Just the path you would use on a command line interface. (e.g. /home/username/svn/repos)

  8. @VooDoo Oh, gotcha. That’s exactly how I have it setup. I am using the second option under usage because the full path option doesn’t work for me. So I have configured it as so: /home/username/public_html/svn.domain.com/public and in the download page, I have the following short code: [svn:box@puritan].

  9. @Joshua Parker
    The full path option not working might be of the same nature as your current problem. Something is not right with those paths. Can’t go any deeper without ssh access (which is not wise to give out to people…).

    Maybe your wordpress has not sufficient reading rights in your repository?

  10. @VooDoo I agree. The issue with the full path is the subdomain gets cutoff. If I use a different repository it works fine. But again the information isn’t showing up but the download link works. I’ve actually been following this tutorial for making repositories. Is there anything in this tutorial which could be causing me issues? Thanks.

  11. @Joshua Parker
    Your repository is probably fine. The download link is working because it utilizes WebSVN instead of going the low level way like the display options.

    Could you give me an example of the cut-off repository path? Maybe I can fix this somehow.

  12. I just changed it and you can see it on my site. The full path to the repository should be /home/parkerj/public_html/svn.joshparker.us/public/puritan.

  13. @Joshua Parker
    Try the new version please. It should work now either way.

  14. Awesome, the full path for my setup works. Thanks again for your help. Not a big deal about the other stuff, ’cause I can change that by hand. The issue could be that I am using an Apache instance in order to use dav_svn but my server is powered by Nginx. It shouldn’t make a difference, but I have found some instances where some things don’t interpret well with Nginx. Thank you again for a great plugin. Are you taking donations?

  15. @Joshua Parker
    Glad to help and thanks for the offer. But I do it for fun, appreciated though. ;)

  16. seems like this only works with local repos. is there any chance you could make this work with remote ones? i see no option of getting my subversion server on the same machine as the webserver is on.

  17. That is correct. I don’t see any way around it in the foreseeable future. Remote connection is not as trivial.

  1. August 5th, 2009
  2. August 6th, 2009
  3. August 21st, 2010
  4. August 21st, 2010