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

aroben at apple.com aroben at apple.com
Wed Dec 22 15:28:25 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 97fcc2a0baa1a167c1bdc6ab6d5a4602f8367a23
Author: aroben at apple.com <aroben at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Nov 4 11:33:08 2010 +0000

    Always use uppercase drive names in strings returned by abspath_to_uri
    
    Some versions of cygpath use lowercase drive letters while others use
    uppercase, which makes it hard to test the output of code that uses
    cygpath.
    
    Fixes <http://webkit.org/b/48914> webkitpy.common.system.path_unittest
    fails with Cygwin 1.5
    
    Reviewed by Eric Seidel.
    
    * Scripts/webkitpy/common/system/path.py:
    (cygpath): Updated the docstring to indicate that only absolute paths
    should be passed for now (though relative paths will work fine).
    (_Cygpath.convert): Upper-case the first letter of the converted Windows path.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@71321 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index 86b6624..3671916 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,21 @@
+2010-11-03  Adam Roben  <aroben at apple.com>
+
+        Always use uppercase drive names in strings returned by abspath_to_uri
+
+        Some versions of cygpath use lowercase drive letters while others use
+        uppercase, which makes it hard to test the output of code that uses
+        cygpath.
+
+        Fixes <http://webkit.org/b/48914> webkitpy.common.system.path_unittest
+        fails with Cygwin 1.5
+
+        Reviewed by Eric Seidel.
+
+        * Scripts/webkitpy/common/system/path.py:
+        (cygpath): Updated the docstring to indicate that only absolute paths
+        should be passed for now (though relative paths will work fine).
+        (_Cygpath.convert): Upper-case the first letter of the converted Windows path.
+
 2010-11-03  George Guo  <George.Guo at Nokia.com>
 
         Reviewed by Andreas Kling.
diff --git a/WebKitTools/Scripts/webkitpy/common/system/path.py b/WebKitTools/Scripts/webkitpy/common/system/path.py
index 43c6410..09787d7 100644
--- a/WebKitTools/Scripts/webkitpy/common/system/path.py
+++ b/WebKitTools/Scripts/webkitpy/common/system/path.py
@@ -44,7 +44,7 @@ def abspath_to_uri(path, platform=None):
 
 
 def cygpath(path):
-    """Converts a cygwin path to Windows path."""
+    """Converts an absolute cygwin path to an absolute Windows path."""
     return _CygPath.convert_using_singleton(path)
 
 
@@ -103,7 +103,11 @@ class _CygPath(object):
             self.start()
         self._child_process.stdin.write("%s\r\n" % path)
         self._child_process.stdin.flush()
-        return self._child_process.stdout.readline().rstrip()
+        windows_path = self._child_process.stdout.readline().rstrip()
+        # Some versions of cygpath use lowercase drive letters while others
+        # use uppercase. We always convert to uppercase for consistency.
+        windows_path = '%s%s' % (windows_path[0].upper(), windows_path[1:])
+        return windows_path
 
 
 def _escape(path):

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list