##// END OF EJS Templates
keyword: wrap dirstate mutation in `changing_files` context...
marmoute -
r51046:092db646 default
parent child Browse files
Show More
@@ -421,31 +421,31 b' def reposetup(ui, repo):'
421 421 wlock = None
422 422 try:
423 423 wlock = self.wlock()
424 for f in self.dirstate:
425 if not self.dirstate.get_entry(f).maybe_clean:
426 continue
427 if oldeol is not None:
428 if not oldeol.match(f) and not neweol.match(f):
424 with self.dirstate.changing_files(self):
425 for f in self.dirstate:
426 if not self.dirstate.get_entry(f).maybe_clean:
429 427 continue
430 oldkey = None
431 for pattern, key, m in oldeol.patterns:
432 if m(f):
433 oldkey = key
434 break
435 newkey = None
436 for pattern, key, m in neweol.patterns:
437 if m(f):
438 newkey = key
439 break
440 if oldkey == newkey:
441 continue
442 # all normal files need to be looked at again since
443 # the new .hgeol file specify a different filter
444 self.dirstate.set_possibly_dirty(f)
445 # Write the cache to update mtime and cache .hgeol
446 with self.vfs(b"eol.cache", b"w") as f:
447 f.write(hgeoldata)
448 self.dirstate.write(self.currenttransaction())
428 if oldeol is not None:
429 if not oldeol.match(f) and not neweol.match(f):
430 continue
431 oldkey = None
432 for pattern, key, m in oldeol.patterns:
433 if m(f):
434 oldkey = key
435 break
436 newkey = None
437 for pattern, key, m in neweol.patterns:
438 if m(f):
439 newkey = key
440 break
441 if oldkey == newkey:
442 continue
443 # all normal files need to be looked at again since
444 # the new .hgeol file specify a different filter
445 self.dirstate.set_possibly_dirty(f)
446 # Write the cache to update mtime and cache .hgeol
447 with self.vfs(b"eol.cache", b"w") as f:
448 f.write(hgeoldata)
449 449 except errormod.LockUnavailable:
450 450 # If we cannot lock the repository and clear the
451 451 # dirstate, then a commit might not see all files
General Comments 0
You need to be logged in to leave comments. Login now