[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-10851-g50815da

eric at webkit.org eric at webkit.org
Wed Dec 22 18:35:31 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 6b59e1491dd69e182c82835009f60fd722d7eca4
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Dec 14 09:43:46 2010 +0000

    2010-12-14  Eric Seidel  <eric at webkit.org>
    
            Reviewed by Ojan Vafai.
    
            webkit-patch should warn users when they're using a 32-bit git on a 64-bit system
            https://bugs.webkit.org/show_bug.cgi?id=50715
    
            This patch makes webkit-patch print the following:
    
            Warning: This machine is 64-bit, but the git binary (/usr/local/git/bin/git) does not support 64-bit.
            Install a 64-bit git for better performance, see:
            https://lists.webkit.org/pipermail/webkit-dev/2010-December/015249.html
    
            I wrote this mostly because I have approximately 8 machines that I use
            and making sure each one is using a good Git install seemed folly.
            webkit-patch makes a lot of git calls, so using a fast git can shave
            several seconds in every invocation.  See the webkit-dev thread for more info.
    
            This message will print twice during 'webkit-patch upload',
            once from webkit-patch and once from check-webkit-style.
    
            Unfortunately there is no good way to test this due to how machine-dependent
            the code is.  I considered writing a test for the log message, but it seemed not worth it.
    
            * Scripts/webkitpy/common/checkout/scm.py:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@74008 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index 93ede49..6cd2fa9 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,29 @@
+2010-12-14  Eric Seidel  <eric at webkit.org>
+
+        Reviewed by Ojan Vafai.
+
+        webkit-patch should warn users when they're using a 32-bit git on a 64-bit system
+        https://bugs.webkit.org/show_bug.cgi?id=50715
+
+        This patch makes webkit-patch print the following:
+
+        Warning: This machine is 64-bit, but the git binary (/usr/local/git/bin/git) does not support 64-bit.
+        Install a 64-bit git for better performance, see:
+        https://lists.webkit.org/pipermail/webkit-dev/2010-December/015249.html
+
+        I wrote this mostly because I have approximately 8 machines that I use
+        and making sure each one is using a good Git install seemed folly.
+        webkit-patch makes a lot of git calls, so using a fast git can shave
+        several seconds in every invocation.  See the webkit-dev thread for more info.
+
+        This message will print twice during 'webkit-patch upload',
+        once from webkit-patch and once from check-webkit-style.
+
+        Unfortunately there is no good way to test this due to how machine-dependent
+        the code is.  I considered writing a test for the log message, but it seemed not worth it.
+
+        * Scripts/webkitpy/common/checkout/scm.py:
+
 2010-12-13  Eric Seidel  <eric at webkit.org>
 
         Reviewed by Adam Barth.
diff --git a/WebKitTools/Scripts/webkitpy/common/checkout/scm.py b/WebKitTools/Scripts/webkitpy/common/checkout/scm.py
index ee2bb41..ca76214 100644
--- a/WebKitTools/Scripts/webkitpy/common/checkout/scm.py
+++ b/WebKitTools/Scripts/webkitpy/common/checkout/scm.py
@@ -575,6 +575,38 @@ class SVN(SCM):
 class Git(SCM):
     def __init__(self, cwd):
         SCM.__init__(self, cwd)
+        self._check_git_architecture()
+
+    def _machine_is_64bit(self):
+        import platform
+        # This only is tested on Mac.
+        if not platform.mac_ver()[0]:
+            return False
+
+        # platform.architecture()[0] can be '64bit' even if the machine is 32bit:
+        # http://mail.python.org/pipermail/pythonmac-sig/2009-September/021648.html
+        # Use the sysctl command to find out what the processor actually supports.
+        return self.run(['sysctl', '-n', 'hw.cpu64bit_capable']).rstrip() == '1'
+
+    def _executable_is_64bit(self, path):
+        # Again, platform.architecture() fails us.  On my machine
+        # git_bits = platform.architecture(executable=git_path, bits='default')[0]
+        # git_bits is just 'default', meaning the call failed.
+        file_output = self.run(['file', path])
+        return re.search('x86_64', file_output)
+
+    def _check_git_architecture(self):
+        if not self._machine_is_64bit():
+            return
+
+        # We could path-search entirely in python or with
+        # which.py (http://code.google.com/p/which), but this is easier:
+        git_path = self.run(['which', 'git']).rstrip()
+        if self._executable_is_64bit(git_path):
+            return
+
+        webkit_dev_thead_url = "https://lists.webkit.org/pipermail/webkit-dev/2010-December/015249.html"
+        log("Warning: This machine is 64-bit, but the git binary (%s) does not support 64-bit.\nInstall a 64-bit git for better performance, see:\n%s\n" % (git_path, webkit_dev_thead_url))
 
     @classmethod
     def in_working_directory(cls, path):

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list