]> git.donarmstrong.com Git - lilypond.git/blobdiff - buildscripts/output-distance.py
Merge branch 'lilypond/translation' of ssh://jomand@git.sv.gnu.org/srv/git/lilypond
[lilypond.git] / buildscripts / output-distance.py
index 6ab955cec72b179f58c549690595961738b8e042..8586d2481ab9cb9beb45bcd06c4b64685eee63b7 100644 (file)
@@ -28,7 +28,7 @@ class TempDirectory:
         print 'dir is', self.dir
     def __del__ (self):
         print 'rm -rf %s' % self.dir 
-        os.system ('rm -rf %s' % self.dir )
+        os.system ('rm -rf %s' % self.dir)
     def __call__ (self):
         return self.dir
 
@@ -436,7 +436,6 @@ class FileCompareLink (FileLink):
             return 0.0
         else:
             return 100.0;
-
         
     def get_content (self, f):
         print 'reading', f
@@ -444,8 +443,6 @@ class FileCompareLink (FileLink):
         return s
 
 
-
-
 class GitFileCompareLink (FileCompareLink):
     def get_cell (self, oldnew):
         str = self.contents[oldnew]
@@ -487,6 +484,11 @@ class TextFileCompareLink (FileCompareLink):
         str = '<font size="-2"><pre>%s</pre></font>' % str
         return str
 
+class LogFileCompareLink (TextFileCompareLink):
+  def get_content (self, f):
+      c = TextFileCompareLink.get_content (self, f)
+      c = re.sub ("\nProcessing `[^\n]+'\n", '', c)
+      return c
         
 class ProfileFileLink (FileCompareLink):
     def __init__ (self, f1, f2):
@@ -609,8 +611,8 @@ class SignatureFileLink (FileLink):
                 outfile = (dest_dir + '/' + f).replace ('.eps', '.png')
                 data_option = ''
                 if options.local_data_dir:
-                    data_option = ('-slilypond-datadir=%s/share/lilypond/current '
-                                   % os.path.split(infile)[0])
+                    data_option = ('-slilypond-datadir=%s/../share/lilypond/current '
+                                   % os.path.dirname(infile))
                 
                 mkdir (os.path.split (outfile)[0])
                 cmd = ('gs -sDEVICE=png16m -dGraphicsAlphaBits=4 -dTextAlphaBits=4 '
@@ -771,7 +773,7 @@ def paired_files (dir1, dir2, pattern):
         
     pairs = []
     missing = []
-    for f in files[0].keys ():
+    for f in files[0]:
         try:
             files[1].pop (f)
             pairs.append (f)
@@ -845,7 +847,7 @@ class ComparisonData:
             ext = os.path.splitext (f1)[1]
             klasses = {
                 '.midi': MidiFileLink,
-                '.log' : TextFileCompareLink,
+                '.log' : LogFileCompareLink,
                 '.profile': ProfileFileLink,
                 '.gittxt': GitFileCompareLink, 
                 }