# TODO: implement reading .psync. source_groupids = Groupids({"": source_root}) dest_groupids = Groupids({"": dest_root}) conf = Config() clock = Clock() slog = StatusLog(clock) fs = FileSystem(slog) source_db_path = os.path.join(source_root, conf.db_path) dest_db_path = os.path.join(dest_root, conf.db_path) revisions_root = os.path.join(dest_root, conf.revisions_path) fs.create_parent_dirs(source_db_path) fs.create_parent_dirs(dest_db_path) with sqlite3.connect(source_db_path) as source_db: with sqlite3.connect(dest_db_path) as dest_db: source_history_store = HistoryStore(SqlDb(source_db), slog) dest_history_store = HistoryStore(SqlDb(dest_db), slog) revisions = RevisionStore(fs, revisions_root) merge_log = MergeLog(SqlDb(source_db), clock) source_history = scan_and_update_history( fs, source_root, conf.group_root_marker, conf.path_filter, conf.hash_type, source_history_store, source_peerid, source_groupids, clock, slog) dest_history = scan_and_update_history(
# TODO: implement reading .psync. source_groupids = Groupids({"": source_root}) dest_groupids = Groupids({"": dest_root}) conf = Config() clock = Clock() slog = StatusLog(clock) fs = FileSystem(slog) source_db_path = os.path.join(source_root, conf.db_path) dest_db_path = os.path.join(dest_root, conf.db_path) revisions_root = os.path.join(dest_root, conf.revisions_path) fs.create_parent_dirs(source_db_path) fs.create_parent_dirs(dest_db_path) with sqlite3.connect(source_db_path) as source_db: with sqlite3.connect(dest_db_path) as dest_db: source_history_store = HistoryStore(SqlDb(source_db), slog) dest_history_store = HistoryStore(SqlDb(dest_db), slog) revisions = RevisionStore(fs, revisions_root) merge_log = MergeLog(SqlDb(source_db), clock) source_history = scan_and_update_history( fs, source_root, conf.group_root_marker, conf.path_filter, conf.hash_type, source_history_store, source_peerid, source_groupids, clock, slog) dest_history = scan_and_update_history( fs, dest_root, conf.group_root_marker, conf.path_filter,