summaryrefslogtreecommitdiff
path: root/rdiff-backup/src/destructive_stepping.py
diff options
context:
space:
mode:
authorben <ben@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109>2002-06-25 18:04:08 +0000
committerben <ben@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109>2002-06-25 18:04:08 +0000
commitaa36fa26a216b2faf89b0bbd4d90fb16fd082f38 (patch)
tree4368b953be31798122ce1583cdcf5712c7cb073b /rdiff-backup/src/destructive_stepping.py
parenta8e880f1ad9cf62dc8b02fa60543b8925c10a846 (diff)
downloadrdiff-backup-aa36fa26a216b2faf89b0bbd4d90fb16fd082f38.tar.gz
More optimization: rewrote selection iteration to not recur, and added
"fast processing" to IterTreeReducer, so objects don't need to be created in the typical case. git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup/trunk@145 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
Diffstat (limited to 'rdiff-backup/src/destructive_stepping.py')
-rw-r--r--rdiff-backup/src/destructive_stepping.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/rdiff-backup/src/destructive_stepping.py b/rdiff-backup/src/destructive_stepping.py
index e03adff..60fc4e9 100644
--- a/rdiff-backup/src/destructive_stepping.py
+++ b/rdiff-backup/src/destructive_stepping.py
@@ -199,7 +199,7 @@ class DSRPath(RPath):
return self.__class__(self.source, self.conn, self.base, index)
-class DestructiveSteppingFinalizer(ErrorITR):
+class DestructiveSteppingFinalizer(ITRBranch):
"""Finalizer that can work on an iterator of dsrpaths
The reason we have to use an IterTreeReducer is that some files
@@ -215,6 +215,12 @@ class DestructiveSteppingFinalizer(ErrorITR):
def end_process(self):
if self.dsrpath: self.dsrpath.write_changes()
+ def can_fast_process(self, index, dsrpath):
+ return not self.dsrpath.isdir()
+
+ def fast_process(self, index, dsrpath):
+ if self.dsrpath: self.dsrpath.write_changes()
+
from log import *
from robust import *