summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbescoto <bescoto@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109>2003-07-23 09:04:09 +0000
committerbescoto <bescoto@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109>2003-07-23 09:04:09 +0000
commit056090d96844b974f4a4a68c4dee0bc86b969f70 (patch)
treee9c7212d4de660bb56aab5bcc4f4b4422579449a
parentc7637dd7a8d02f1edec09b165d857986b7297b17 (diff)
downloadrdiff-backup-056090d96844b974f4a4a68c4dee0bc86b969f70.tar.gz
Fix restore from 0.11.x
git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup/branches/r0-12@361 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
-rw-r--r--rdiff-backup/CHANGELOG3
-rw-r--r--rdiff-backup/rdiff_backup/restore.py3
-rw-r--r--rdiff-backup/testing/finaltest.py13
3 files changed, 17 insertions, 2 deletions
diff --git a/rdiff-backup/CHANGELOG b/rdiff-backup/CHANGELOG
index 4a9a100..42e0058 100644
--- a/rdiff-backup/CHANGELOG
+++ b/rdiff-backup/CHANGELOG
@@ -3,6 +3,9 @@ New in v0.12.2 (2003/08/??)
Patch by Arkadiusz Patyk fixes building with Python 2.3c1.
+Restore of archives made by 0.10.x and earlier fixed, although hard
+link information is not restored. (Bug reported by Jeff Lessem.)
+
New in v0.12.1 (2003/07/22)
---------------------------
diff --git a/rdiff-backup/rdiff_backup/restore.py b/rdiff-backup/rdiff_backup/restore.py
index 8c0b253..26bc499 100644
--- a/rdiff-backup/rdiff_backup/restore.py
+++ b/rdiff-backup/rdiff_backup/restore.py
@@ -178,8 +178,7 @@ class MirrorStruct:
rorp = rf.get_attribs()
yield rorp
if rorp.isdir():
- for sub_rf in rf.yield_sub_rfs():
- for rorp in yield_attribs(sub_rf): yield rorp
+ for sub_rf in rf.yield_sub_rfs(): yield sub_rf.get_attribs()
def subtract_indicies(cls, index, rorp_iter):
"""Subtract index from index of each rorp in rorp_iter
diff --git a/rdiff-backup/testing/finaltest.py b/rdiff-backup/testing/finaltest.py
index 9837437..c45bd62 100644
--- a/rdiff-backup/testing/finaltest.py
+++ b/rdiff-backup/testing/finaltest.py
@@ -290,6 +290,19 @@ class Final(PathSetter):
popen_fp.close()
assert wc_output.split() == ["0", "0", "0"], wc_output
+ def testLegacy(self):
+ """Test restoring directory with no mirror_metadata file"""
+ self.delete_tmpdirs()
+ self.set_connections(None, None, None, None)
+ self.exec_rb(10000, 'testfiles/various_file_types',
+ 'testfiles/output')
+ self.exec_rb(20000, 'testfiles/empty', 'testfiles/output')
+ assert not os.system(MiscDir + '/myrm testfiles/output/rdiff-backup-data/mirror_metadata*')
+ self.exec_rb_extra_args(None, '-r0', 'testfiles/output',
+ 'testfiles/restoretarget1')
+ assert CompareRecursive(Local.vftrp, Local.rpout1,
+ compare_hardlinks = 0)
+
class FinalSelection(PathSetter):
"""Test selection options"""