summaryrefslogtreecommitdiff
path: root/rdiff-backup/rdiff_backup/highlevel.py
diff options
context:
space:
mode:
authorben <ben@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109>2002-05-31 08:24:24 +0000
committerben <ben@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109>2002-05-31 08:24:24 +0000
commit38f302883e8e08457f9e4fd93d4ecdb6dff77de2 (patch)
treea9ae5fcea436296a433dd10f8e47668a12dccb90 /rdiff-backup/rdiff_backup/highlevel.py
parent53fe9d2de82af972d618bc045e07599b7cfc91e1 (diff)
downloadrdiff-backup-38f302883e8e08457f9e4fd93d4ecdb6dff77de2.tar.gz
Added resuming bug fixes
git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup/trunk@114 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
Diffstat (limited to 'rdiff-backup/rdiff_backup/highlevel.py')
-rw-r--r--rdiff-backup/rdiff_backup/highlevel.py17
1 files changed, 12 insertions, 5 deletions
diff --git a/rdiff-backup/rdiff_backup/highlevel.py b/rdiff-backup/rdiff_backup/highlevel.py
index ae3fa53..c0b6b61 100644
--- a/rdiff-backup/rdiff_backup/highlevel.py
+++ b/rdiff-backup/rdiff_backup/highlevel.py
@@ -207,13 +207,18 @@ class HLDestinationStruct:
else:
iitr = IncrementITR(inc_rpath)
iitr.override_changed()
+ Globals.ITR = iitr
+ iitr.Errors = 0
return iitr
def get_MirrorITR(cls, inc_rpath):
"""Return MirrorITR, starting from state if available"""
if cls._session_info and cls._session_info.ITR:
return cls._session_info.ITR
- else: return MirrorITR(inc_rpath)
+ ITR = MirrorITR(inc_rpath)
+ Globals.ITR = ITR
+ ITR.Errors = 0
+ return ITR
def patch_and_finalize(cls, dest_rpath, diffs):
"""Apply diffs and finalize"""
@@ -244,7 +249,7 @@ class HLDestinationStruct:
collated = RORPIter.CollateIterators(diffs, cls.initial_dsiter2)
finalizer, ITR = cls.get_finalizer(), cls.get_MirrorITR(inc_rpath)
Stats.open_dir_stats_file()
- dsrp = None
+ dsrp, finished_dsrp = None, None
try:
for indexed_tuple in collated:
@@ -255,9 +260,10 @@ class HLDestinationStruct:
ITR(dsrp.index, diff_rorp, dsrp)
finalizer(dsrp.index, dsrp)
SaveState.checkpoint(ITR, finalizer, dsrp)
+ finished_dsrp = dsrp
ITR.Finish()
finalizer.Finish()
- except: cls.handle_last_error(dsrp, finalizer, ITR)
+ except: cls.handle_last_error(finished_dsrp, finalizer, ITR)
if Globals.preserve_hardlinks: Hardlink.final_writedata()
Stats.close_dir_stats_file()
@@ -269,7 +275,7 @@ class HLDestinationStruct:
collated = RORPIter.CollateIterators(diffs, cls.initial_dsiter2)
finalizer, ITR = cls.get_finalizer(), cls.get_ITR(inc_rpath)
Stats.open_dir_stats_file()
- dsrp = None
+ dsrp, finished_dsrp = None, None
try:
for indexed_tuple in collated:
@@ -281,9 +287,10 @@ class HLDestinationStruct:
ITR(index, diff_rorp, dsrp)
finalizer(index, dsrp)
SaveState.checkpoint(ITR, finalizer, dsrp)
+ finished_dsrp = dsrp
ITR.Finish()
finalizer.Finish()
- except: cls.handle_last_error(dsrp, finalizer, ITR)
+ except: cls.handle_last_error(finished_dsrp, finalizer, ITR)
if Globals.preserve_hardlinks: Hardlink.final_writedata()
Stats.close_dir_stats_file()