testing: rename mach -> mozreview
The generic "mach" name didn't make much sense.
--- a/docs/hacking-mozreview.rst
+++ b/docs/hacking-mozreview.rst
@@ -42,17 +42,17 @@ following::
This will create a virtualenv in ``venv/`` with all the necessary
package dependencies. It will also create Docker images for running
Bugzilla. This could take 10-20 minutes to run the first time you run
the command (most of the time is spent creating the Bugzilla Docker
image).
Now, you can create and start a MozReview instance::
- $ ./mach mozreview-start /path/to/instance
+ $ ./mozrevew start /path/to/instance
Bugzilla URL: http://192.168.59.103:57485/
Review Board URL: http://localhost:57486/
Mercurial URL: http://localhost:57487/
Admin username: admin@example.com
Admin password: password
The argument in that command is the path where we will create and store
MozReview data and state. It can be anywhere on the filesystem. You may
@@ -63,49 +63,49 @@ You should be able to load the printed U
working site. If you don't, file a bug!
Creating Repositories
---------------------
MozReview instances are initially empty. They don't have any
repositories you can push to.
-To create an empty repository to hold reviews, use mach::
+To create an empty repository to hold reviews, use mozreview::
- $ ./mach mozreview-create-repo /path/to/mozreview repo_name
+ $ ./mozreview create-repo /path/to/instance repo_name
If all goes well, the URL of the newly-created repository should be
printed. You should then be able to ``hg push`` to that repository.
e.g.::
$ hg push http://localhost:57487/repo_name
Remember to configure your client repository's hgrc to enable the Review
Board client extension and to set up proper Bugzilla credentials! Don't
worry, if something is wrong, the server will tell you during push.
Creating Users
--------------
MozReview instances initially only have a single user: the admin user.
-You'll probably want to set up a regular user account. Using mach::
+You'll probably want to set up a regular user account. Using mozreview::
- $ ./mach mozreview-create-user /path/to/mozreview me@example.com password 'Joe Smith'
+ $ ./mozrevew create-user /path/to/instance me@example.com password 'Joe Smith'
Stopping the Servers
--------------------
-When you run ``mach mozreview-start``, a number of Docker containers and
+When you run ``mozreview start``, a number of Docker containers and
daemon processes will be started. These will linger forever - taking up
system resources - until there is some form of intervention.
The easiest way to stop everything related to the running MozReview
-instance is to run ``mach mozreview-stop``. e.g.::
+instance is to run ``mozreview stop``. e.g.::
- $ ./mach mozreview-stop mozreview
+ $ ./mozreview stop /path/to/instance
Code Locations
==============
``pylib/rbbz`` contains the modifications to Review Board to enable
Bugzilla integration and support for series of reviews.
``pylib/rbmozui`` contains the UI modifications to Review Board.
rename from mach
rename to mozreview
--- a/mach
+++ b/mozreview
@@ -16,14 +16,14 @@ def main(args):
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
+ import vcttesting.mozreview_mach_commands
return m.run(args)
if __name__ == '__main__':
sys.exit(main(sys.argv[1:]))
rename from testing/vcttesting/mach_commands.py
rename to testing/vcttesting/mozreview_mach_commands.py
--- a/testing/vcttesting/mach_commands.py
+++ b/testing/vcttesting/mozreview_mach_commands.py
@@ -15,57 +15,57 @@ from mach.decorators import (
class ServerCommands(object):
def __init__(self, context):
self.context = context
def _get_mozreview(self, where):
from vcttesting.mozreview import MozReview
return MozReview(where)
- @Command('mozreview-start', category='mozreview',
+ @Command('start', category='mozreview',
description='Start a MozReview instance')
@CommandArgument('where', help='Directory for data')
@CommandArgument('--bugzilla-port', type=int,
help='Port Bugzilla HTTP server should listen on.')
@CommandArgument('--reviewboard-port', type=int,
help='Port Review Board HTTP server should listen on.')
@CommandArgument('--mercurial_port', type=int,
help='Port Mercurial HTTP server should listen on.')
- def mozreview_start(self, where, bugzilla_port, reviewboard_port,
+ def start(self, where, bugzilla_port, reviewboard_port,
mercurial_port):
mr = self._get_mozreview(where)
mr.start(bugzilla_port=bugzilla_port,
reviewboard_port=reviewboard_port,
mercurial_port=mercurial_port,
verbose=True)
print('Bugzilla URL: %s' % mr.bugzilla_url)
print('Review Board URL: %s' % mr.reviewboard_url)
print('Mercurial URL: %s' % mr.mercurial_url)
print('Admin username: %s' % mr.admin_username)
print('Admin password: %s' % mr.admin_password)
- @Command('mozreview-stop', category='mozreview',
+ @Command('stop', category='mozreview',
description='Stop a MozReview instance')
@CommandArgument('where', help='Directory of MozReview instance')
- def mozreview_stop(self, where):
+ def stop(self, where):
mr = self._get_mozreview(where)
mr.stop()
- @Command('mozreview-create-repo', category='mozreview',
+ @Command('create-repo', category='mozreview',
description='Add a repository to a MozReview instance')
@CommandArgument('where', help='Directory of MozReview instance')
@CommandArgument('path', help='Relative path of repository')
- def mozreview_create_repo(self, where, path):
+ def create_repo(self, where, path):
mr = self._get_mozreview(where)
url, rbid = mr.create_repository(path)
print('URL: %s' % url)
- @Command('mozreview-create-user', category='mozreview',
+ @Command('create-user', category='mozreview',
description='Create a user in a MozReview instance')
@CommandArgument('where', help='Directory of MozReview instance')
@CommandArgument('email', help='Email address for user')
@CommandArgument('password', help='Password for user')
@CommandArgument('fullname', help='Full name for user')
- def mozreview_create_user(self, where, email, password, fullname):
+ def create_user(self, where, email, password, fullname):
mr = self._get_mozreview(where)
u = mr.create_user(email, password, fullname)
print('Created user %s' % u['id'])