Commits

Yuya Nishihara committed 288f1c1

repowatcher: inline _getwatchedfiles function

Comments (0)

Files changed (1)

tortoisehg/hgqt/thgrepo.py

 
     def addMissingPaths(self):
         'Add files to watcher that may have been added or replaced'
-        existing = [f for f in self._getwatchedfiles() if os.path.exists(f)]
+        existing = [f for f, (_flag, watched) in self._filesmap.iteritems()
+                    if watched and os.path.exists(f)]
         files = [unicode(f) for f in self._fswatcher.files()]
         for f in existing:
             if hglib.tounicode(f) not in files:
                 changeflags |= flag
         return changeflags
 
-    def _filesToBeWatched(self):
-        return [path for path, (_flag, watched) in self._filesmap.iteritems()
-                if watched]
-
     def _readparents(self):
         return self.repo.opener('dirstate').read(40)
 
-    def _getwatchedfiles(self):
-        'Repository files which may be modified without locking'
-        watchedfiles = []
-        watchedfiles.extend(self._filesToBeWatched())
-        return watchedfiles
-
     def _readbranch(self):
         return self.repo.opener('branch').read()