diff options
author | bescoto <bescoto@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109> | 2005-11-25 23:07:51 +0000 |
---|---|---|
committer | bescoto <bescoto@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109> | 2005-11-25 23:07:51 +0000 |
commit | 8d72df2aaefa8f3cc6bc8a4cce56813793d4fcd5 (patch) | |
tree | d09e74e22ca5e5d3e054039449275dfcce36996c | |
parent | da3cdf9df0177e72f0b89246eff7e17ff58e4477 (diff) | |
download | rdiff-backup-8d72df2aaefa8f3cc6bc8a4cce56813793d4fcd5.tar.gz |
Fix for --compare (before you needed to specific the exact time to the second)
git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup/branches/r1-0@692 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
-rw-r--r-- | rdiff-backup/rdiff_backup/restore.py | 2 | ||||
-rw-r--r-- | rdiff-backup/testing/commontest.py | 7 |
2 files changed, 6 insertions, 3 deletions
diff --git a/rdiff-backup/rdiff_backup/restore.py b/rdiff-backup/rdiff_backup/restore.py index 58dfc2b..7ba8b36 100644 --- a/rdiff-backup/rdiff_backup/restore.py +++ b/rdiff-backup/rdiff_backup/restore.py @@ -102,7 +102,7 @@ def Compare(src_iter, mirror_rp, inc_rp, compare_time): MirrorStruct.set_mirror_and_rest_times(compare_time) MirrorStruct.initialize_rf_cache(mirror_rp, inc_rp) - mir_iter = MirrorStruct.get_mirror_rorp_iter(compare_time, 1) + mir_iter = MirrorStruct.get_mirror_rorp_iter(_rest_time, 1) collated = rorpiter.Collate2Iters(src_iter, mir_iter) changed_files_found = 0 for src_rorp, mir_rorp in collated: diff --git a/rdiff-backup/testing/commontest.py b/rdiff-backup/testing/commontest.py index 3f3dbe7..a3a0856 100644 --- a/rdiff-backup/testing/commontest.py +++ b/rdiff-backup/testing/commontest.py @@ -40,7 +40,8 @@ def MakeOutputDir(): return rp def rdiff_backup(source_local, dest_local, src_dir, dest_dir, - current_time = None, extra_options = ""): + current_time = None, extra_options = "", + check_return_val = 1): """Run rdiff-backup with the given options source_local and dest_local are boolean values. If either is @@ -70,7 +71,9 @@ def rdiff_backup(source_local, dest_local, src_dir, dest_dir, cmdargs.extend([src_dir, dest_dir]) cmdline = " ".join(cmdargs) print "Executing: ", cmdline - assert not os.system(cmdline) + ret_val = os.system(cmdline) + if check_return_val: assert not ret_val, ret_val + return ret_val def cmd_schemas2rps(schema_list, remote_schema): """Input list of file descriptions and the remote schema, return rps |