From 96e202b2aa4329362b479616abee4f5814bab496 Mon Sep 17 00:00:00 2001 From: Steve McIntyre Date: Fri, 8 Jun 2018 22:31:24 +0100 Subject: Fixes for check_trans.pl If we're looking at an original language that's not english, don't look for commit hashes in the english version If we can't count changes for some reason, report that. If we can't get details for an original file, report the version as rather than spurt errors. --- check_trans.pl | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'check_trans.pl') diff --git a/check_trans.pl b/check_trans.pl index e8020d84a32..d87e0d8c793 100755 --- a/check_trans.pl +++ b/check_trans.pl @@ -240,6 +240,8 @@ sub verbose; # and find the correct revision info for this file $revinfo_orig = { $VCS->file_info( $file_orig ) }; + + $orig = $original_lang; } } @@ -393,7 +395,9 @@ sub verbose; my $delta; $delta = $VCS->count_changes( $file_orig, $rev_transl, 'HEAD' ); - + if (!defined $delta) { + print "ERROR: Can't get details for orig file $file_orig\n"; + } if ( $delta >= $maxdelta ) { push @{ $emails_to_send{'maxdelta'} }, { @@ -1077,6 +1081,9 @@ sub check_file my $translation_translator = $transcheck->maintainer() || undef; my $translation_maxdelta = $transcheck->maxdelta() || undef; + if (!defined $orig_last_change) { + $orig_last_change = ""; + } verbose "Checking $file_translation, $orig revision $orig_last_change"; # status information -- cgit v1.2.3