##// END OF EJS Templates
fsmonitor: do not nuke dirstate filecache...
Jun Wu -
r32221:bf3af0ec default
parent child Browse files
Show More
@@ -692,11 +692,13 b' def reposetup(ui, repo):'
692
692
693 # at this point since fsmonitorstate wasn't present, repo.dirstate is
693 # at this point since fsmonitorstate wasn't present, repo.dirstate is
694 # not a fsmonitordirstate
694 # not a fsmonitordirstate
695 repo.dirstate.__class__ = makedirstate(repo.dirstate.__class__)
695 dirstate = repo.dirstate
696 # nuke the dirstate so that _fsmonitorinit and subsequent configuration
696 dirstate.__class__ = makedirstate(dirstate.__class__)
697 # changes take effect on it
697 dirstate._fsmonitorinit(fsmonitorstate, client)
698 del repo._filecache['dirstate']
698 # invalidate property cache, but keep filecache which contains the
699 delattr(repo.unfiltered(), 'dirstate')
699 # wrapped dirstate object
700 del repo.unfiltered().__dict__['dirstate']
701 assert dirstate is repo._filecache['dirstate'].obj
700
702
701 class fsmonitorrepo(repo.__class__):
703 class fsmonitorrepo(repo.__class__):
702 def status(self, *args, **kwargs):
704 def status(self, *args, **kwargs):
General Comments 0
You need to be logged in to leave comments. Login now