diff options
author | ben <ben@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109> | 2002-05-11 21:33:34 +0000 |
---|---|---|
committer | ben <ben@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109> | 2002-05-11 21:33:34 +0000 |
commit | 73d24ff28e1561fb000edce42965b439bc04f53b (patch) | |
tree | 929454750af7ae2a48a80fac592afe12b3b39b25 /rdiff-backup/testing/commontest.py | |
parent | f6e83fa5b76594ab9dff64ee450087883c16b897 (diff) | |
download | rdiff-backup-73d24ff28e1561fb000edce42965b439bc04f53b.tar.gz |
Various final bug fixes for 0.7.4
git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup/trunk@79 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
Diffstat (limited to 'rdiff-backup/testing/commontest.py')
-rw-r--r-- | rdiff-backup/testing/commontest.py | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/rdiff-backup/testing/commontest.py b/rdiff-backup/testing/commontest.py index b1a1dc6..40acc2d 100644 --- a/rdiff-backup/testing/commontest.py +++ b/rdiff-backup/testing/commontest.py @@ -127,7 +127,12 @@ def InternalRestore(mirror_local, dest_local, mirror_dir, dest_dir, time): mirror_rp, dest_rp = SetConnections.InitRPs([mirror_dir, dest_dir], remote_schema) - _get_main().Restore(get_increment_rp(mirror_rp, time), dest_rp) + inc = get_increment_rp(mirror_rp, time) + if inc: + _get_main().Restore(get_increment_rp(mirror_rp, time), dest_rp) + else: # use alternate syntax + _get_main().restore_timestr = str(time) + _get_main().RestoreAsOf(mirror_rp, dest_rp) _get_main().cleanup() def get_increment_rp(mirror_rp, time): @@ -135,11 +140,9 @@ def get_increment_rp(mirror_rp, time): data_rp = mirror_rp.append("rdiff-backup-data") for filename in data_rp.listdir(): rp = data_rp.append(filename) - if (rp.isincfile() and rp.getincbase_str() == "increments" and - Time.stringtotime(rp.getinctime()) == time): - return rp - assert None, ("No increments.XXX.dir found in directory " - "%s with that time" % data_rp.path) + if rp.isincfile() and rp.getincbase_str() == "increments": + if Time.stringtotime(rp.getinctime()) == time: return rp + return None # Couldn't find appropriate increment def _reset_connections(src_rp, dest_rp): """Reset some global connection information""" |