diff options
author | bescoto <bescoto@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109> | 2002-12-14 01:10:09 +0000 |
---|---|---|
committer | bescoto <bescoto@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109> | 2002-12-14 01:10:09 +0000 |
commit | b7d3685a496a24c8d9ec8467f76aba5b9cecd591 (patch) | |
tree | c588b7103e7601ba100069e0550715c96894f305 /rdiff-backup/rdiff_backup | |
parent | 3b9298b8018c0df65ce601af092b6ce4a6a4d090 (diff) | |
download | rdiff-backup-b7d3685a496a24c8d9ec8467f76aba5b9cecd591.tar.gz |
Added Bud Bruegger's patch to ListChangedSince (now lists change type)
git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup/trunk@245 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
Diffstat (limited to 'rdiff-backup/rdiff_backup')
-rw-r--r-- | rdiff-backup/rdiff_backup/Main.py | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/rdiff-backup/rdiff_backup/Main.py b/rdiff-backup/rdiff_backup/Main.py index b450876..c3891a9 100644 --- a/rdiff-backup/rdiff_backup/Main.py +++ b/rdiff-backup/rdiff_backup/Main.py @@ -564,10 +564,22 @@ def ListChangedSince(rp): for sub_rid in Restore.yield_rids(rid, rest_time, mirror_time): for sub_sub_rid in get_rids_recursive(sub_rid): yield sub_sub_rid + def determineChangeType(incList): + "returns the type of change determined from incList" + assert len(incList) > 0 + last_inc_type = incList[-1].getinctype() # examine earliest change + if last_inc_type == 'snapshot': return "misc change" + elif last_inc_type == 'missing': return "new file" + elif last_inc_type == 'diff' or last_inc_type == 'dir': + return "modified" + else: return "Unknown!" + inc_rpath = datadir.append_path('increments', index) inc_list = Restore.get_inclist(inc_rpath) root_rid = RestoreIncrementData(index, inc_rpath, inc_list) for rid in get_rids_recursive(root_rid): - if rid.inc_list: print "/".join(rid.index) - + if rid.inc_list: + if not rid.index: path = "." + else: path = "/".join(rid.index) + print "%-11s: %s" % (determineChangeType(rid.inc_list), path) |