Commit c2c4774c authored by bescoto's avatar bescoto

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@692 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
parent 054c3d87
......@@ -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:
......
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment