Beispiel #1
0
 def setUp(self):
     # Silence the log system
     logger = Logger(min_level=FATAL)
     register_logger(logger, "itools.database")
     # Make database
     self.database = make_git_database("fables", 20, 20)
     self.database.worktree.git_add(".")
     self.database.worktree.git_commit("Initial commit")
     self.root = self.database.get_handler(".")
Beispiel #2
0
 def setUp(self):
     # Silence the log system
     logger = Logger(min_level=FATAL)
     register_logger(logger, 'itools.database')
     # Make database
     self.database = make_git_database('fables', 20, 20)
     self.database.worktree.git_add('.')
     self.database.worktree.git_commit('Initial commit')
     self.root = self.database.get_handler('.')
Beispiel #3
0
 def setUp(self):
     # Make database
     self.database = make_git_database("fables", 20, 20, Document.fields)
     self.database.worktree.git_add(".")
     self.database.worktree.git_commit("Initial commit")
     self.root = self.database.get_handler(".")
     # Index
     catalog = self.database.catalog
     fables = lfs.open("fables/database")
     for name in fables.get_names():
         _, ext, _ = FileName.decode(name)
         if ext == "txt":
             abspath = fables.get_absolute_path(name)
             document = Document(abspath)
             catalog.index_document(document)
     # Save
     catalog.save_changes()
Beispiel #4
0
 def setUp(self):
     # Make database
     self.database = make_git_database('fables', 20, 20, Document.fields)
     self.database.worktree.git_add('.')
     self.database.worktree.git_commit('Initial commit')
     self.root = self.database.get_handler('.')
     # Index
     catalog = self.database.catalog
     fables = lfs.open('fables/database')
     for name in fables.get_names():
         _, ext, _ = FileName.decode(name)
         if ext == 'txt':
             abspath = fables.get_absolute_path(name)
             document = Document(abspath)
             catalog.index_document(document)
     # Save
     catalog.save_changes()
Beispiel #5
0
def make_database(path):
    size_min, size_max = 19500, 20500
    make_git_database(path, size_min, size_max)
    return Database(path, size_min, size_max)
Beispiel #6
0
def make_database(path):
    size_min, size_max = 19500, 20500
    make_git_database(path, size_min, size_max)
    return Database(path, size_min, size_max)