vcs 0.4.0 documentation
Git repository backend.
Tries to clone changes from external location.
Parameters: |
|
---|
Tries to pull changes from external location.
Returns GitChangeset object representing commit from git repository at the given revision or head (most recent commit) if None given.
Returns iterator of GitChangeset objects from start to end (both are inclusive), in ascending date order (unless reverse is set).
Parameters: |
|
---|---|
Raises: |
|
Returns configuration value for a given [section] and name.
Parameters: |
|
---|
Returns (git like) diff, as plain text. Shows changes introduced by rev2 since rev1.
Parameters: |
|
---|
returns absolute path to location where hooks are stored
Returns user’s email from global configuration file.
Parameters: | config_file – A path to file which should be used to retrieve configuration from (might also be a list of file paths) |
---|
Returns user’s name from global configuration file.
Parameters: | config_file – A path to file which should be used to retrieve configuration from (might also be a list of file paths) |
---|
Returns GitInMemoryChangeset object for this repository.
Returns last change made on this repository as datetime object
Tries to pull changes from external location.
Removes tag with the given name.
Parameters: |
|
---|---|
Raises TagDoesNotExistError: | |
if tag with given name does not exists |
Returns list of revisions’ ids, in ascending order. Being lazy attribute allows external tools to inject shas from cache.
Creates and returns a tag for the given revision.
Parameters: |
|
---|---|
Raises TagAlreadyExistError: | |
if tag with same name already exists |
Returns Workdir instance for this repository.
Bases: vcs.backends.base.BaseChangeset
Represents state of the repository at single revision.
Returns string identifying this changeset.
Returns same as raw_id attribute.
Returns raw string identifying this changeset.
Returns raw string identifing this changeset (40-length sha)
Returns shortened version of raw_id attribute, as string, identifying this changeset, useful for web representation.
Returns shortened version of raw_id (first 12 characters)
Returns integer identifying this changeset.
Returns integer representing changeset.
Returns list of parents changesets.
Returns list of parents changesets.
Returns list of added FileNode objects.
Returns list of added FileNode objects.
Returns list of modified FileNode objects.
Returns list of changed FileNode objects.
Returns list of removed FileNode objects.
Returns list of removed RemovedFileNode objects.
Note
Remember that those RemovedFileNode instances are only dummy FileNode objects and trying to access most of it’s attributes or methods would raise NodeError exception.
Returns list of added FileNode objects.
Get’s a fast accessible file changes for given changeset
Returns dictionary with changeset’s attributes and their values.
Returns Author email address for given commit
Returns Author name for given commit
Returns list of modified FileNode objects.
Returns list of children changesets.
Returns Author email address for given commit
Returns Author name for given commit
Fills up given stream.
Parameters: |
|
---|---|
Raises: |
|
Returns iterable archive. Tiny wrapper around fill_archive method.
Parameters: | chunk_size – extra parameter which controls size of returned chunks. Default:8k. |
---|
TODO: This function now uses os underlying ‘git’ command which is generally not good. Should be replaced with algorithm iterating commits.
Returns last commit of the file at the given path.
Returns content of the file at given path.
Returns history of file as reversed list of Changeset objects for which file at given path has been modified.
TODO: This function now uses os underlying ‘git’ and ‘grep’ commands which is generally not good. Should be replaced with algorithm iterating commits.
Returns history of file as reversed list of Changeset objects for which file at given path has been modified.
Returns stat mode of the file at the given path.
Returns size of the file at given path.
Returns generator that yields all file nodes.
Returns string identifying this changeset.
Returns list of parents changesets.
Returns raw string identifying this changeset.
Returns list of removed FileNode objects.
Returns integer identifying this changeset.
Returns RootNode object for this changeset.
Returns shortened version of raw_id attribute, as string, identifying this changeset, useful for web representation.
Returns total number of bytes from contents of all filenodes.
Returns modified, added, removed, deleted files for current changeset
Similar to os.walk method. Insted of filesystem it walks through changeset starting at given topurl. Returns generator of tuples (topnode, dirnodes, filenodes).
Bases: vcs.backends.base.BaseInMemoryChangeset
Marks given FileNode objects as to be committed.
Raises: |
|
---|
Marks given FileNode objects to be changed in next commit.
Raises: |
|
---|
Checks in-memory changeset’s integrity. Also, sets parents if not already set.
Raises CommitError: | |
---|---|
if any error occurs (i.e. NodeDoesNotExistError). |
Performs in-memory commit (doesn’t check workdir in any way) and returns newly created Changeset. Updates repository’s revisions.
Parameters: |
|
---|---|
Raises CommitError: | |
if any error occurs while committing |
Returns generator of paths from nodes marked as added, changed or removed.
Returns list of paths from nodes marked as added, changed or removed.
Marks given FileNode (or RemovedFileNode) objects to be removed in next commit.
Raises: |
|
---|
Resets this instance to initial state (cleans added, changed and removed lists).