diff options
author | bescoto <bescoto@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109> | 2005-11-19 03:58:14 +0000 |
---|---|---|
committer | bescoto <bescoto@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109> | 2005-11-19 03:58:14 +0000 |
commit | b013f40c0c2d1bbbbe1d58208eef9477a791fa0b (patch) | |
tree | f0e4fe590e8a38fcfb46960359c62acd0d6694f1 | |
parent | 3f6a251faf324209247a868c91a9bacdea427db1 (diff) | |
download | rdiff-backup-b013f40c0c2d1bbbbe1d58208eef9477a791fa0b.tar.gz |
delete empty increments directories when removing older than
git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup/trunk@685 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
-rw-r--r-- | rdiff-backup/CHANGELOG | 2 | ||||
-rw-r--r-- | rdiff-backup/rdiff_backup/Main.py | 4 | ||||
-rw-r--r-- | rdiff-backup/rdiff_backup/manage.py | 2 |
3 files changed, 5 insertions, 3 deletions
diff --git a/rdiff-backup/CHANGELOG b/rdiff-backup/CHANGELOG index 2008e1c..591f12c 100644 --- a/rdiff-backup/CHANGELOG +++ b/rdiff-backup/CHANGELOG @@ -7,6 +7,8 @@ rdiff-backup should now give a clean error message (no stack traces!) when aborted with control-C, killed with a signal, or when the connection is lost. +When removing older than, delete empty increments directories + New in v1.1.2 (2005/11/06) -------------------------- diff --git a/rdiff-backup/rdiff_backup/Main.py b/rdiff-backup/rdiff_backup/Main.py index ccda5b4..ce29f80 100644 --- a/rdiff-backup/rdiff_backup/Main.py +++ b/rdiff-backup/rdiff_backup/Main.py @@ -685,8 +685,8 @@ def RemoveOlderThan(rootrp): def rot_require_rbdir_base(rootrp): """Make sure pointing to base of rdiff-backup dir""" if restore_index != (): - Log.FatalError("Increments for directory %s cannot be removed separately.\n" - "Instead run on entire directory %s." % + Log.FatalError("Increments for directory %s cannot be removed " + "separately.\nInstead run on entire directory %s." % (rootrp.path, restore_root.path)) diff --git a/rdiff-backup/rdiff_backup/manage.py b/rdiff-backup/rdiff_backup/manage.py index c02592a..fc7db73 100644 --- a/rdiff-backup/rdiff_backup/manage.py +++ b/rdiff-backup/rdiff_backup/manage.py @@ -88,11 +88,11 @@ def delete_earlier_than_local(baserp, time): """Like delete_earlier_than, but run on local connection for speed""" assert baserp.conn is Globals.local_connection def yield_files(rp): - yield rp if rp.isdir(): for filename in rp.listdir(): for sub_rp in yield_files(rp.append(filename)): yield sub_rp + yield rp for rp in yield_files(baserp): if ((rp.isincfile() and rp.getinctime() < time) or |