def create_repo(): returned = LocalRepository(get_temporary_location()) returned.init() for i in range(10): filename = "file_%s.txt" % i full_filename = os.path.join(returned.path, filename) with open(full_filename, "wb") as f: print >> f, "initial content" returned.add(filename) returned.commit(message="initial") return returned