Avoid file_iter, use iter_files instead.
authorJelmer Vernooij <jelmer@samba.org>
Mon, 8 Nov 2010 09:59:33 +0000 (10:59 +0100)
committerJelmer Vernooij <jelmer@samba.org>
Mon, 8 Nov 2010 09:59:33 +0000 (10:59 +0100)
file_iter should ideally be made private.

fastimport/processor.py
fastimport/processors/info_processor.py
fastimport/processors/query_processor.py

index 4ddca7b555172893bc7dec406214ee4507e46d67..2455b4dcb714e4c73c2e0f474cd462e9c4d7c4c5 100644 (file)
@@ -149,7 +149,7 @@ class CommitHandler(object):
 
     def process(self):
         self.pre_process_files()
-        for fc in self.command.file_iter():
+        for fc in self.command.iter_files():
             try:
                 handler = self.__class__.__dict__[fc.name[4:] + "_handler"]
             except KeyError:
index 0f9699280cfef47c942ac63169a5ff5473c04040..d35aaff450e56efda275442a6ae533f6d9530ac6 100644 (file)
@@ -192,7 +192,7 @@ class InfoProcessor(processor.ImportProcessor):
         self.committers.add(cmd.committer)
         if cmd.author is not None:
             self.separate_authors_found = True
-        for fc in cmd.file_iter():
+        for fc in cmd.iter_files():
             self.file_cmd_counts[fc.name] += 1
             if isinstance(fc, commands.FileModifyCommand):
                 if fc.mode & 0111:
index 76250e574c2e11bf2b70d75287c2bfe35e14a177..fd9695cdf4409eaee24a4ff7c92cf6ad7bf4cd57 100644 (file)
@@ -77,8 +77,7 @@ class QueryProcessor(processor.ImportProcessor):
 
     def commit_handler(self, cmd):
         """Process a CommitCommand."""
-        for fc in cmd.file_iter():
-            pass
+        pass
 
     def reset_handler(self, cmd):
         """Process a ResetCommand."""