]> git.donarmstrong.com Git - lilypond.git/blobdiff - buildscripts/buildlib.py
Merge branch 'lilypond/translation' of ssh://jomand@git.sv.gnu.org/srv/git/lilypond
[lilypond.git] / buildscripts / buildlib.py
index 11dbf96a164dc9a3faa7c54fbb36bd5616bc929d..cd99586ff81038832afcae4b9c31468cde8766b5 100644 (file)
@@ -2,6 +2,7 @@
 
 import subprocess
 import re
+import sys
 
 verbose = False
 
@@ -18,13 +19,13 @@ def read_pipe (command):
         error = code + ' ' + error
     return (output, error)
 
-revision_re = re.compile ('GIT [Cc]ommittish: ([a-f0-9]+)')
+revision_re = re.compile ('GIT [Cc]ommittish:\s+([a-f0-9]+)')
 vc_diff_cmd = 'git diff %(color_flag)s %(revision)s HEAD -- %(original)s | cat'
 
-def check_translated_doc (original, translated_contents, color=False):
+def check_translated_doc (original, translated_file, translated_contents, color=False):
     m = revision_re.search (translated_contents)
     if not m:
-        sys.stderr.write ('error: ' + translated + \
+        sys.stderr.write ('error: ' + translated_file + \
                           ": no 'GIT committish: <hash>' found.\nPlease check " + \
                           'the whole file against the original in English, then ' + \
                           'fill in HEAD committish in the header.\n')