1. TortoiseHg
  2. TortoiseHg
  3. thg


Yuya Nishihara  committed 288f1c1

repowatcher: inline _getwatchedfiles function

  • Participants
  • Parent commits 0f1d4b2
  • Branches default

Comments (0)

Files changed (1)

File tortoisehg/hgqt/thgrepo.py

View file
     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()