Changes between Initial Version and Version 1 of RepositoryHookSystemPlugin


Ignore:
Timestamp:
Sep 9, 2008, 12:54:08 PM (16 years ago)
Author:
Jeff Hammel
Comment:

New hack RepositoryHookSystemPlugin, created by k0s

Legend:

Unmodified
Added
Removed
Modified
  • RepositoryHookSystemPlugin

    v1 v1  
     1= turn repository hooks into pluggable extension points =
     2
     3== Description ==
     4
     5The RepositoryHookSystemPlugin is designed to turn repository hooks, such as SVN's post-commit hook, into extension points so that arbitrary trac plugins may be built that have full access to the trac framework to act on repository commits.
     6
     7 * the RepositoryHookSystemPlugin provides an extension point (!IRepositoryHookSubscriber) which may be populated with configurable hooks that have access to their trac environment
     8
     9 * the RepositoryHookSystemPlugin is able to enable and disable its presence in the SVN hooks directory without affecting other plugins
     10
     11 * the trac-post-commit-hook has been converted to a configurable plugin that does ticket changes (see {{{ticketchanger.py}}})
     12
     13 * has a webadmin interface for configuring hooks including figuring out whether or not the plugin has been enabled on a per-project basis
     14
     15 * plugins can be enabled on a per-hook basis
     16
     17 * the listeners are invoked via a command-line call from one of the repository hooks.  This is a one-line command that passes whatever details are necessary to identify the changeset.
     18
     19 * a trac changeset object is used to pass around information.  This is good, as it avoids unneccessary information to be sought by the !RepositoryChangeListeners.  For the SvnChangeListenerPlugin (at least as it stands living only in the post-commit-hook), this is sufficient.  It is unknown whether this is a good idea for other hooks and repository systems.  If a unified interface for a changeset object were available, then a changeset object could be "fakeable" if its not available (like it is at SVN post-commit). If not, this is a big conceptual hole.  ''To be investigated.''
     20
     21 * the logic of the RepositoryChangeListeners is agnostic to SCM type
     22   and hook used.
     23 
     24
     25This is similar in concept to the SvnChangeListenerPlugin, but the architecture is also designed to support
     26
     27 * arbitrary version control systems, with an "adapter" for the version control system used to an implementation capable of hook invocation
     28
     29 * arbitrary hooks, not just post-commit
     30
     31''[BETA] However, while architected, this plugin has only been tested with SVN and will probably only work with the SVN post-commit hook for now [BETA]''.  The reason for this is that the RepositoryHookSystemPlugin uses changeset-like objects as a means of passing data.  This works for SVN's post-commit-hook, but for other hooks it may be necessary to build or mock a changeset object.  I haven't done any work in this direction, though if there is community interest than I would pursue it.
     32
     33
     34
     35== Bugs/Feature Requests ==
     36
     37Existing bugs and feature requests for RepositoryHookSystemPlugin are
     38[report:9?COMPONENT=RepositoryHookSystemPlugin here].
     39
     40If you have any issues, create a
     41[http://trac-hacks.org/newticket?component=RepositoryHookSystemPlugin&owner=k0s new ticket].
     42
     43== Download ==
     44
     45Download the zipped source from [download:repositoryhooksystemplugin here].
     46
     47== Source ==
     48
     49You can check out RepositoryHookSystemPlugin from [http://trac-hacks.org/svn/repositoryhooksystemplugin here] using Subversion, or [source:repositoryhooksystemplugin browse the source] with Trac.
     50
     51== Example ==
     52
     53Example of an SVN  post-commit hook file generated by the RepositoryHookSystem that invokes the listener:
     54
     55{{{
     56#!/bin/bash
     57
     58# trac repository hook system
     59/home/jhammel/20080519133401/bin/python /home/jhammel/20080519133401/src/RepositoryHookSystem/repository_hook_system/listener.py -p /home/jhammel/20080519133401/projects/fooocracy -p /home/jhammel/20080519133401/projects/newproj --hook post-commit $2
     60}}}
     61
     62== Recent Changes ==
     63
     64[[ChangeLog(repositoryhooksystemplugin, 3)]]
     65
     66== Author/Contributors ==
     67
     68'''Author:''' [wiki:k0s] [[BR]]
     69'''Contributors:'''