Make Term/ReadKey.pm an optional dependency of commit-log-editor
authoraroben@apple.com <aroben@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 7 Jul 2011 18:47:22 +0000 (18:47 +0000)
committeraroben@apple.com <aroben@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 7 Jul 2011 18:47:22 +0000 (18:47 +0000)
commit1cf9bfe2b8e1e0534db713b56d2d8cf3acf5f4d4
tree12dfbb9d5fdf7d310a7c4dea634e4544de37860b
parent72cb237b5a3094333a573b65961e98216b6f26e1
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.)

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@90583 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Tools/ChangeLog
Tools/Scripts/commit-log-editor