diff options
author | owsla <owsla@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109> | 2008-01-06 18:35:32 +0000 |
---|---|---|
committer | owsla <owsla@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109> | 2008-01-06 18:35:32 +0000 |
commit | dd656fa477eff1903c114262d91469760900fc44 (patch) | |
tree | 6bc4efad011a6eacc8c036726e915da5a487bd08 /rdiff-backup/rdiff-backup-statistics | |
parent | f2145790f9d58b85537c9b0f3cbcfaf7fd34fb38 (diff) | |
download | rdiff-backup-dd656fa477eff1903c114262d91469760900fc44.tar.gz |
Support quoted repositories in rdiff-backup-statistics
git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup/trunk@869 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
Diffstat (limited to 'rdiff-backup/rdiff-backup-statistics')
-rwxr-xr-x | rdiff-backup/rdiff-backup-statistics | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/rdiff-backup/rdiff-backup-statistics b/rdiff-backup/rdiff-backup-statistics index 65e6fa6..3419b8d 100755 --- a/rdiff-backup/rdiff-backup-statistics +++ b/rdiff-backup/rdiff-backup-statistics @@ -22,7 +22,7 @@ import os, sys, re, getopt from rdiff_backup import connection, regress, rpath, Globals, restore, \ - Time, lazy + Time, lazy, FilenameMapping begin_time = None # Parse statistics at or after this time... end_time = None # ... and at or before this time (epoch seconds) @@ -97,8 +97,8 @@ class StatisticsRPaths: def print_session_statistics(stat_rpaths): print "Session statistics:" - system("rdiff-backup --calculate-average " + - " ".join([inc.path for inc in stat_rpaths.session_rps])) + system('rdiff-backup --calculate-average "' + + " ".join([inc.path for inc in stat_rpaths.session_rps]) + '"') class FileStatisticsTree: @@ -415,10 +415,20 @@ def sum_fst(rp_pairs): fst = make_fst(session_rp, filestat_rp) total_fst += fst return total_fst - + +def set_chars_to_quote(): + ctq_rp = Globals.rbdir.append("chars_to_quote") + if ctq_rp.lstat(): + Globals.chars_to_quote = ctq_rp.get_data() + if Globals.chars_to_quote: + Globals.must_escape_dos_devices = 0 # No DOS devices will be present + FilenameMapping.set_init_quote_vals() + Globals.rbdir = FilenameMapping.get_quotedrpath(Globals.rbdir) + def Main(): Time.setcurtime() parse_args() + set_chars_to_quote() srp = StatisticsRPaths(Globals.rbdir) if not srp.combined_pairs: sys.exit("No matching sessions found") if len(srp.combined_pairs) == 1: fst = make_fst(*srp.combined_pairs[0]) |