Backed out changeset e36d161eef9b (bug 1127801), further theories, CLOSED TREE
authorWes Kocher <wkocher@mozilla.com>
Wed, 25 Mar 2015 15:28:18 -0700
changeset 266073 aeea3711e05ceae3e3a59e73a2a646597859cb1c
parent 266072 8aaa0b07dda62a42176a72a81b5809c501386e8a
child 266074 313dfa7058c837f0e3a38950971ff6cd24448d24
push id830
push userraliiev@mozilla.com
push dateFri, 19 Jun 2015 19:24:37 +0000
treeherdermozilla-release@932614382a68 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1127801
milestone39.0a1
backs oute36d161eef9b37c39cf4d40cdbd7229f78a55ddd
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backed out changeset e36d161eef9b (bug 1127801), further theories, CLOSED TREE
python/mozbuild/mozbuild/milestone.py
--- a/python/mozbuild/mozbuild/milestone.py
+++ b/python/mozbuild/mozbuild/milestone.py
@@ -1,14 +1,13 @@
 # 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 http://mozilla.org/MPL/2.0/.
 
 from __future__ import print_function, unicode_literals
-from mozbuild.base import MozbuildObject
 
 import argparse
 import os
 import re
 import sys
 
 
 def get_milestone_ab_with_num(milestone):
@@ -22,19 +21,16 @@ def get_milestone_ab_with_num(milestone)
 
     return ""
 
 
 def get_official_milestone(path):
     """
     Returns the contents of the first line in `path` that starts with a digit.
     """
-    if path is None:
-        build = MozbuildObject.from_environment()
-        path = os.path.join(build.topsrcdir,'config','milestone.txt')
 
     with open(path) as fp:
         for line in fp:
             line = line.strip()
             if line[:1].isdigit():
                 return line
 
     raise Exception("Didn't find a line that starts with a digit.")
@@ -47,20 +43,21 @@ def get_milestone_major(milestone):
 
     return milestone.split('.')[0]
 
 
 def main(args):
     parser = argparse.ArgumentParser()
     parser.add_argument('--uaversion', default=False, action='store_true')
     parser.add_argument('--symbolversion', default=False, action='store_true')
+    parser.add_argument('--topsrcdir', metavar='TOPSRCDIR', required=True)
     options = parser.parse_args(args)
 
-    build = MozbuildObject.from_environment()
-    milestone_file = os.path.join(build.topsrcdir, 'config', 'milestone.txt')
+    milestone_file = os.path.join(options.topsrcdir, 'config', 'milestone.txt')
+
     milestone = get_official_milestone(milestone_file)
 
     if options.uaversion:
         # Only expose the major milestone in the UA string, hide the patch
         # level (bugs 572659 and 870868).
         uaversion = "%s.0" % (get_milestone_major(milestone),)
         print(uaversion)