vcs v0.2.1.dev documentation
Git backend implementation.
created_on: | Apr 8, 2010 |
---|---|
copyright: |
|
Git repository backend.
Tries to clone changes from external location. if update_after_clone is set To false it’ll prevent the runing update on workdir
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: |
|
Removes tag with the given name.
Parameters: |
|
---|---|
Raises TagDoesNotExistError: | |
if tag with given name does not exists |
Runs given cmd as git command and returns tuple (returncode, stdout, stderr).
Note
This method exists only until log/blame functionality is implemented at Dulwich (see https://bugs.launchpad.net/bugs/645142). Parsing os command’s output is road to hell...
Parameters: | cmd – git command to be executed |
---|
Creates and returns a tag for the given revision.
Parameters: |
|
---|---|
Raises TagAlreadyExistError: | |
if tag with same name already exists |
Bases: vcs.backends.base.BaseChangeset
Represents state of the repository at single revision.
Returns same as raw_id attribute.
Returns raw string identifing this changeset (40-length sha)
Returns shortened version of raw_id (first 12 characters)
Returns integer representing changeset.
Returns list of parents changesets.
Returns list of added FileNode objects.
Returns list of changed 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.
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. |
---|
Returns a list of three element tuples with lineno,changeset and line
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 stat mode of the file at the given path.
Returns size of the file at given path.
Returns generator that yields all file nodes.
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).