diff options
author | ben <ben@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109> | 2002-06-25 18:04:08 +0000 |
---|---|---|
committer | ben <ben@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109> | 2002-06-25 18:04:08 +0000 |
commit | aa36fa26a216b2faf89b0bbd4d90fb16fd082f38 (patch) | |
tree | 4368b953be31798122ce1583cdcf5712c7cb073b /rdiff-backup/rdiff_backup/destructive_stepping.py | |
parent | a8e880f1ad9cf62dc8b02fa60543b8925c10a846 (diff) | |
download | rdiff-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/rdiff_backup/destructive_stepping.py')
-rw-r--r-- | rdiff-backup/rdiff_backup/destructive_stepping.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/rdiff-backup/rdiff_backup/destructive_stepping.py b/rdiff-backup/rdiff_backup/destructive_stepping.py index e03adff..60fc4e9 100644 --- a/rdiff-backup/rdiff_backup/destructive_stepping.py +++ b/rdiff-backup/rdiff_backup/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 * |