Title: [90583] trunk/Tools
- Revision
- 90583
- Author
- aro...@apple.com
- Date
- 2011-07-07 11:47:22 -0700 (Thu, 07 Jul 2011)
Log Message
Make Term/ReadKey.pm an optional dependency of commit-log-editor
When Term/ReadKey.pm isn't present, the --regenerate-log switch will be non-functional.
Fixes <http://webkit.org/b/64113> REGRESSION (r90564):
webkitpy.common.checkout.checkout_unittest failing on GTK bots due to missing
Term/ReadKey.pm module
Reviewed by Xan Lopez.
* Scripts/commit-log-editor: Use Module::Load::Conditional::can_load to only load
Term/ReadKey.pm if it's present. If it isn't present, ignore the --regenerate-log switch so
that existing commit messages will be preserved. (Users can manually remove existing commit
messages using git-reset.)
Modified Paths
Diff
Modified: trunk/Tools/ChangeLog (90582 => 90583)
--- trunk/Tools/ChangeLog 2011-07-07 18:43:44 UTC (rev 90582)
+++ trunk/Tools/ChangeLog 2011-07-07 18:47:22 UTC (rev 90583)
@@ -1,5 +1,22 @@
2011-07-07 Adam Roben <aro...@apple.com>
+ Make Term/ReadKey.pm an optional dependency of commit-log-editor
+
+ When Term/ReadKey.pm isn't present, the --regenerate-log switch will be non-functional.
+
+ Fixes <http://webkit.org/b/64113> REGRESSION (r90564):
+ webkitpy.common.checkout.checkout_unittest failing on GTK bots due to missing
+ Term/ReadKey.pm module
+
+ Reviewed by Xan Lopez.
+
+ * Scripts/commit-log-editor: Use Module::Load::Conditional::can_load to only load
+ Term/ReadKey.pm if it's present. If it isn't present, ignore the --regenerate-log switch so
+ that existing commit messages will be preserved. (Users can manually remove existing commit
+ messages using git-reset.)
+
+2011-07-07 Adam Roben <aro...@apple.com>
+
Keep testing that commit messages containing Unicode are handled properly by webkitpy
Fixes <http://webkit.org/b/64109> REGRESSION (r90571): test-webkitpy no longer tests that we
Modified: trunk/Tools/Scripts/commit-log-editor (90582 => 90583)
--- trunk/Tools/Scripts/commit-log-editor 2011-07-07 18:43:44 UTC (rev 90582)
+++ trunk/Tools/Scripts/commit-log-editor 2011-07-07 18:47:22 UTC (rev 90583)
@@ -34,8 +34,8 @@
use File::Basename;
use File::Spec;
use FindBin;
+use Module::Load::Conditional qw(can_load);
use lib $FindBin::Bin;
-use Term::ReadKey;
use VCSUtils;
use webkitdirs;
@@ -157,11 +157,11 @@
$endl = $1 if $logContents =~ /(\r?\n)/;
my $keepExistingLog = 1;
-if ($regenerateLog && $existingLog && scalar(@changeLogs) > 0) {
+if ($regenerateLog && $existingLog && scalar(@changeLogs) > 0 && can_load(modules=>{ 'Term::ReadKey'=>undef })) {
print "Existing log message detected, Use 'r' to regenerate log message from ChangeLogs, or any other key to keep the existing message.\n";
- ReadMode('cbreak');
- my $key = ReadKey(0);
- ReadMode('normal');
+ Term::ReadKey::ReadMode('cbreak');
+ my $key = Term::ReadKey::ReadKey(0);
+ Term::ReadKey::ReadMode('normal');
$keepExistingLog = 0 if ($key eq "r");
}
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes