From 50c1696f4771c21c715b9ded73a409debaf21955 Mon Sep 17 00:00:00 2001 From: bescoto Date: Wed, 24 Sep 2003 19:50:56 +0000 Subject: Found better (obvious) way of doing --list-at-time git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup/branches/r0-12@450 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109 --- rdiff-backup/rdiff_backup/Main.py | 3 +-- rdiff-backup/rdiff_backup/restore.py | 9 ++------- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/rdiff-backup/rdiff_backup/Main.py b/rdiff-backup/rdiff_backup/Main.py index ed6e9be..1ccdbed 100644 --- a/rdiff-backup/rdiff_backup/Main.py +++ b/rdiff-backup/rdiff_backup/Main.py @@ -588,8 +588,7 @@ def ListAtTime(rp): mirror_rp = mirror_root.new_index(index) inc_rp = mirror_rp.append_path("increments", index) for rorp in rp.conn.restore.ListAtTime(mirror_rp, inc_rp, rest_time): - # This is a hack, see restore.ListChangeSince for rational - print rorp.index[0] + print rorp.get_indexpath() def CheckDest(dest_rp): diff --git a/rdiff-backup/rdiff_backup/restore.py b/rdiff-backup/rdiff_backup/restore.py index 3d065ae..a7b6b3e 100644 --- a/rdiff-backup/rdiff_backup/restore.py +++ b/rdiff-backup/rdiff_backup/restore.py @@ -90,18 +90,13 @@ def ListChangedSince(mirror_rp, inc_rp, restore_to_time): def ListAtTime(mirror_rp, inc_rp, time): - """List the files in archive at the given time - - Output is a RORP Iterator with info in index. See ListChangedSince. - - """ + """List the files in archive at the given time""" assert mirror_rp.conn is Globals.local_connection, "Run locally only" MirrorStruct.set_mirror_and_rest_times(time) MirrorStruct.initialize_rf_cache(mirror_rp, inc_rp) old_iter = MirrorStruct.get_mirror_rorp_iter(_rest_time, 1) - for rorp in old_iter: - yield rpath.RORPath((rorp.get_indexpath(),)) + for rorp in old_iter: yield rorp class MirrorStruct: -- cgit v1.2.1