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

darin at apple.com darin at apple.com
Wed Dec 22 11:55:25 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit dca1e7f781f31c6b6f3efe94359b3b7c55e36aef
Author: darin at apple.com <darin at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Aug 11 12:54:06 2010 +0000

    2010-08-11  Darin Adler  <darin at apple.com>
    
            Reviewed by John Sullivan.
    
            Improved editor options for prepare-ChangeLog and commit-log-editor
            https://bugs.webkit.org/show_bug.cgi?id=40548
    
            * Scripts/commit-log-editor: Split editor strings on spaces so EDITOR
            values like "xed --launch --wait" work properly.
    
            * Scripts/prepare-ChangeLog: Added a new CHANGE_LOG_EDITOR so we can
            use a command line tool with the $openChangeLogs feature.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@65148 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index c27931d..847bc4a 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,16 @@
+2010-08-11  Darin Adler  <darin at apple.com>
+
+        Reviewed by John Sullivan.
+
+        Improved editor options for prepare-ChangeLog and commit-log-editor
+        https://bugs.webkit.org/show_bug.cgi?id=40548
+
+        * Scripts/commit-log-editor: Split editor strings on spaces so EDITOR
+        values like "xed --launch --wait" work properly.
+
+        * Scripts/prepare-ChangeLog: Added a new CHANGE_LOG_EDITOR so we can
+        use a command line tool with the $openChangeLogs feature.
+
 2010-08-11  Yury Semikhatsky  <yurys at chromium.org>
 
         Reviewed by Pavel Feldman.
diff --git a/WebKitTools/Scripts/commit-log-editor b/WebKitTools/Scripts/commit-log-editor
index a642731..bef0a1f 100755
--- a/WebKitTools/Scripts/commit-log-editor
+++ b/WebKitTools/Scripts/commit-log-editor
@@ -62,26 +62,40 @@ if (!$log) {
 my $baseDir = baseProductDir();
 
 my $editor = $ENV{SVN_LOG_EDITOR};
-if (!$editor || isCommitLogEditor($editor)) {
-    $editor = $ENV{CVS_LOG_EDITOR};
-}
-if (!$editor || isCommitLogEditor($editor)) {
+$editor = $ENV{CVS_LOG_EDITOR} if !$editor;
+$editor = "" if isCommitLogEditor($editor);
+
+my $splitEditor = true;
+if (!$editor) {
     my $builtEditorApplication = "$baseDir/Release/Commit Log Editor.app/Contents/MacOS/Commit Log Editor";
-    $editor = $builtEditorApplication if -x $builtEditorApplication;
+    if (-x $builtEditorApplication) {
+        $editor = $builtEditorApplication;
+        $splitEditor = false;
+    }
 }
-if (!$editor || isCommitLogEditor($editor)) {
+if (!$editor) {
     my $builtEditorApplication = "$baseDir/Debug/Commit Log Editor.app/Contents/MacOS/Commit Log Editor";
-    $editor = $builtEditorApplication if -x $builtEditorApplication;
+    if (-x $builtEditorApplication) {
+        $editor = $builtEditorApplication;
+        $splitEditor = false;
+    }
 }
-if (!$editor || isCommitLogEditor($editor)) {
+if (!$editor) {
     my $installedEditorApplication = "$ENV{HOME}/Applications/Commit Log Editor.app/Contents/MacOS/Commit Log Editor";
-    $editor = $installedEditorApplication if -x $installedEditorApplication;
-}
-if (!$editor || isCommitLogEditor($editor)) {
-    $editor = $ENV{EDITOR};
+    if (-x $builtEditorApplication) {
+        $editor = $builtEditorApplication;
+        $splitEditor = false;
+    }
 }
-if (!$editor || isCommitLogEditor($editor)) {
-    $editor = "/usr/bin/vi";
+
+$editor = $ENV{EDITOR} if !$editor;
+$editor = "/usr/bin/vi" if !$editor;
+
+my @editor;
+if ($splitEditor) {
+    @editor = split ' ', $editor;
+} else {
+    @editor = ($editor);
 }
 
 my $inChangesToBeCommitted = !isGit();
@@ -124,9 +138,8 @@ if ($regenerateLog && $existingLog && scalar(@changeLogs) > 0) {
     $keepExistingLog = 0 if ($key eq "r");
 }
 
-# Don't change anything if there's already a log message
-# (as can happen with git-commit --amend)
-exec $editor, @ARGV if $existingLog && $keepExistingLog;
+# Don't change anything if there's already a log message (as can happen with git-commit --amend).
+exec (@editor, @ARGV) if $existingLog && $keepExistingLog;
 
 my $topLevel = determineVCSRoot();
 
@@ -248,7 +261,7 @@ if (isGit() && scalar keys %changeLogSort == 0) {
 print NEWLOG $logContents;
 close NEWLOG;
 
-system $editor, "$log.edit";
+system (@editor, "$log.edit");
 
 open NEWLOG, "$log.edit" or exit;
 my $foundComment = 0;
diff --git a/WebKitTools/Scripts/prepare-ChangeLog b/WebKitTools/Scripts/prepare-ChangeLog
index 1488939..45aca1b 100755
--- a/WebKitTools/Scripts/prepare-ChangeLog
+++ b/WebKitTools/Scripts/prepare-ChangeLog
@@ -433,11 +433,16 @@ if ($spewDiff && @changed_files) {
 # Open ChangeLogs.
 if ($openChangeLogs && @logs) {
     print STDERR "  Opening the edited ChangeLog files.\n";
-    my $editor = $ENV{"CHANGE_LOG_EDIT_APPLICATION"};
+    my $editor = $ENV{CHANGE_LOG_EDITOR};
     if ($editor) {
-        system "open", "-a", $editor, @logs;
+        system ((split ' ', $editor), @logs);
     } else {
-        system "open", "-e", @logs;
+        $editor = $ENV{CHANGE_LOG_EDIT_APPLICATION};
+        if ($editor) {
+            system "open", "-a", $editor, @logs;
+        } else {
+            system "open", "-e", @logs;
+        }
     }
 }
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list