Edgewall Software

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

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


  • TracDev/PluginDevelopment/ExtensionPoints/trac.versioncontrol.api.IRepositoryConnector

    v1 v1  
     1== Extension Point : ''IRepositoryConnector'' ==
     4||'''Module'''||''trac.versioncontrol.api''||'''Source'''||[source:trunk/trac/versioncontrol/api.py#/IRepositoryConnector api.py]||
     6The ''IRepositoryConnector'' allows components to connect Trac to repositories of new types of [VersionControlSystem version control systems].
     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.
     11The main purpose for this interface is to allow plugins to implement support for other version control systems.
     13(For implementing new mechanisms to ''find or register'' the repositories use [../trac.versioncontrol.api.IRepositoryProvider IRepositoryProvider] instead.)
     15== Usage ==
     17Implementing the interface follows the standard guidelines found in [wiki:TracDev/ComponentArchitecture] and of course [wiki:TracDev/PluginDevelopment].
     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.
     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.
     23== Examples ==
     25Due to the complexity of implementing a full version control system connector, no simple example can be provided here.
     27== Available Implementations ==
     29* `tracopt.versioncontrol.svn.svn_fs.SubversionConnector`
     30* `tracopt.versioncontrol.git.git_fs.GitConnector`
     32* See VersionControlSystem#OtherVersioningSystems
     34== Additional Information and References ==
     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]
     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)