]> git.donarmstrong.com Git - lilypond.git/commitdiff
Regtest script: Keep the folder prefix in the name.
authorJulien Rioux <jrioux@physics.utoronto.ca>
Sat, 14 Jan 2012 20:53:33 +0000 (15:53 -0500)
committerJulien Rioux <jrioux@physics.utoronto.ca>
Mon, 16 Jan 2012 20:30:11 +0000 (15:30 -0500)
Two files with the same basename can occur under
two different folders. They should be tracked as
two separate files.

scripts/build/output-distance.py

index 63b2853dae34411642ae06cba9a54059a4bbc512..cf213da8b13d0717e80b14ae38ebc1b9f785832b 100755 (executable)
@@ -887,14 +887,18 @@ class ComparisonData:
                 self.compare_general_files (klasses[ext], f1, f2)
 
     def compare_general_files (self, klass, f1, f2):
+        prefix = os.path.commonprefix ([f1, f2])
         name = os.path.split (f1)[1]
+        name = os.path.join (prefix, name)
 
         file_link = klass (f1, f2)
         self.file_links[name] = file_link
 
     def compare_signature_files (self, f1, f2):
+        prefix = os.path.commonprefix ([f1, f2])
         name = os.path.split (f1)[1]
         name = re.sub ('-[0-9]+.signature', '', name)
+        name = os.path.join (prefix, name)
 
         file_link = None
         try: