author Gregory Szorc <>
Tue, 21 Oct 2014 23:46:46 -0700
changeset 359792 db29857ebbd26a8f2bcbb7399095f64d10bffd69
permissions -rwxr-xr-x
mozreview: add high-level APIs and tools for controlling MozReview instances To make it easier for individuals to launch MozReview instances, we add a high-level MozReview class for controlling isolated and local MozReview instances. There is a single start() API where it will spin up Dockerized BMO, a local Review Board server, and a local Mercurial server. A "mach" driver has been added to the root of the repository. It contains commands for manipulating MozReview instances.

#!/usr/bin/env python
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at

import os
import sys

HERE = os.path.abspath(os.path.dirname(__file__))

def main(args):
    activate = os.path.join(HERE, 'venv', 'bin', '')
    execfile(activate, dict(__file__=activate))
    sys.executable = os.path.join(HERE, 'venv', 'bin', 'python')

    sys.path.insert(0, os.path.join(HERE, 'testing'))

    from mach.main import Mach

    m = Mach(os.getcwd())

    m.define_category('mozreview', 'MozReview',
        'Mozilla Code Review Service', 50)
    import vcttesting.mach_commands


if __name__ == '__main__':