Set up a path to be discovered by reviewboard tools
authorGregory Szorc <gps@mozilla.com>
Mon, 02 Dec 2013 15:18:52 +0800
changeset 86 d1eddd779220
parent 85 a791d156bdde
child 87 5c838cba9797
push id63
push usergszorc@mozilla.com
push dateMon, 02 Dec 2013 07:19:17 +0000
Set up a path to be discovered by reviewboard tools
__init__.py
--- a/__init__.py
+++ b/__init__.py
@@ -1474,8 +1474,14 @@ def reposetup(ui, repo):
 
     if not ui.configbool('mozext', 'noautocritic'):
         ui.setconfig('hooks', 'commit.critic', critic_hook)
         ui.setconfig('hooks', 'qrefresh.critic', critic_hook)
 
     if ui.configbool('mozext', 'reject_pushes_with_repo_names', default=False):
         ui.setconfig('hooks', 'prepushkey.reject_repo_names',
             reject_repo_names_hook)
+
+    # Set up a specially named path so reviewboard resolves this repo to
+    # mozilla-central.
+    if not ui.config('paths', 'reviewboard'):
+        uri = resolve_trees_to_uris(['central'])[0][1]
+        ui.setconfig('paths', 'reviewboard', uri)