asv.plugins.mercurial

Supports mercurial repositories for the benchmarked project.

Attributes

Classes

Hg

Base class for repository handlers.

Module Contents

asv.plugins.mercurial.hglib = None[source]
class asv.plugins.mercurial.Hg(url, mirror_path)[source]

Base class for repository handlers.

There are no commands that modify the source repository.

dvcs = 'hg'[source]
_default_branch = 'default'[source]
_encoding = 'utf-8'[source]
_repo = None[source]
_path = b'.'[source]
_pulled = False[source]
__del__()[source]
_decode(item)[source]
_encode(item)[source]
_encode_filename(filename)[source]
classmethod is_local_repo(path)[source]
classmethod url_match(url)[source]

Returns True if the url is of the right type for this kind of repository.

get_range_spec(commit_a, commit_b)[source]

Returns a formatted string giving the results between commit_a (exclusive) and commit_b (inclusive).

get_new_range_spec(latest_result, branch=None)[source]

Returns a formatted string giving the results between the latest result and the newest hash in a given branch. If no branch given, use the ‘main’ branch.

pull()[source]
checkout(path, commit_hash)[source]

Check out a clean working tree from the current repository to the given path

Parameters

pathstr

The local path to check out into

commit_hashstr

The commit hash to check out

get_date(hash)[source]

Get a JavaScript timestamp for a particular commit.

get_hashes_from_range(range_spec, **kwargs)[source]

Get a list of commit hashes given a range specifier. The syntax of the range specifier will depend on the DVCS used.

get_hash_from_name(name)[source]

Get a hash from a given tag, branch or hash. The acceptable syntax will depend on the DVCS used.

get_hash_from_parent(name)[source]

Checkout the parent of the currently checked out commit.

get_name_from_hash(commit)[source]

Get a symbolic name for a commit, if it exists. The name is resolvable back to the has via get_hash_form_name. If there is no symbolic name, returns None.

get_tags()[source]

Get a dict of all of the tags defined in the repo and their corresponding commit hash

get_date_from_name(name)[source]

Get a JavaScript timestamp for a particular name.

get_branch_commits(branch)[source]

Returns the ordered list (last commit first) of all commits in branch following first parent in case of merge

get_revisions(commits)[source]