Foswikirefs Plugin

Display subversion rev, and git refs on Github

This plugin enables easy links from the Foswiki web to the github display of a committed change. It replaces the current InterwikiPlugin link Foswikirev:

Macros

This plugin implements two macros:

  • %GITREF{account:repository:reference}%
Parameter Default Meaning
account foswiki The github account owning the repository.
repository core The repository name
refhash Not set The 7-40 character git commit hash. 12 characters recommended.

Examples

Macro Displays
%GITREF{96213fee5462}% distro:96213fee5462
%GITREF{NatEditPlugin:370f069dbc8d}% NatEditPlugin:370f069dbc8d

The git reference can be entered as a 7-40 character string. However github will reliably show a truncated 12 character reference.
  • 7 character refs work when there are no collisions
  • 8-11 refs work only when needed to resolve a collision
  • 12 character refs appear to always work
  • 13-39 generate a 404
  • 40 character refs work

  • %REV2REF{<svn_revision>}%
Parameter Default Meaning
svn_revision Not set A 1-5 digit svn revision.

Note: Because a svn revision can result in commits into multiple git repositories, this macro will possibly generate multiple links for the revision.

Examples

Macro Displays
%REV2REF{15}% distro:2b6bafa7b2a7 FastCGIEngineContrib:e2de71d92065
%REV2REF{2746}% distro:96213fee5462

Also with the latest InterwikiPluigin, Interwiki pointers are supported, For example distro:96213fee5462 and distro:2b6bafa7b2a7 FastCGIEngineContrib:e2de71d92065

Preferences

This plugin has no preferences or configuration settings.

Installation

You do not need to install anything in the browser to use this extension. The following instructions are for the administrator who installs the extension on the server.

Open configure, and open the "Extensions" section. Use "Find More Extensions" to get a list of available extensions. Select "Install".

If you have any problems, or if the extension isn't available in configure, then you can still install manually from the command-line. See http://foswiki.org/Support/ManuallyInstallingExtensions for more help.

Info

Author: GeorgeClark
Copyright: 2014, George Clark and Foswiki Contributors, All Rights Reserved
License: GPL (GNU General Public License)
Dependencies: None
Version: 1.02
Release: 1.02
Change History:  
1.02 (2014-10.07): Added some missing revs
1.0 (2014-08-12): Initial version
Home: http://foswiki.org/Extensions/FoswikirefsPlugin
Tasks: http://foswiki.org/Tasks/FoswikirefsPlugin
Support: http://foswiki.org/Support/FoswikirefsPlugin
Topic revision: r3 - 08 Oct 2014, GeorgeClark
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy