diff options
author | ben <ben@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109> | 2002-04-30 02:02:56 +0000 |
---|---|---|
committer | ben <ben@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109> | 2002-04-30 02:02:56 +0000 |
commit | d49f6dccf43983b317d31aa49b7e9a54aa28bf01 (patch) | |
tree | 1986d43b549551e12b60b6c03251061eae7bf433 /rdiff-backup/src/destructive_stepping.py | |
parent | ef22311017db214255b24f93de2a43d75f9d45cc (diff) | |
download | rdiff-backup-d49f6dccf43983b317d31aa49b7e9a54aa28bf01.tar.gz |
Changed for 0.7.3 release
git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup/trunk@48 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
Diffstat (limited to 'rdiff-backup/src/destructive_stepping.py')
-rw-r--r-- | rdiff-backup/src/destructive_stepping.py | 68 |
1 files changed, 0 insertions, 68 deletions
diff --git a/rdiff-backup/src/destructive_stepping.py b/rdiff-backup/src/destructive_stepping.py index c4b1191..c2cd011 100644 --- a/rdiff-backup/src/destructive_stepping.py +++ b/rdiff-backup/src/destructive_stepping.py @@ -180,72 +180,4 @@ class DestructiveStepping: lambda dsrpath, x, y: dsrpath.write_changes(), initial_state) - def isexcluded(dsrp, source): - """Return true if given DSRPath is excluded/ignored - - If source = 1, treat as source file, otherwise treat as - destination file. - - """ - return None # this code is for the test suites only, use Select instead - if Globals.exclude_device_files and dsrp.isdev(): return 1 - - if source: exclude_regexps = Globals.exclude_regexps - else: exclude_regexps = Globals.exclude_mirror_regexps - - for regexp in exclude_regexps: - if regexp.match(dsrp.path): - Log("Excluding %s" % dsrp.path, 6) - return 1 - return None - - def Iterate_from(baserp, source, starting_index = None): - """Iterate dsrps from baserp, skipping any matching exclude_regexps - - includes only dsrps with indicies greater than starting_index - if starting_index is not None. - - """ - def helper_starting_from(dsrpath): - """Like helper, but only start iterating after starting_index""" - if dsrpath.index > starting_index: - # Past starting_index, revert to normal helper - for dsrp in helper(dsrpath): yield dsrp - elif dsrpath.index == starting_index[:len(dsrpath.index)]: - # May encounter starting index on this branch - if (not DestructiveStepping.isexcluded(dsrpath, source) and - not DestructiveStepping.initialize(dsrpath, source)): - if dsrpath.isdir(): - dir_listing = dsrpath.listdir() - dir_listing.sort() - for filename in dir_listing: - for dsrp in helper_starting_from( - dsrpath.append(filename)): - yield dsrp - - def helper(dsrpath): - if (not DestructiveStepping.isexcluded(dsrpath, source) and - not DestructiveStepping.initialize(dsrpath, source)): - yield dsrpath - if dsrpath.isdir(): - dir_listing = dsrpath.listdir() - dir_listing.sort() - for filename in dir_listing: - for dsrp in helper(dsrpath.append(filename)): - yield dsrp - - base_dsrpath = DSRPath(baserp.conn, baserp.base, - baserp.index, baserp.data) - if starting_index is None: return helper(base_dsrpath) - else: return helper_starting_from(base_dsrpath) - - def Iterate_with_Finalizer(baserp, source): - """Like Iterate_from, but finalize each dsrp afterwards""" - finalize = DestructiveStepping.Finalizer() - for dsrp in DestructiveStepping.Iterate_from(baserp, source): - yield dsrp - finalize(dsrp) - finalize.getresult() - - MakeStatic(DestructiveStepping) |