Bug 1347474 - Update mach to download clang-format 5.0 r297730 r?andi draft
authorSylvestre Ledru <sledru@mozilla.com>
Wed, 15 Mar 2017 11:20:54 +0100
changeset 499241 ae052a8087275318a9d0c55b671673d11807fedd
parent 499008 9702bf6cbeee9877505d9426b86eabff763ad472
child 549293 0856cfe1eab95c3bd5e2ab8f577f7517f28590da
push id49350
push userbmo:sledru@mozilla.com
push dateWed, 15 Mar 2017 14:10:31 +0000
reviewersandi
bugs1347474
milestone55.0a1
Bug 1347474 - Update mach to download clang-format 5.0 r297730 r?andi MozReview-Commit-ID: 69HZXo00gnG
tools/mach_commands.py
--- a/tools/mach_commands.py
+++ b/tools/mach_commands.py
@@ -224,21 +224,21 @@ class FormatProvider(MachCommandBase):
     @Command('clang-format', category='misc',
              description='Run clang-format on current changes')
     @CommandArgument('--show', '-s', action='store_true',
                      help='Show diff output on instead of applying changes')
     def clang_format(self, show=False):
         import urllib2
 
         plat = platform.system()
-        fmt = plat.lower() + "/clang-format-4.0"
-        fmt_diff = "clang-format-diff-4.0"
+        fmt = plat.lower() + "/clang-format-5.0~svn297730"
+        fmt_diff = "clang-format-diff-5.0~svn297730"
 
         # We are currently using an unmodified snapshot of upstream clang-format.
-        # This is a temporary work around until clang 4.0 has been released with our changes.
+        # This is a temporary work around until clang 5.0 has been released with our changes.
         if plat == "Windows":
             fmt += ".exe"
         else:
             arch = os.uname()[4]
             if (plat != "Linux" and plat != "Darwin") or arch != 'x86_64':
                 print("Unsupported platform " + plat + "/" + arch +
                       ". Supported platforms are Windows/*, Linux/x86_64 and Darwin/x86_64")
                 return 1
@@ -282,20 +282,20 @@ class FormatProvider(MachCommandBase):
             args.append("-i")
         cf_process = Popen(args, stdin=diff_process.stdout)
         return cf_process.communicate()[0]
 
     def locate_or_fetch(self, root, python_script=False):
         import urllib2
         import hashlib
         bin_sha = {
-            "Windows": "51ad909026e7adcc9342a199861ab4882d5ecbbd24ec76aee1d620ed5ee93c94079485214a7e4656180fb889ced11fc137aff9b1e08b474af5c21a2506407b7d",  # noqa: E501
-            "Linux": "3f85905248f103c7c6761e622a2a374fa26fe0b90cb78e65496596f39788621871fcf2619092975d362c2001c544fa662ebdca227042ef40369a16f564fe51a8",  # noqa: E501
-            "Darwin": "b07ed6bbb08bf71d8e9985b68e60fc8e9abda05d4b16f2123a188eb35fabb3f0b0123b9224aea7e51cae4cc59ddc25ffce55007fc841a8c30b195961841f850c",  # noqa: E501
-            "python_script": "00d6d6628c9e1af4a250bae09bef27bcb9ba9e325c7ae11de9413d247fa327c512e4a17dd82ba871532038dfd48985a01c4c21f0cb868c531b852d04160cd757",  # noqa: E501
+            "Windows": "0cbfc306df48f01bfe804e5e89cef73b3abe8f884fb7a5208f8895897f19ec45c13760787298192bd37de057d0ded091640c7d504438e06ec880f071a38db89c",  # noqa: E501
+            "Linux": "e6da4f6df074bfb15caefcf7767eb5670c02bb4768ba86ae4ab6b35235b53db012900a4f9e9a950ee140158a19532a71f21b986f511826bebc16f2ef83984e57",  # noqa: E501
+            "Darwin": "18000940a11e5ab0c1fe950d4360292216c8e963dd708679c4c5fb8cc845f5919cef3f58a7e092555b8ea6b8d8a809d66153ea6d1e7c226a2c4f2b0b7ad1b2f3",  # noqa: E501
+            "python_script": "34b6934a48a263ea3f88d48c2981d61ae6698823cfa689b9b0c8a607c224437ca0b9fdd434d260bd790d52a98455e2c2e2c745490d327ba84b4e22b7bb55b757",  # noqa: E501
         }
 
         target = os.path.join(self._mach_context.state_dir, os.path.basename(root))
 
         if not os.path.exists(target):
             tooltool_url = "https://api.pub.build.mozilla.org/tooltool/sha512/"
             if self.prompt and raw_input("Download clang-format executables from {0} (yN)? ".format(tooltool_url)).lower() != 'y':  # noqa: E501,F821
                 print("Download aborted.")