Bug 965120 - Use .clang-format to set tree default format; r=gps
authorAnthony Jones <ajones@mozilla.com>
Thu, 30 Jan 2014 14:27:44 +1300
changeset 165930 4a77a99c84d52788958b2647d82b8bd8bc010cdb
parent 165929 d44de38ad97f2aaeb289ca3d90cd956845d39c4c
child 165931 f99313fc00b5823ce92ba4671727c7209d692389
push id4675
push usercbook@mozilla.com
push dateThu, 30 Jan 2014 11:10:27 +0000
treeherderfx-team@865849d1be82 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgps
bugs965120
milestone29.0a1
Bug 965120 - Use .clang-format to set tree default format; r=gps
.clang-format
.clang-format-ignore
tools/mach_commands.py
new file mode 100644
--- /dev/null
+++ b/.clang-format
@@ -0,0 +1,1 @@
+BasedOnStyle: Mozilla
--- a/.clang-format-ignore
+++ b/.clang-format-ignore
@@ -1,2 +1,3 @@
 \mfbt/
 \js/
+\media/
--- a/tools/mach_commands.py
+++ b/tools/mach_commands.py
@@ -351,17 +351,17 @@ class FormatProvider(MachCommandBase):
 
         except urllib2.HTTPError as e:
             print("HTTP error {0}: {1}".format(e.code, e.reason))
             return 1
 
         from subprocess import Popen, PIPE
         p1 = Popen(["hg", "diff", "-U0", "-r", "tip^", "--include", "glob:**.c", "--include", "glob:**.cpp",
                    "--include", "glob:**.h", "--exclude", "listfile:.clang-format-ignore"], stdout=PIPE)
-        args = [sys.executable, clang_format_diff, "-p1", "-style=Mozilla"]
+        args = [sys.executable, clang_format_diff, "-p1"]
         if not show:
            args.append("-i")
         p2 = Popen(args, stdin=p1.stdout)
         return p2.communicate()[0]
 
     def locate_or_fetch(self, root):
         target = os.path.join(self._mach_context.state_dir, os.path.basename(root))
         if not os.path.exists(target):