Package tracopt :: Package versioncontrol :: Package git :: Module git_fs :: Class GitCachedRepository

Class GitCachedRepository

source code

                            object --+        
                                     |        
    trac.versioncontrol.api.Repository --+    
                                         |    
trac.versioncontrol.cache.CachedRepository --+
                                             |
                                            GitCachedRepository

Git-specific cached repository.
Nested Classes

Inherited from trac.versioncontrol.api.Repository: __metaclass__

Instance Methods
 
display_rev(self, rev)
Return a string representation of a revision in the repos for displaying to the user.
source code
 
short_rev(self, path)
Return a compact string representation of a revision in the repos.
source code
 
normalize_rev(self, rev)
Return a (unique) canonical representation of a revision.
source code
 
get_youngest_rev(self)
Return the youngest revision in the repository.
source code
 
child_revs(self, rev) source code
 
get_changesets(self, start, stop)
Generate Changeset belonging to the given time period (start, stop).
source code
 
get_changeset(self, rev)
Retrieve a Changeset corresponding to the given revision rev.
source code
 
sync(self, feedback=None, clean=False)
Perform a sync of the repository cache, if relevant.
source code

Inherited from trac.versioncontrol.cache.CachedRepository: __init__, close, db_rev, get_base, get_changes, get_changeset_uid, get_node, get_oldest_rev, get_path_history, get_path_url, get_quickjump_entries, has_node, insert_changeset, next_rev, normalize_path, parent_revs, previous_rev, remove_cache, rev_db, rev_older_than, save_metadata, sync_changeset

Inherited from trac.versioncontrol.api.Repository: __repr__, can_view, clear, is_viewable

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables

Inherited from trac.versioncontrol.cache.CachedRepository: __abstractmethods__, has_linear_changesets

Inherited from trac.versioncontrol.api.Repository: realm

Properties

Inherited from trac.versioncontrol.cache.CachedRepository: metadata, scope

Inherited from trac.versioncontrol.api.Repository: oldest_rev, resource, youngest_rev

Inherited from object: __class__

Method Details

display_rev(self, rev)

source code 

Return a string representation of a revision in the repos for displaying to the user.

This can be a shortened revision string, e.g. for repositories using long hashes.

Raises:
Overrides: trac.versioncontrol.api.Repository.display_rev
(inherited documentation)

short_rev(self, path)

source code 
Return a compact string representation of a revision in the repos.
Raises:
Overrides: trac.versioncontrol.api.Repository.short_rev
(inherited documentation)

normalize_rev(self, rev)

source code 

Return a (unique) canonical representation of a revision.

It's up to the backend to decide which string values of rev (usually provided by the user) should be accepted, and how they should be normalized. Some backends may for instance want to match against known tags or branch names.

In addition, if rev is None or '', the youngest revision should be returned.

Raises:
Overrides: trac.versioncontrol.api.Repository.normalize_rev
(inherited documentation)

get_youngest_rev(self)

source code 
Return the youngest revision in the repository.
Overrides: trac.versioncontrol.api.Repository.get_youngest_rev
(inherited documentation)

get_changesets(self, start, stop)

source code 
Generate Changeset belonging to the given time period (start, stop).
Overrides: trac.versioncontrol.api.Repository.get_changesets
(inherited documentation)

get_changeset(self, rev)

source code 
Retrieve a Changeset corresponding to the given revision rev.
Overrides: trac.versioncontrol.api.Repository.get_changeset
(inherited documentation)

sync(self, feedback=None, clean=False)

source code 

Perform a sync of the repository cache, if relevant.

If given, rev_callback must be a callable taking a rev parameter. The backend will call this function for each rev it decided to synchronize, once the synchronization changes are committed to the cache. When clean is True, the cache is cleaned first.

Overrides: trac.versioncontrol.api.Repository.sync
(inherited documentation)