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:
KeyDescriptionDefault value
startMinimum time stamp for commitsnone
stopMaximum time stamp for commitsnone
prefetchTurn pre-fetching of revisions on or offtrue

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 object

See 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.

Valid XHTML 1.0!