Bug 1184594 - git 'repo' is not deployed correctly on build machines managed by buildbot. r=hwine
☠☠ backed out by 07ff7cf012bc ☠ ☠
authorRail Aliiev <rail@mozilla.com>
Thu, 30 Jul 2015 08:22:35 -0400
changeset 287124 88ef4fbf5d6b66dd5fd99115f1b83e97bcac23e8
parent 287123 73828c770d56077218c0549e86101a103ad354d0
child 287125 07ff7cf012bcd0562c6235a99b5fdb2bf6fa4d8d
push id5067
push userraliiev@mozilla.com
push dateMon, 21 Sep 2015 14:04:52 +0000
treeherdermozilla-beta@14221ffe5b2f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewershwine
bugs1184594
milestone42.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 1184594 - git 'repo' is not deployed correctly on build machines managed by buildbot. r=hwine
testing/mozharness/mozharness/mozilla/building/buildb2gbase.py
--- a/testing/mozharness/mozharness/mozilla/building/buildb2gbase.py
+++ b/testing/mozharness/mozharness/mozilla/building/buildb2gbase.py
@@ -342,16 +342,21 @@ class B2GBuildBaseScript(BuildbotMixin, 
 
         # self.vcs_checkout already retries, so no need to wrap it in
         # self.retry. We set the error_level to ERROR to prevent it going fatal
         # so we can do our own handling here.
         retval = self.vcs_checkout_repos(repos, error_level=ERROR)
         if not retval:
             self.rmtree(repo_dir)
             self.fatal("Automation Error: couldn't clone repo", exit_code=4)
+        # Repo self-updates if the checkout is on a detached head. Creating a
+        # branch works around the problem.
+        git = self.query_exe("git")
+        self.run_command([git, 'checkout', '-B', 'tmp_moz_branch', repo_rev],
+                         cwd=repo_dir, halt_on_failure=True)
         return retval
 
     def checkout_tools(self):
         dirs = self.query_abs_dirs()
 
         # We need hg.m.o/build/tools checked out
         self.info("Checking out tools")
         repos = [{