| 
														
															@@ -242,6 +242,7 @@ def normalized(func): 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         # always have to enter an exact match 
														 | 
														
														 | 
														
															         # always have to enter an exact match 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         return func 
														 | 
														
														 | 
														
															         return func 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 class IncludePattern: 
														 | 
														
														 | 
														
															 class IncludePattern: 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     """Literal files or directories listed on the command line 
														 | 
														
														 | 
														
															     """Literal files or directories listed on the command line 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     for some operations (e.g. extract, but not create). 
														 | 
														
														 | 
														
															     for some operations (e.g. extract, but not create). 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -249,6 +250,8 @@ class IncludePattern: 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     path match as well.  A trailing slash makes no difference. 
														 | 
														
														 | 
														
															     path match as well.  A trailing slash makes no difference. 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     """ 
														 | 
														
														 | 
														
															     """ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     def __init__(self, pattern): 
														 | 
														
														 | 
														
															     def __init__(self, pattern): 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        self.match_count = 0 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         if sys.platform in ('darwin',): 
														 | 
														
														 | 
														
															         if sys.platform in ('darwin',): 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             pattern = unicodedata.normalize("NFD", pattern) 
														 | 
														
														 | 
														
															             pattern = unicodedata.normalize("NFD", pattern) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -256,7 +259,10 @@ class IncludePattern: 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															     @normalized 
														 | 
														
														 | 
														
															     @normalized 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     def match(self, path): 
														 | 
														
														 | 
														
															     def match(self, path): 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        return (path+os.path.sep).startswith(self.pattern) 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        matches = (path+os.path.sep).startswith(self.pattern) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        if matches: 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            self.match_count += 1 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        return matches 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															     def __repr__(self): 
														 | 
														
														 | 
														
															     def __repr__(self): 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         return '%s(%s)' % (type(self), self.pattern) 
														 | 
														
														 | 
														
															         return '%s(%s)' % (type(self), self.pattern) 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -267,6 +273,8 @@ class ExcludePattern(IncludePattern): 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     exclude the contents of a directory, but not the directory itself. 
														 | 
														
														 | 
														
															     exclude the contents of a directory, but not the directory itself. 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     """ 
														 | 
														
														 | 
														
															     """ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     def __init__(self, pattern): 
														 | 
														
														 | 
														
															     def __init__(self, pattern): 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        self.match_count = 0 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         if pattern.endswith(os.path.sep): 
														 | 
														
														 | 
														
															         if pattern.endswith(os.path.sep): 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             self.pattern = os.path.normpath(pattern).rstrip(os.path.sep)+os.path.sep+'*'+os.path.sep 
														 | 
														
														 | 
														
															             self.pattern = os.path.normpath(pattern).rstrip(os.path.sep)+os.path.sep+'*'+os.path.sep 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         else: 
														 | 
														
														 | 
														
															         else: 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -281,7 +289,10 @@ class ExcludePattern(IncludePattern): 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															     @normalized 
														 | 
														
														 | 
														
															     @normalized 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     def match(self, path): 
														 | 
														
														 | 
														
															     def match(self, path): 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        return self.regex.match(path+os.path.sep) is not None 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        matches = self.regex.match(path+os.path.sep) is not None 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        if matches: 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            self.match_count += 1 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        return matches 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															     def __repr__(self): 
														 | 
														
														 | 
														
															     def __repr__(self): 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         return '%s(%s)' % (type(self), self.pattern) 
														 | 
														
														 | 
														
															         return '%s(%s)' % (type(self), self.pattern) 
														 |