From f2708f0d147aca69ded55c50f85fa20386fb6c0c Mon Sep 17 00:00:00 2001 From: owsla Date: Fri, 6 Jul 2007 21:47:20 +0000 Subject: Handle quoted current_mirror markers and clean-up the listing of increments with quoted names. git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup/trunk@811 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109 --- rdiff-backup/CHANGELOG | 3 +++ rdiff-backup/rdiff_backup/manage.py | 5 +++-- rdiff-backup/rdiff_backup/restore.py | 6 ++++-- 3 files changed, 10 insertions(+), 4 deletions(-) (limited to 'rdiff-backup') diff --git a/rdiff-backup/CHANGELOG b/rdiff-backup/CHANGELOG index 6ceb6c5..6ed2ede 100644 --- a/rdiff-backup/CHANGELOG +++ b/rdiff-backup/CHANGELOG @@ -1,6 +1,9 @@ New in v1.1.12 (????/??/??) --------------------------- +Handle quoted current_mirror markers and clean-up the listing of +increments with quoted names. (Andrew Ferguson) + Warn if file modification time is before 1970. (Andrew Ferguson) diff --git a/rdiff-backup/rdiff_backup/manage.py b/rdiff-backup/rdiff_backup/manage.py index fc7db73..d4a97dc 100644 --- a/rdiff-backup/rdiff_backup/manage.py +++ b/rdiff-backup/rdiff_backup/manage.py @@ -21,7 +21,7 @@ from __future__ import generators from log import Log -import Globals, Time, static, statistics, restore, selection +import Globals, Time, static, statistics, restore, selection, FilenameMapping class ManageException(Exception): pass @@ -70,7 +70,8 @@ def describe_incs_human(incs, mirror_time, mirrorrp): result = ["Found %d increments:" % len(incpairs)] for time, inc in incpairs: result.append(" %s %s" % - (inc.dirsplit()[1], Time.timetopretty(time))) + (FilenameMapping.unquote(inc.dirsplit()[1]), + Time.timetopretty(time))) result.append("Current mirror: %s" % Time.timetopretty(mirror_time)) return "\n".join(result) diff --git a/rdiff-backup/rdiff_backup/restore.py b/rdiff-backup/rdiff_backup/restore.py index 2510405..4498dac 100644 --- a/rdiff-backup/rdiff_backup/restore.py +++ b/rdiff-backup/rdiff_backup/restore.py @@ -21,7 +21,7 @@ from __future__ import generators import tempfile, os, cStringIO -import static, rorpiter +import static, rorpiter, FilenameMapping class RestoreError(Exception): pass @@ -40,6 +40,7 @@ def Restore(mirror_rp, inc_rpath, target, restore_to_time): def get_inclist(inc_rpath): """Returns increments with given base""" dirname, basename = inc_rpath.dirsplit() + basename = FilenameMapping.unquote(basename) parent_dir = inc_rpath.__class__(inc_rpath.conn, dirname, ()) if not parent_dir.isdir(): return [] # inc directory not created yet index = inc_rpath.index @@ -47,7 +48,8 @@ def get_inclist(inc_rpath): inc_list = [] for filename in parent_dir.listdir(): inc = parent_dir.append(filename) - if inc.isincfile() and inc.getincbase_str() == basename: + if inc.isincfile() and FilenameMapping.unquote( + inc.getincbase_str()) == basename: inc_list.append(inc) return inc_list -- cgit v1.2.1