diff options
author | ben <ben@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109> | 2002-07-16 05:16:42 +0000 |
---|---|---|
committer | ben <ben@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109> | 2002-07-16 05:16:42 +0000 |
commit | 4c8440ee71ba819c7327913870a615186ef8d386 (patch) | |
tree | 5d4d811680e1b3fd0a3393de3d49eb9cae116481 /rdiff-backup/rdiff_backup/selection.py | |
parent | 6efc3610e37994c38a70cf32266e1e495035fbd3 (diff) | |
download | rdiff-backup-4c8440ee71ba819c7327913870a615186ef8d386.tar.gz |
Various changes to 0.9.3, see CHANGELOG
git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup/trunk@157 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
Diffstat (limited to 'rdiff-backup/rdiff_backup/selection.py')
-rw-r--r-- | rdiff-backup/rdiff_backup/selection.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/rdiff-backup/rdiff_backup/selection.py b/rdiff-backup/rdiff_backup/selection.py index 58abdf0..c70857c 100644 --- a/rdiff-backup/rdiff_backup/selection.py +++ b/rdiff-backup/rdiff_backup/selection.py @@ -256,6 +256,8 @@ class Select: self.add_selection_func(self.filelist_get_sf( filelists[filelists_index], 0, arg)) filelists_index += 1 + elif opt == "--exclude-other-filesystems": + self.add_selection_func(self.other_filesystems_get_sf(0)) elif opt == "--exclude-regexp": self.add_selection_func(self.regexp_get_sf(arg, 0)) elif opt == "--include": @@ -416,6 +418,17 @@ probably isn't what you meant.""" % else: return (None, None) # dsrp greater, not initial sequence else: assert 0, "Include is %s, should be 0 or 1" % (include,) + def other_filesystems_get_sf(self, include): + """Return selection function matching files on other filesystems""" + assert include == 0 or include == 1 + root_devloc = self.dsrpath.getdevloc() + def sel_func(dsrp): + if dsrp.getdevloc() == root_devloc: return None + else: return include + sel_func.exclude = not include + sel_func.name = "Match other filesystems" + return sel_func + def regexp_get_sf(self, regexp_string, include): """Return selection function given by regexp_string""" assert include == 0 or include == 1 |