pushlog

This helps us query information about Mozilla’s Mercurial repositories.

Documentation found in here: http://mozilla-version-control-tools.readthedocs.org/en/latest/hgmo/pushlog.html

Important notes from the pushlog documentation:

When implementing agents that consume pushlog data, please keep in mind
the following best practices:

* Query by push ID, not by changeset or date.
* Always specify a startID and endID.
* Try to avoid full if possible.
* Always use the latest format version.
* Don't be afraid to ask for a new pushlog feature to make your life easier.
mozci.sources.pushlog.query_pushid_range(repo_url, start_id, end_id, version=2)

Return an ordered list of revisions (newest push id first).

repo - represents the URL to clone a repo start_id - from which pushid to start with (oldest) end_id - from which pushid to end with (most recent) version - version of json-pushes to use (see docs)

mozci.sources.pushlog.query_repo_tip(repo_url)

Return the tip of a branch.

mozci.sources.pushlog.query_revision_info(repo_url, revision, full=False)

Return a dictionary with meta-data about a push including:

  • changesets
  • date
  • user
mozci.sources.pushlog.query_revisions_range(repo_url, from_revision, to_revision, version=2, tipsonly=1)

Return an ordered list of revisions (by date - oldest (starting) first).

repo - represents the URL to clone a repo from_revision - from which revision to start with (oldest) to_revision - from which revision to end with (newest) version - version of json-pushes to use (see docs)

mozci.sources.pushlog.query_revisions_range_from_revision_before_and_after(repo_url, revision, before, after)

Get the start and end revisions based on the number of revisions before and after.

mozci.sources.pushlog.valid_revision(repo_url, revision)

Verify that a revision exists in a given branch.