Bug 1279048 - Check MOZ_SOURCE_REPO for repository URL; r=ted
☠☠ backed out by 53b24e115c19 ☠ ☠
authorGregory Szorc <gps@mozilla.com>
Wed, 08 Jun 2016 14:54:58 -0700
changeset 304237 229cd3b8bf5dcca4c514fe7315fdf0ac6fa31541
parent 304236 ae11e3061f5b12a1fe131c5bedaa57ea3be9970a
child 304238 53b24e115c194df3cc9cbd9a99959209637a4beb
push id30419
push userphilringnalda@gmail.com
push dateSat, 09 Jul 2016 15:51:15 +0000
treeherdermozilla-central@e3dcf062007e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersted
bugs1279048
milestone50.0a1
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
Bug 1279048 - Check MOZ_SOURCE_REPO for repository URL; r=ted MOZ_SOURCE_REPO is set by automation to indicate the URL of the current repository. I'm not sure what SRCSRV_ROOT is from. Probably legacy. Use MOZ_SOURCE_REPO instead of SRCSRV_ROOT. MozReview-Commit-ID: IfCSiaqgJb5
toolkit/crashreporter/tools/symbolstore.py
--- a/toolkit/crashreporter/tools/symbolstore.py
+++ b/toolkit/crashreporter/tools/symbolstore.py
@@ -131,21 +131,25 @@ rootRegex = re.compile(r'^\S+?:/+(?:[^\s
 
 def read_output(*args):
     (stdout, _) = subprocess.Popen(args=args, stdout=subprocess.PIPE).communicate()
     return stdout.rstrip()
 
 class HGRepoInfo:
     def __init__(self, path):
         self.path = path
-        rev = read_output('hg', '-R', path,
-                          'parent', '--template={node|short}')
-        # Look for the default hg path.  If SRVSRV_ROOT is set, we
+
+        rev = os.environ.get('MOZ_SOURCE_CHANGESET')
+        if not rev:
+            rev = read_output('hg', '-R', path,
+                              'parent', '--template={node|short}')
+
+        # Look for the default hg path. If MOZ_SOURCE_REPO is set, we
         # don't bother asking hg.
-        hg_root = os.environ.get("SRCSRV_ROOT")
+        hg_root = os.environ.get('MOZ_SOURCE_REPO')
         if hg_root:
             root = hg_root
         else:
             root = read_output('hg', '-R', path,
                                'showconfig', 'paths.default')
             if not root:
                 print >> sys.stderr, "Failed to get HG Repo for %s" % path
         cleanroot = None
@@ -153,17 +157,17 @@ class HGRepoInfo:
             match = rootRegex.match(root)
             if match:
                 cleanroot = match.group(1)
                 if cleanroot.endswith('/'):
                     cleanroot = cleanroot[:-1]
         if cleanroot is None:
             print >> sys.stderr, textwrap.dedent("""\
                 Could not determine repo info for %s.  This is either not a clone of the web-based
-                repository, or you have not specified SRCSRV_ROOT, or the clone is corrupt.""") % path
+                repository, or you have not specified MOZ_SOURCE_REPO, or the clone is corrupt.""") % path
             sys.exit(1)
         self.rev = rev
         self.root = root
         self.cleanroot = cleanroot
 
     def GetFileInfo(self, file):
         return HGFileInfo(file, self)
 
@@ -200,17 +204,17 @@ class GitRepoInfo:
             match = rootRegex.match(root)
             if match:
                 cleanroot = match.group(1)
                 if cleanroot.endswith('/'):
                     cleanroot = cleanroot[:-1]
         if cleanroot is None:
             print >> sys.stderr, textwrap.dedent("""\
                 Could not determine repo info for %s (%s).  This is either not a clone of a web-based
-                repository, or you have not specified SRCSRV_ROOT, or the clone is corrupt.""") % (path, root)
+                repository, or you have not specified MOZ_SOURCE_REPO, or the clone is corrupt.""") % (path, root)
             sys.exit(1)
         self.rev = rev
         self.cleanroot = cleanroot
 
     def GetFileInfo(self, file):
         return GitFileInfo(file, self)
 
 class GitFileInfo(VCSFileInfo):
@@ -609,17 +613,17 @@ class Dumper:
         in the proper directory structure in  |symbol_path|; processing is performed
         asynchronously, and Finish must be called to wait for it complete and cleanup.
         All files after the first are fallbacks in case the first file does not process
         successfully; if it does, no other files will be touched."""
         self.output_pid(sys.stderr, "Submitting jobs for files: %s" % str(files))
 
         # tries to get the vcs root from the .mozconfig first - if it's not set
         # the tinderbox vcs path will be assigned further down
-        vcs_root = os.environ.get("SRCSRV_ROOT")
+        vcs_root = os.environ.get('MOZ_SOURCE_REPO')
         for arch_num, arch in enumerate(self.archs):
             self.files_record[files] = 0 # record that we submitted jobs for this tuple of files
             self.SubmitJob(files[-1], 'ProcessFilesWork', args=(files, arch_num, arch, vcs_root, after, after_arg), callback=self.ProcessFilesFinished)
 
     def dump_syms_cmdline(self, file, arch, files):
         '''
         Get the commandline used to invoke dump_syms.
         '''