diff options
-rw-r--r-- | rdiff-backup/CHANGELOG | 4 | ||||
-rw-r--r-- | rdiff-backup/rdiff_backup/Security.py | 1 | ||||
-rw-r--r-- | rdiff-backup/rdiff_backup/connection.py | 5 | ||||
-rw-r--r-- | rdiff-backup/rdiff_backup/rpath.py | 12 |
4 files changed, 13 insertions, 9 deletions
diff --git a/rdiff-backup/CHANGELOG b/rdiff-backup/CHANGELOG index 062a903..29720a8 100644 --- a/rdiff-backup/CHANGELOG +++ b/rdiff-backup/CHANGELOG @@ -1,6 +1,10 @@ New in v1.1.12 (????/??/??) --------------------------- +Squash bug where --check-destination-dir or regress operation failed +after crash when --force option was not used. RPath's are now +properly pickled. (Andrew Ferguson) + Workaround for tempfile.TemporaryFile() having different behavior on Windows/Cygwin. (Andrew Ferguson) diff --git a/rdiff-backup/rdiff_backup/Security.py b/rdiff-backup/rdiff_backup/Security.py index 34609d3..2e9cd9d 100644 --- a/rdiff-backup/rdiff_backup/Security.py +++ b/rdiff-backup/rdiff_backup/Security.py @@ -172,6 +172,7 @@ def set_allowed_requests(sec_level): "backup.DestinationStruct.patch_and_increment", "Main.backup_touch_curmirror_local", "Main.backup_remove_curmirror_local", + "regress.check_pids", "Globals.ITRB.increment_stat", "statistics.record_error", "log.ErrorLog.write_if_open", diff --git a/rdiff-backup/rdiff_backup/connection.py b/rdiff-backup/rdiff_backup/connection.py index dadbcd5..0ba1204 100644 --- a/rdiff-backup/rdiff_backup/connection.py +++ b/rdiff-backup/rdiff_backup/connection.py @@ -20,7 +20,7 @@ """Support code for remote execution and data transfer""" from __future__ import generators -import types, os, tempfile, cPickle, shutil, traceback, pickle, \ +import types, os, tempfile, cPickle, shutil, traceback, \ socket, sys, gzip # The following EA and ACL modules may be used if available try: import xattr @@ -140,8 +140,7 @@ class LowLevelPipeConnection(Connection): def _putobj(self, obj, req_num): """Send a generic python obj down the outpipe""" - # for some reason there is an error when cPickle is used below.. - self._write("o", pickle.dumps(obj, 1), req_num) + self._write("o", cPickle.dumps(obj, 1), req_num) def _putbuf(self, buf, req_num): """Send buffer buf down the outpipe""" diff --git a/rdiff-backup/rdiff_backup/rpath.py b/rdiff-backup/rdiff_backup/rpath.py index e5d84d9..37ac54c 100644 --- a/rdiff-backup/rdiff_backup/rpath.py +++ b/rdiff-backup/rdiff_backup/rpath.py @@ -753,17 +753,17 @@ class RPath(RORPath): def __getstate__(self): """Return picklable state - The connection must be local because we can't pickle a - connection. Data and any attached file also won't be saved. + The rpath's connection will be encoded as its conn_number. It + and the other information is put in a tuple. Data and any attached + file won't be saved. """ - assert self.conn is Globals.local_connection - return (self.index, self.base, self.data) + return (self.conn.conn_number, self.base, self.index, self.data) def __setstate__(self, rpath_state): """Reproduce RPath from __getstate__ output""" - self.conn = Globals.local_connection - self.index, self.base, self.data = rpath_state + conn_number, self.base, self.index, self.data = rpath_state + self.conn = Globals.connection_dict[conn_number] self.path = "/".join((self.base,) + self.index) def setdata(self): |