Exemplo n.º 1
0
 def cmd_get_vcs_for_directory(self, directory):
     vcs = vc.Vc(directory)
     workdir = vcs.get_working_directory(directory)
     if workdir in self.__cached_vcs:
         vcs = self.__cached_vcs[workdir]
     else:
         self.__cached_vcs[workdir] = vcs
     return vcs
Exemplo n.º 2
0
 def status_ls(self, directory):
     os.chdir(directory)
     vcdir = vc.Vc(directory)
     if vcdir.NAME == 'Null':
         print '<s> <s> <s>'
     else:
         statuses = vcdir.listdir(directory)
         for status in statuses:
             self._print_lock.acquire()
             print '<s>', status.state, status.path
             self._print_lock.release()
         sys.exit(0)
Exemplo n.º 3
0
 def status_ls(self, directory):
     vcdir = vc.Vc(directory)
     if vcdir.NAME == 'Null':
         self._no_statuses = True
     else:
         statuses = vcdir.listdir(directory)
         for status in statuses:
             if not self.show_hidden and status.name.startswith('.'):
                 continue
             item = self.add_item(status.path, status.state)
             if item:
                 item.statused = True
Exemplo n.º 4
0
    def status_ls(self, directory):
        vcdir = vc.Vc(directory)
        if vcdir.NAME == 'Null':
            self._no_statuses = True
        else:
            statuses = vcdir.listdir(directory)

            for status in statuses:
                if self.is_hidden(status.name): continue
                item = self.add_item(status.path, status.state)
                if item:
                    item.statused = True
Exemplo n.º 5
0
 def cmd_forget_directory(self, directory):
     vcs = vc.Vc(directory)
     workdir = vcs.get_working_directory(directory)
     if workdir in self.__cached_vcs:
         del self.__cached_vcs[workdir]