vcs 0.4.0 documentation
Mercurial backend implementation.
created_on: | Apr 8, 2010 |
---|---|
copyright: |
|
Mercurial repository backend
Raises RepositoryError if repository could not be find at the given repo_path.
Parameters: |
|
---|
List all branches, including closed branches.
Get’s bookmarks for this repository
Returns MercurialChangeset object representing repository’s changeset at the given revision.
Returns iterator of MercurialChangeset objects from start to end (both are inclusive)
Parameters: |
|
---|
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 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 |
Get’s tags for this repository
Returns Workdir instance for this repository.
Bases: vcs.backends.base.BaseChangeset
Represents state of the repository at the single revision.
Returns shorter version of mercurial’s changeset hexes.
Returns raw string identifying this changeset.
Returns raw string identifying this changeset (40-length hex)
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. |
---|
Returns a generator of four element tuples with lineno, sha, changeset lazy loader and line
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.
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 Node object from the given path. If there is no node at the given path, ChangesetError would be raised.
Returns combined DirNode and FileNode objects list representing state of changeset at the given path. If node at the given path is not instance of DirNode, ChangesetError would be raised.
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 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).