Module pepper.repository
Repository interface. This class can used to examine a repository and gather statistics.
Functions
branches () | Determines and returns a table listing all branches. |
cat (file, id) | Returns the contents of a given file. |
default_branch () | Returns the standard branch of the repository. |
head (branch) | Determines and returns the current HEAD revision. |
iterator (branch, options) | Returns a revision iterator for the given branch. |
revision (id) | Fetches a specific revision. |
tags () | Determines and returns a table listing all tags as tag objects. |
tree (id) | Returns a list of all files in the repository. |
type () | Returns the repository type. |
url () | Returns the repository URL. |
Functions
- branches ()
- Determines and returns a table listing all branches.
- cat (file, id)
-
Returns the contents of a given file.
Parameters
- file: File path, relative to repository root
- id: Optional revision ID, defaults to current (i.e., the HEAD revision)
- default_branch ()
- Returns the standard branch of the repository. For working copies, this is the branch that is curently checked out.
- head (branch)
-
Determines and returns the current HEAD revision.
Parameters
- branch: An optional branch name
- iterator (branch, options)
-
Returns a revision iterator for the given branch. The following options will be added:
Key Description Default value start Minimum time stamp for commits none stop Maximum time stamp for commits none prefetch Turn pre-fetching of revisions on or off true Parameters
- branch: The name of the branch
- options: Optional table with additional parameters
See also:
- revision (id)
-
Fetches a specific revision.
Parameters
- id: The revision ID
Return value:
The revision objectSee also:
- tags ()
-
Determines and returns a table listing all tags as tag objects.
See also:
- tree (id)
-
Returns a list of all files in the repository.
Parameters
- id: Optional revision ID, defaults to current (i.e., the HEAD revision)
- type ()
- Returns the repository type. This is actually the name of the current backend, e.g. "git", "subversion" or "mercurial".
- url ()
- Returns the repository URL.