darcsforge.darcs – Darcs Wrapper

Platforms: Python

This is a simple Python-based wrapper around Darcs used in various ways by Darcsforge applications. It isn’t necessary to be used directly, but should provide insight into the functionality of Darcs applications.

DarcsRepository

class darcsforge.darcs.DarcsRepository(repodir, pristine_format=None)

DarcsRepository interacts with darcs

clone(clone_path)
Clone this repository. Note that clone_path should be on the same file system due to the use of get.
clone_tag(clone_path, tag)
Clone this repository at a certain tag. Note that clone_path should be on the same file system due to the use of get.
get_all_changes()

Returns a list of all changes in the darcs repo.

Returns:List of darcsforge.patches.models.Patch
get_current_file(file_path)
Returns the current state of a specific file.
get_current_file_mtime(file_path)
Returns the last modified date of the current state of a specific file.
get_last_changes(last=15)

Returns a list of recent changes in the darcs repo.

Returns:List of darcsforge.patches.models.Patch
get_motd()

Returns this repo’s Message of the Day

Returns:The repo’s prefs/motd
get_owner()

Returns this repo’s owner

Returns:The owner (this repo’s prefs/author)
get_patch_annotate(hash)
Returns the output of Darcs Annotate for a specific patch hash.