Changeset 56540 in webkit
- Timestamp:
- Mar 25, 2010 7:13:56 AM (14 years ago)
- Location:
- trunk/WebKitTools
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebKitTools/ChangeLog
r56539 r56540 1 2010-03-25 Julien Chaffraix <jchaffraix@webkit.org> 2 3 Reviewed by Kenneth Rohde Christiansen. 4 5 commit-log-editor can call itself in an infinite loop 6 https://bugs.webkit.org/show_bug.cgi?id=35291 7 8 if $editor ends up being commit-log-editor, the script will exec itself 9 in an infinite loop. 10 11 To avoid this, we now check that the $editor variable is not 12 commit-log-editor to avoid this case. 13 14 * Scripts/commit-log-editor: Added an isCommitLogEditor method and 15 reworked the $editor setting to add this check. 16 1 17 2010-03-25 Jesus Sanchez-Palencia <jesus.palencia@openbossa.org> 2 18 -
trunk/WebKitTools/Scripts/commit-log-editor
r56484 r56540 41 41 sub normalizeLineEndings($$); 42 42 sub removeLongestCommonPrefixEndingInDoubleNewline(\%); 43 sub isCommitLogEditor($); 43 44 44 45 sub usage … … 62 63 63 64 my $editor = $ENV{SVN_LOG_EDITOR}; 64 if (!$editor ) {65 if (!$editor || isCommitLogEditor($editor)) { 65 66 $editor = $ENV{CVS_LOG_EDITOR}; 66 67 } 67 if (!$editor ) {68 if (!$editor || isCommitLogEditor($editor)) { 68 69 my $builtEditorApplication = "$baseDir/Release/Commit Log Editor.app/Contents/MacOS/Commit Log Editor"; 69 70 $editor = $builtEditorApplication if -x $builtEditorApplication; 70 71 } 71 if (!$editor ) {72 if (!$editor || isCommitLogEditor($editor)) { 72 73 my $builtEditorApplication = "$baseDir/Debug/Commit Log Editor.app/Contents/MacOS/Commit Log Editor"; 73 74 $editor = $builtEditorApplication if -x $builtEditorApplication; 74 75 } 75 if (!$editor ) {76 if (!$editor || isCommitLogEditor($editor)) { 76 77 my $installedEditorApplication = "$ENV{HOME}/Applications/Commit Log Editor.app/Contents/MacOS/Commit Log Editor"; 77 78 $editor = $installedEditorApplication if -x $installedEditorApplication; 78 79 } 79 if (!$editor) { 80 $editor = $ENV{EDITOR} || "/usr/bin/vi"; 80 if (!$editor || isCommitLogEditor($editor)) { 81 $editor = $ENV{EDITOR}; 82 } 83 if (!$editor || isCommitLogEditor($editor)) { 84 $editor = "/usr/bin/vi"; 81 85 } 82 86 … … 308 312 return substr($prefix, 0, $lastDoubleNewline + 2); 309 313 } 314 315 sub isCommitLogEditor($) 316 { 317 my $editor = shift; 318 printf $editor . "\n"; 319 return $editor =~ m/commit-log-editor/; 320 }
Note: See TracChangeset
for help on using the changeset viewer.