]> git.donarmstrong.com Git - lilypond.git/commitdiff
(main): set dest_dir
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Sat, 3 Jun 2006 00:03:29 +0000 (00:03 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Sat, 3 Jun 2006 00:03:29 +0000 (00:03 +0000)
argument. Add --max-count option.

ChangeLog
buildscripts/output-distance.py

index 2437655dbbf090a4a49f2760df1e784a2f70a788..83296ae53a45e44ad688e1158cf5a134a1823ae9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2006-06-03  Han-Wen Nienhuys  <hanwen@lilypond.org>
+
+       * buildscripts/output-distance.py (main): set dest_dir
+       argument. Add --max-count option.
+
 2006-06-02  Jürgen Reuter  <reuter@ipd.uka.de>
 
        * ly/gregorian-init.ly: Converted to utf-8.  Added memorable
index 1ce5dca38f5c3b222c768130efe12c563acfc27a..bebafe755935243f014c1812ef4f301023a1c33d 100644 (file)
@@ -18,6 +18,7 @@ INFTY = 1e6
 OUTPUT_EXPRESSION_PENALTY = 1
 ORPHAN_GROB_PENALTY = 1
 THRESHOLD = 1.0
+inspect_max_count = 0
 
 def max_distance (x1, x2):
     dist = 0.0
@@ -418,7 +419,9 @@ class ComparisonData:
         self.added += [(dir2, m) for m in m2] 
 
         for p in paired:
-            if len (self.file_links) > 10:
+            if (inspect_max_count
+                and len (self.file_links) > inspect_max_count):
+                
                 continue
             
             f2 = dir2 +  '/' + p
@@ -575,6 +578,7 @@ def test_compare_trees ():
 
     ## introduce differences
     system ('cp 19-1.signature dir2/20-1.signature')
+    system ('cp 20-1.signature dir2/subdir/19-sub-1.signature')
 
     ## radical diffs.
     system ('cp 19-1.signature dir2/20grob-1.signature')
@@ -673,7 +677,14 @@ def main ():
                   dest="run_test",
                   action="store_true",
                   help='run test method')
-
+    p.add_option ('--max-count',
+                  dest="max_count",
+                  metavar="COUNT",
+                  type="int",
+                  default=0, 
+                  action="store",
+                  help='only analyze COUNT signature pairs')
     (o,a) = p.parse_args ()
 
     if o.run_test:
@@ -684,7 +695,10 @@ def main ():
         p.print_usage()
         sys.exit (2)
 
-    compare_trees (a[0], a[1])
+    global inspect_max_count
+    inspect_max_count = o.max_count
+
+    compare_trees (a[0], a[1], a[1] + '/' +  a[0])
 
 if __name__ == '__main__':
     main()