Skip to main content

Fast cache for Mozilla's Mercurial repository

Project description

More Mercurial (Hg)!
====================

Uses ElasticSearch as a fast cache for Mozilla's Mercurial repository.

Status
------

+----------+------------------+
| Branch | Status |
+==========+==================+
| master | |Build Status| |
+----------+------------------+
| dev | |Build Status| |
+----------+------------------+

Usage
-----

Make an instance of the cache, modifying the parameters to fit your use
case

.. code:: python

hg = HgMozillaOrg({
"use_cache": true,
"hg":{
"url": "https://hg.mozilla.org"
},
"branches": {
"host": "http://localhost",
"port": 9200,
"index": "branches",
"type": "branch",
"timeout": 300,
"schema": {
"$ref": "//../resources/branch.json"
},
"debug": false,
"limit_replicas": false
},
"repo": {
"host": "http://localhost",
"port": 9200,
"index": "repo",
"type": "revision",
"timeout": 300,
"schema": {
"$ref": "//../resources/revision.json"
},
"debug": false,
"limit_replicas": false
}
})

then call ``get_revision()`` when you need a revision:

.. code:: python

rev = hg.get_revision({
"changeset":{"id": "b3649fd5cd7a76506d2cf04f45e39cbc972fb553"},
"branch": {"name": "mozilla-inbound"}
})

... and yes, the call really does require a "complicated" dict
parameter: The intent was to convert partial revision objects into
completed revision objects.

.. |Build Status| image:: https://travis-ci.org/mozilla/mo-hg.svg?branch=master
:target: https://travis-ci.org/mozilla/mo-hg
.. |Build Status| image:: https://travis-ci.org/mozilla/mo-hg.svg?branch=dev
:target: https://travis-ci.org/mozilla/mo-hg
.. |Build Status| image:: https://travis-ci.org/mozilla/mo-hg.svg?branch=master
:target: https://travis-ci.org/mozilla/mo-hg
.. |Build Status| image:: https://travis-ci.org/mozilla/mo-hg.svg?branch=dev
:target: https://travis-ci.org/mozilla/mo-hg

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mo-hg-1.8.18065.tar.gz (13.8 kB view details)

Uploaded Source

File details

Details for the file mo-hg-1.8.18065.tar.gz.

File metadata

  • Download URL: mo-hg-1.8.18065.tar.gz
  • Upload date:
  • Size: 13.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for mo-hg-1.8.18065.tar.gz
Algorithm Hash digest
SHA256 42cb2cbbd4abaa8df6f8db0c676e557dbdf159990460368d8268842fb65d3a14
MD5 bd13fd95283dd236c2c993ad3ce42954
BLAKE2b-256 473fde3932ae2440887a99c0fd678d3ab37ef19851af01313713b2000351800b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page