1313from functools import total_ordering
1414import sys
1515
16- def get_renamer (filename ):
17- layout = load (filename )
16+ def get_renamer (filename , logger ):
17+ layout = load (filename , logger )
1818 def rename (path ):
1919 renamed = layout .artificial_path (path )
2020 return path if renamed is None else renamed
2121 return rename
2222
23- def load (filename ):
23+ def load (filename , logger ):
2424 """Load a project-layout file from 'filename'."""
2525 with open (filename , 'rb' ) as f :
2626 content = f .read ().decode ('utf-8' )
2727 lines = [ line .strip () for line in content .split ('\n ' ) ]
28- return ProjectLayout (lines )
28+ return ProjectLayout (lines , logger )
2929
3030def _escape_string_literal_for_regexp (literal , preserve ):
3131 ESCAPE = u"(){}[].^$+\\ *?"
@@ -53,7 +53,7 @@ class ProjectLayout(object):
5353 i.e. one or more paths (to include) and zero or more paths
5454 prefixed by minus-signs (to exclude)."""
5555
56- def __init__ (self , lines ):
56+ def __init__ (self , lines , logger ):
5757 """Construct a project-layout object from an array of strings, each
5858 corresponding to one line of the project-layout. This constructor is
5959 for testing. Usually, use the 'load' function."""
@@ -71,6 +71,7 @@ def __init__(self, lines):
7171 num = 0
7272 for line in lines :
7373 num += 1
74+ logger .info ("Line %d: %s" , num , line )
7475 if not line :
7576 continue
7677 if line [0 ] == u'@' :
0 commit comments