@@ -170,7 +170,7 @@ def _delete_entries_cache(self):
170170
171171 def _deserialize (self , stream ):
172172 """Initialize this instance with index values read from the given stream"""
173- self .version , self .entries , self ._extension_data , conten_sha = read_cache (stream )
173+ self .version , self .entries , self ._extension_data , conten_sha = read_cache (stream ) # @UnusedVariable
174174 return self
175175
176176 def _entries_sorted (self ):
@@ -404,7 +404,7 @@ def raise_exc(e):
404404 continue
405405 # END glob handling
406406 try :
407- for root , dirs , files in os .walk (abs_path , onerror = raise_exc ):
407+ for root , dirs , files in os .walk (abs_path , onerror = raise_exc ): # @UnusedVariable
408408 for rela_file in files :
409409 # add relative paths only
410410 yield os .path .join (root .replace (rs , '' ), rela_file )
@@ -599,7 +599,6 @@ def _store_path(self, filepath, fprogress):
599599 """Store file at filepath in the database and return the base index entry
600600 Needs the git_working_dir decorator active ! This must be assured in the calling code"""
601601 st = os .lstat (filepath ) # handles non-symlinks as well
602- stream = None
603602 if S_ISLNK (st .st_mode ):
604603 # in PY3, readlink is string, but we need bytes. In PY2, it's just OS encoded bytes, we assume UTF-8
605604 open_stream = lambda : BytesIO (force_bytes (os .readlink (filepath ), encoding = defenc ))
@@ -1102,11 +1101,11 @@ def handle_stderr(proc, iter_checked_out_files):
11021101 try :
11031102 self .entries [(co_path , 0 )]
11041103 except KeyError :
1105- dir = co_path
1106- if not dir .endswith ('/' ):
1107- dir += '/'
1104+ folder = co_path
1105+ if not folder .endswith ('/' ):
1106+ folder += '/'
11081107 for entry in mviter (self .entries ):
1109- if entry .path .startswith (dir ):
1108+ if entry .path .startswith (folder ):
11101109 p = entry .path
11111110 self ._write_path_to_stdin (proc , p , p , make_exc ,
11121111 fprogress , read_from_stdout = False )
0 commit comments