[SCM] WebKit Debian packaging branch, webkit-1.3, updated. upstream/1.3.7-4207-g178b198

aroben at apple.com aroben at apple.com
Sun Feb 20 23:27:33 UTC 2011


The following commit has been merged in the webkit-1.3 branch:
commit 16f98219be9f2d11e21a0f97014b6c7ec6321140
Author: aroben at apple.com <aroben at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Jan 20 17:11:18 2011 +0000

    Convert paths in environment variables back to msys-style inside commit-log-editor
    
    When this script gets run from inside git commit, msys-style paths in the environment will
    have been turned into Windows-style paths with forward slashes. This screws up functions
    like File::Spec->rel2abs, which seem to rely on $PWD having an msys-style path. We convert
    the paths back to msys-style before doing anything else.
    
    Fixes <http://webkit.org/b/48527> commit-log-editor uses full paths for section headers when
    using msysgit's Perl and multiple ChangeLogs have been edited
    
    Reviewed by David Kilzer.
    
    * Scripts/commit-log-editor: Call fixEnvironment before doing anything else.
    (fixEnvironment): Added. When run in msys in conjunction with git (i.e., when invoked from
    inside git commit), convert Windows-style paths in the environment back to msys-style paths.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76255 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/Tools/ChangeLog b/Tools/ChangeLog
index 6b3f641..12e4c17 100644
--- a/Tools/ChangeLog
+++ b/Tools/ChangeLog
@@ -1,3 +1,21 @@
+2011-01-19  Adam Roben  <aroben at apple.com>
+
+        Convert paths in environment variables back to msys-style inside commit-log-editor
+
+        When this script gets run from inside git commit, msys-style paths in the environment will
+        have been turned into Windows-style paths with forward slashes. This screws up functions
+        like File::Spec->rel2abs, which seem to rely on $PWD having an msys-style path. We convert
+        the paths back to msys-style before doing anything else.
+
+        Fixes <http://webkit.org/b/48527> commit-log-editor uses full paths for section headers when
+        using msysgit's Perl and multiple ChangeLogs have been edited
+
+        Reviewed by David Kilzer.
+
+        * Scripts/commit-log-editor: Call fixEnvironment before doing anything else.
+        (fixEnvironment): Added. When run in msys in conjunction with git (i.e., when invoked from
+        inside git commit), convert Windows-style paths in the environment back to msys-style paths.
+
 2011-01-20  Zoltan Horvath  <zoltan at webkit.org>
 
         [Win] Unreviewed build fix after r76248.
diff --git a/Tools/Scripts/commit-log-editor b/Tools/Scripts/commit-log-editor
index f40295d..2dda7e2 100755
--- a/Tools/Scripts/commit-log-editor
+++ b/Tools/Scripts/commit-log-editor
@@ -38,6 +38,7 @@ use Term::ReadKey;
 use VCSUtils;
 use webkitdirs;
 
+sub fixEnvironment();
 sub normalizeLineEndings($$);
 sub removeLongestCommonPrefixEndingInDoubleNewline(\%);
 sub isCommitLogEditor($);
@@ -59,6 +60,8 @@ if (!$log) {
     usage();
 }
 
+fixEnvironment();
+
 my $baseDir = baseProductDir();
 
 my $editor = $ENV{SVN_LOG_EDITOR};
@@ -282,6 +285,21 @@ if ($foundComment) {
 
 unlink "$log.edit";
 
+sub fixEnvironment()
+{
+    return unless isMsys() && isGit();
+
+    # When this script gets run from inside git commit, msys-style paths in the
+    # environment will have been turned into Windows-style paths with forward
+    # slashes. This screws up functions like File::Spec->rel2abs, which seem to
+    # rely on $PWD having an msys-style path. We convert the paths back to
+    # msys-style here by transforming "c:/foo" to "/c/foo" (e.g.). See
+    # <http://webkit.org/b/48527>.
+    foreach my $key (keys %ENV) {
+        $ENV{$key} =~ s#^([[:alpha:]]):/#/$1/#;
+    }
+}
+
 sub normalizeLineEndings($$)
 {
     my ($string, $endl) = @_;

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list