summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorowsla <owsla@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109>2007-08-09 13:32:16 +0000
committerowsla <owsla@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109>2007-08-09 13:32:16 +0000
commitc85591ab89bb0701d57f75bc1cf44c64c881fadd (patch)
tree6c3519301b5a539c51b52e93b66df14875664aad
parent4061a5c848f528ce390631c8cb88b750624ef399 (diff)
downloadrdiff-backup-c85591ab89bb0701d57f75bc1cf44c64c881fadd.tar.gz
Properly pickle QuotedRPaths
git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup/trunk@840 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
-rw-r--r--rdiff-backup/CHANGELOG3
-rw-r--r--rdiff-backup/rdiff_backup/FilenameMapping.py7
-rw-r--r--rdiff-backup/rdiff_backup/regress.py2
3 files changed, 11 insertions, 1 deletions
diff --git a/rdiff-backup/CHANGELOG b/rdiff-backup/CHANGELOG
index 2fe6ef6..5694dc7 100644
--- a/rdiff-backup/CHANGELOG
+++ b/rdiff-backup/CHANGELOG
@@ -1,6 +1,9 @@
New in v1.1.13 (????/??/??)
---------------------------
+Properly pickle QuotedRPaths. Fixes regress operation on quoted filesystems.
+Closes Savannah bug #20570 reported by Morgan Read. (Andrew Ferguson)
+
Warn if can't write extended attribute. (Andrew Ferguson)
Gracefully handle situations where rdiff-backup tries to set the sticky
diff --git a/rdiff-backup/rdiff_backup/FilenameMapping.py b/rdiff-backup/rdiff_backup/FilenameMapping.py
index 1f16262..f213fbc 100644
--- a/rdiff-backup/rdiff_backup/FilenameMapping.py
+++ b/rdiff-backup/rdiff_backup/FilenameMapping.py
@@ -126,6 +126,13 @@ class QuotedRPath(rpath.RPath):
rpath.RPath.__init__(self, connection, base, self.quoted_index, data)
self.index = index
+ def __setstate__(self, rpath_state):
+ """Reproduce QuotedRPath from __getstate__ output"""
+ conn_number, self.base, self.index, self.data = rpath_state
+ self.conn = Globals.connection_dict[conn_number]
+ self.quoted_index = tuple(map(quote, self.index))
+ self.path = "/".join((self.base,) + self.quoted_index)
+
def listdir(self):
"""Return list of unquoted filenames in current directory
diff --git a/rdiff-backup/rdiff_backup/regress.py b/rdiff-backup/rdiff_backup/regress.py
index 601aacb..2adc333 100644
--- a/rdiff-backup/rdiff_backup/regress.py
+++ b/rdiff-backup/rdiff_backup/regress.py
@@ -345,7 +345,7 @@ def check_pids(curmir_incs):
try: os.kill(pid, 0)
except OSError, exc:
if exc[0] == errno.ESRCH: return 0
- else: Log("Warning: unable to check if PID %d still running" % (pid,), 2)
+ else: log.Log("Warning: unable to check if PID %d still running" % (pid,), 2)
return 1
for curmir_rp in curmir_incs: