Edgewall Software

Changes between Initial Version and Version 1 of TracDev/PluginDevelopment/ExtensionPoints/trac.versioncontrol.api.IRepositoryConnector


Ignore:
Timestamp:
Jul 30, 2014, 10:12:40 PM (8 years ago)
Author:
Peter Suter
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • TracDev/PluginDevelopment/ExtensionPoints/trac.versioncontrol.api.IRepositoryConnector

    v1 v1  
     1== Extension Point : ''IRepositoryConnector'' ==
     2
     3||'''Interface'''||''IRepositoryConnector''||'''Since'''||0.10||
     4||'''Module'''||''trac.versioncontrol.api''||'''Source'''||[source:trunk/trac/versioncontrol/api.py#/IRepositoryConnector api.py]||
     5
     6The ''IRepositoryConnector'' allows components to connect Trac to repositories of new types of [VersionControlSystem version control systems].
     7
     8== Purpose ==
     9Trac can be connected to Version Control systems to e.g. [TracBrowser browse files], [TracChangeset visualize changesets] or [TracRevisionLog revision logs]. Plugins can hook into the version control system to extend the set of repositories that are available in Trac.
     10
     11The main purpose for this interface is to allow plugins to implement support for other version control systems.
     12
     13(For implementing new mechanisms to ''find or register'' the repositories use [../trac.versioncontrol.api.IRepositoryProvider IRepositoryProvider] instead.)
     14
     15== Usage ==
     16
     17Implementing the interface follows the standard guidelines found in [wiki:TracDev/ComponentArchitecture] and of course [wiki:TracDev/PluginDevelopment].
     18
     19The main task is to return a `trac.versioncontrol.api.Repository` instance. A subclass is required to implement the abstract methods, which entails similarly subclassing the `trac.versioncontrol.api.Node` and `trac.versioncontrol.api.Changeset` abstract base classes.
     20
     21Instead of directly inheriting from the base classes mentioned above, you might want to support caching and use `trac.versioncontrol.cache.CachedRepository` and `trac.versioncontrol.cache.CachedChangeset` instead.
     22
     23== Examples ==
     24
     25Due to the complexity of implementing a full version control system connector, no simple example can be provided here.
     26
     27== Available Implementations ==
     28
     29* `tracopt.versioncontrol.svn.svn_fs.SubversionConnector`
     30* `tracopt.versioncontrol.git.git_fs.GitConnector`
     31
     32* See VersionControlSystem#OtherVersioningSystems
     33
     34== Additional Information and References ==
     35
     36 * [apiref:trac.versioncontrol.api.IRepositoryConnector-class epydoc]
     37 * [apidoc:api/trac_versioncontrol_api#trac.versioncontrol.api.IRepositoryConnector API Reference]
     38 * See [../trac.versioncontrol.api.IRepositoryProvider trac.versioncontrol.api.IRepositoryProvider], [../trac.versioncontrol.api.IRepositoryChangeListener trac.versioncontrol.api.IRepositoryChangeListener]
     39 * [TracDev/DatabaseSchema/VersionControl Version control cache database schema]
     40
     41=== API History
     42 * 0.10 introduced the interface (changeset:2669)
     43 * 0.11.1 added the `error` attribute (#6796)
     44 * 0.12 replaced the `authname` parameter with the `params` dictionary (changeset:9125)