Package trac :: Package versioncontrol :: Package web_ui :: Package tests :: Module log :: Class MockRepository

Class MockRepository

source code

    object --+    
             |    
api.Repository --+
                 |
                MockRepository

Nested Classes

Inherited from api.Repository: __metaclass__

Instance Methods
 
get_youngest_rev(self)
Return the youngest revision in the repository.
source code
 
normalize_path(self, path)
Return a canonical representation of path in the repos.
source code
 
normalize_rev(self, rev)
Return a (unique) canonical representation of a revision.
source code
 
get_node(self, path, rev)
Retrieve a Node from the repository at the given path.
source code
 
get_changeset(self, rev)
Retrieve a Changeset corresponding to the given revision rev.
source code
 
previous_rev(self, rev, path='')
Return the revision immediately preceding the specified revision.
source code
 
get_path_history(self, path, rev=None, limit=None)
Retrieve all the revisions containing this path.
source code
 
rev_older_than(self, rev1, rev2)
Provides a total order over revisions.
source code
 
close(self)
Close the connection to the repository.
source code
 
get_changes(self, *args, **kwargs)
Return the oldest revision stored in the repository.
source code
 
get_oldest_rev(self, *args, **kwargs)
Return the oldest revision stored in the repository.
source code
 
next_rev(self, *args, **kwargs)
Return the oldest revision stored in the repository.
source code

Inherited from api.Repository: __init__, __repr__, can_view, clear, display_rev, get_base, get_changeset_uid, get_changesets, get_path_url, get_quickjump_entries, has_node, is_viewable, parent_revs, short_rev, sync, sync_changeset

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

Class Variables
  has_linear_changesets = True
  __abstractmethods__ = frozenset([])

Inherited from api.Repository: realm, scope

Properties

Inherited from api.Repository: oldest_rev, resource, youngest_rev

Inherited from object: __class__

Method Details

get_youngest_rev(self)

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

normalize_path(self, path)

source code 
Return a canonical representation of path in the repos.
Overrides: api.Repository.normalize_path
(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: api.Repository.normalize_rev
(inherited documentation)

get_node(self, path, rev)

source code 

Retrieve a Node from the repository at the given path.

A Node represents a directory or a file at a given revision in the repository. If the rev parameter is specified, the Node corresponding to that revision is returned, otherwise the Node corresponding to the youngest revision is returned.

Overrides: api.Repository.get_node
(inherited documentation)

get_changeset(self, rev)

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

previous_rev(self, rev, path='')

source code 

Return the revision immediately preceding the specified revision.

If path is given, filter out ancestor revisions having no changes below path.

In presence of multiple parents, this follows the first parent.

Overrides: api.Repository.previous_rev
(inherited documentation)

get_path_history(self, path, rev=None, limit=None)

source code 

Retrieve all the revisions containing this path.

If given, rev is used as a starting point (i.e. no revision ''newer'' than rev should be returned). The result format should be the same as the one of Node.get_history()

Overrides: api.Repository.get_path_history
(inherited documentation)

rev_older_than(self, rev1, rev2)

source code 

Provides a total order over revisions.

Return True if rev1 is an ancestor of rev2.

Overrides: api.Repository.rev_older_than
(inherited documentation)

close(self)

source code 
Close the connection to the repository.
Overrides: api.Repository.close
(inherited documentation)

get_changes(self, *args, **kwargs)

source code 
Return the oldest revision stored in the repository.
Overrides: api.Repository.get_changes
(inherited documentation)

get_oldest_rev(self, *args, **kwargs)

source code 
Return the oldest revision stored in the repository.
Overrides: api.Repository.get_oldest_rev
(inherited documentation)

next_rev(self, *args, **kwargs)

source code 
Return the oldest revision stored in the repository.
Overrides: api.Repository.next_rev
(inherited documentation)