Exemplo n.º 1
0
 def refresh(self):
     with self._lock:
         if self._inotify_fd is None:
             return
         try:
             if not self._refs_only:
                 tracked_dirs = set(
                     os.path.dirname(os.path.join(self._worktree, path))
                     for path in gitcmds.tracked_files())
                 self._refresh_watches(tracked_dirs, self._worktree_wds,
                                       self._worktree_wd_map)
             git_dirs = set()
             git_dirs.add(self._git_dir)
             for dirpath, dirnames, filenames in core.walk(
                     os.path.join(self._git_dir, 'refs')):
                 git_dirs.add(dirpath)
             self._refresh_watches(git_dirs, self._git_dir_wds,
                                   self._git_dir_wd_map)
             self._git_dir_wd = self._git_dir_wd_map[self._git_dir]
         except OSError as e:
             if e.errno == errno.ENOSPC:
                 self._log_out_of_wds_message()
                 self._running = False
             else:
                 raise
Exemplo n.º 2
0
 def refresh(self):
     with self._lock:
         if self._inotify_fd is None:
             return
         try:
             if self._worktree is not None:
                 tracked_dirs = set(
                         os.path.dirname(os.path.join(self._worktree,
                                                      path))
                         for path in gitcmds.tracked_files())
                 self._refresh_watches(tracked_dirs, self._worktree_wds,
                                       self._worktree_wd_map)
             git_dirs = set()
             git_dirs.add(self._git_dir)
             for dirpath, dirnames, filenames in core.walk(
                     os.path.join(self._git_dir, 'refs')):
                 git_dirs.add(dirpath)
             self._refresh_watches(git_dirs, self._git_dir_wds,
                                   self._git_dir_wd_map)
             self._git_dir_wd = self._git_dir_wd_map[self._git_dir]
         except OSError as e:
             if e.errno == errno.ENOSPC:
                 self._log_out_of_wds_message()
                 self._running = False
             else:
                 raise
Exemplo n.º 3
0
 def run(self):
     query = self.query
     if query is None:
         args = []
     else:
         args = [add_wildcards(arg) for arg in utils.shell_split(query)]
     filenames = gitcmds.tracked_files(*args)
     if query == self.query:
         self.emit(SIGNAL('result(PyQt_PyObject)'), filenames)
     else:
         self.run()
Exemplo n.º 4
0
 def run(self):
     query = self.query
     if query is None:
         args = []
     else:
         args = [add_wildcards(arg) for arg in utils.shell_split(query)]
     filenames = gitcmds.tracked_files(*args)
     if query == self.query:
         self.emit(SIGNAL('result(PyQt_PyObject)'), filenames)
     else:
         self.run()
Exemplo n.º 5
0
 def gather_paths(self):
     self._paths = gitcmds.tracked_files()
Exemplo n.º 6
0
 def gather_paths(self):
     self._paths = gitcmds.tracked_files()