예제 #1
0
class SearchData(object):

    def __init__(self):
        self.filesys = None


    def connect(self):
        self.filesys = Filesys()
        self.filesys.connect()


    def get_latest_root(self):
        self.current_rev = self.filesys.get_latest_rev();
        self.current_root = self.filesys.get_root(self.current_rev)
        
        subdirs = self.filesys.get_subdirs(self.current_root.id)
        
        return self.current_rev,self.current_root,subdirs
예제 #2
0
class BrowserData(object):

    def __init__(self):
        self.filesys = None


    def connect(self):
        self.filesys = Filesys()
        self.filesys.connect()


    def get_latest_root(self):
        self.current_rev = self.filesys.get_latest_rev();
        self.current_root = self.filesys.get_root(self.current_rev)
        
        subdirs = self.filesys.get_subdirs(self.current_root.id)
        
        return self.current_rev,self.current_root,subdirs


    def get_all_roots(self):
        rv = []
        for root in self.filesys.get_all_roots():
            rv.append((root.rev_id, root))
        
        return rv
예제 #3
0
 def connect(self):
     self.filesys = Filesys()
     self.filesys.connect()