Edgewall Software

Changes between Initial Version and Version 1 of TracDev/VersionControlApi


Ignore:
Timestamp:
May 27, 2005, 8:50:20 AM (19 years ago)
Author:
Christopher Lenz
Comment:

Placeholder for documenting the versioncontrol layer.

Legend:

Unmodified
Added
Removed
Modified
  • TracDev/VersionControlApi

    v1 v1  
     1= Trac Version Control System API =
     2
     3Trac uses a thin abstraction layer between the Trac application code and the code that accesses concrete version control systems. This layer can be found in the [source:/trunk/trac/versioncontrol/main.py#latest trac.versioncontrol] package.
     4
     5== Accessing the Version Vontrol System ==
     6
     7You can get access to a concrete {{{Repository}}} implementation using the {{{get_repository()}}} method of the {{{Environment}}} object:
     8{{{
     9#!python
     10from trac.env import Environment
     11
     12env = Environment('/path/to/projenv')
     13repos = env.get_repository()
     14try:
     15    # Do whatever you like with the repository object here
     16finally:
     17    repos.close()
     18}}}
     19
     20----
     21See also: TracDev