Edgewall Software

Version 1 (modified by Christopher Lenz, 19 years ago) ( diff )

Placeholder for documenting the versioncontrol layer.

Trac Version Control System API

Trac 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 trac.versioncontrol package.

Accessing the Version Vontrol System

You can get access to a concrete Repository implementation using the get_repository() method of the Environment object:

from trac.env import Environment

env = Environment('/path/to/projenv')
repos = env.get_repository()
try:
    # Do whatever you like with the repository object here
finally:
    repos.close()

See also: TracDev

Note: See TracWiki for help on using the wiki.