summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorben <ben@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109>2002-05-20 18:09:10 +0000
committerben <ben@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109>2002-05-20 18:09:10 +0000
commite90980098d2ae3458a56b19d12805f62def8f8d6 (patch)
tree03105e5110343441fa7dd6954cafd3652e88afd8
parent9091865590125881b709626fc372239654714ba8 (diff)
downloadrdiff-backup-e90980098d2ae3458a56b19d12805f62def8f8d6.tar.gz
Fixed --include reporting bug, and added error checking to directory
listings so that "door" files would be skipped git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup/trunk@91 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
-rw-r--r--rdiff-backup/rdiff_backup/highlevel.py3
-rw-r--r--rdiff-backup/rdiff_backup/robust.py2
-rw-r--r--rdiff-backup/rdiff_backup/selection.py8
-rw-r--r--rdiff-backup/src/highlevel.py3
-rw-r--r--rdiff-backup/src/robust.py2
-rw-r--r--rdiff-backup/src/selection.py8
6 files changed, 16 insertions, 10 deletions
diff --git a/rdiff-backup/rdiff_backup/highlevel.py b/rdiff-backup/rdiff_backup/highlevel.py
index 86738df..d3b6b74 100644
--- a/rdiff-backup/rdiff_backup/highlevel.py
+++ b/rdiff-backup/rdiff_backup/highlevel.py
@@ -268,7 +268,8 @@ class HLDestinationStruct:
def check_skip_error(cls, thunk, dsrp):
"""Run thunk, catch certain errors skip files"""
try: return thunk()
- except (IOError, OSError, SkipFileException, DSRPPermError), exp:
+ except (IOError, OSError, SkipFileException, DSRPPermError,
+ RPathException), exp:
Log.exception()
if (not isinstance(exp, IOError) or
(isinstance(exp, IOError) and
diff --git a/rdiff-backup/rdiff_backup/robust.py b/rdiff-backup/rdiff_backup/robust.py
index da0acc4..a0f6691 100644
--- a/rdiff-backup/rdiff_backup/robust.py
+++ b/rdiff-backup/rdiff_backup/robust.py
@@ -580,7 +580,7 @@ class ResumeSessionInfo:
last_index - Last confirmed index processed by backup, or None
last_definitive - True is we know last_index is really last
finalizer - the dsrp finalizer if available
- ITR_state - For increment, ITM reducer (assume mirror if NA)
+ ITR - For increment, ITM reducer (assume mirror if NA)
"""
self.time = time
diff --git a/rdiff-backup/rdiff_backup/selection.py b/rdiff-backup/rdiff_backup/selection.py
index aa98a49..0bb46e2 100644
--- a/rdiff-backup/rdiff_backup/selection.py
+++ b/rdiff-backup/rdiff_backup/selection.py
@@ -129,7 +129,8 @@ class Select:
new_dsrp = Robust.check_common_error(
lambda: dsrpath.append(filename))
if not new_dsrp:
- Log("Error initializing file %s" % dsrpath.path, 2)
+ Log("Error initializing file %s/%s" %
+ (dsrpath.path, filename), 2)
else:
for dsrp in rec_func(new_dsrp, rec_func, sel_func):
yield dsrp
@@ -237,7 +238,7 @@ pattern (such as '**') which matches the base directory.""" %
only specifies that files be included. Because the default is to
include all files, the expression is redundant. Exiting because this
probably isn't what you meant.""" %
- (self.selection_functions[-1].name, self.prefix))
+ (self.selection_functions[-1].name,))
def add_selection_func(self, sel_func, add_to_start = None):
"""Add another selection function at the end or beginning"""
@@ -380,7 +381,8 @@ probably isn't what you meant.""" %
else: sel_func = self.glob_get_normal_sf(glob_str, include)
sel_func.exclude = not include
- sel_func.name = "Command-line glob: %s" % glob_str
+ sel_func.name = "Command-line %s glob: %s" % \
+ (include and "include" or "exclude", glob_str)
return sel_func
def glob_get_filename_sf(self, filename, include):
diff --git a/rdiff-backup/src/highlevel.py b/rdiff-backup/src/highlevel.py
index 86738df..d3b6b74 100644
--- a/rdiff-backup/src/highlevel.py
+++ b/rdiff-backup/src/highlevel.py
@@ -268,7 +268,8 @@ class HLDestinationStruct:
def check_skip_error(cls, thunk, dsrp):
"""Run thunk, catch certain errors skip files"""
try: return thunk()
- except (IOError, OSError, SkipFileException, DSRPPermError), exp:
+ except (IOError, OSError, SkipFileException, DSRPPermError,
+ RPathException), exp:
Log.exception()
if (not isinstance(exp, IOError) or
(isinstance(exp, IOError) and
diff --git a/rdiff-backup/src/robust.py b/rdiff-backup/src/robust.py
index da0acc4..a0f6691 100644
--- a/rdiff-backup/src/robust.py
+++ b/rdiff-backup/src/robust.py
@@ -580,7 +580,7 @@ class ResumeSessionInfo:
last_index - Last confirmed index processed by backup, or None
last_definitive - True is we know last_index is really last
finalizer - the dsrp finalizer if available
- ITR_state - For increment, ITM reducer (assume mirror if NA)
+ ITR - For increment, ITM reducer (assume mirror if NA)
"""
self.time = time
diff --git a/rdiff-backup/src/selection.py b/rdiff-backup/src/selection.py
index aa98a49..0bb46e2 100644
--- a/rdiff-backup/src/selection.py
+++ b/rdiff-backup/src/selection.py
@@ -129,7 +129,8 @@ class Select:
new_dsrp = Robust.check_common_error(
lambda: dsrpath.append(filename))
if not new_dsrp:
- Log("Error initializing file %s" % dsrpath.path, 2)
+ Log("Error initializing file %s/%s" %
+ (dsrpath.path, filename), 2)
else:
for dsrp in rec_func(new_dsrp, rec_func, sel_func):
yield dsrp
@@ -237,7 +238,7 @@ pattern (such as '**') which matches the base directory.""" %
only specifies that files be included. Because the default is to
include all files, the expression is redundant. Exiting because this
probably isn't what you meant.""" %
- (self.selection_functions[-1].name, self.prefix))
+ (self.selection_functions[-1].name,))
def add_selection_func(self, sel_func, add_to_start = None):
"""Add another selection function at the end or beginning"""
@@ -380,7 +381,8 @@ probably isn't what you meant.""" %
else: sel_func = self.glob_get_normal_sf(glob_str, include)
sel_func.exclude = not include
- sel_func.name = "Command-line glob: %s" % glob_str
+ sel_func.name = "Command-line %s glob: %s" % \
+ (include and "include" or "exclude", glob_str)
return sel_func
def glob_get_filename_sf(self, filename, include):