[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Rdiff-backup-commits] rdiff-backup CHANGELOG rdiff-backup.1 rdiff_bac..
From: |
Andrew Ferguson |
Subject: |
[Rdiff-backup-commits] rdiff-backup CHANGELOG rdiff-backup.1 rdiff_bac... |
Date: |
Sat, 03 Jan 2009 23:18:36 +0000 |
CVSROOT: /sources/rdiff-backup
Module name: rdiff-backup
Changes by: Andrew Ferguson <owsla> 09/01/03 23:18:35
Modified files:
. : CHANGELOG rdiff-backup.1
rdiff_backup : Globals.py Main.py Time.py fs_abilities.py
Log message:
New option: --use-compatible-timestamps, which causes rdiff-backup to
use - asthe hour/minute/second separator instead of :. Enabled by default on
systems
which require : to be escaped. (Oliver Mulatz)
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/rdiff-backup/CHANGELOG?cvsroot=rdiff-backup&r1=1.343&r2=1.344
http://cvs.savannah.gnu.org/viewcvs/rdiff-backup/rdiff-backup.1?cvsroot=rdiff-backup&r1=1.90&r2=1.91
http://cvs.savannah.gnu.org/viewcvs/rdiff-backup/rdiff_backup/Globals.py?cvsroot=rdiff-backup&r1=1.46&r2=1.47
http://cvs.savannah.gnu.org/viewcvs/rdiff-backup/rdiff_backup/Main.py?cvsroot=rdiff-backup&r1=1.131&r2=1.132
http://cvs.savannah.gnu.org/viewcvs/rdiff-backup/rdiff_backup/Time.py?cvsroot=rdiff-backup&r1=1.16&r2=1.17
http://cvs.savannah.gnu.org/viewcvs/rdiff-backup/rdiff_backup/fs_abilities.py?cvsroot=rdiff-backup&r1=1.64&r2=1.65
Patches:
Index: CHANGELOG
===================================================================
RCS file: /sources/rdiff-backup/rdiff-backup/CHANGELOG,v
retrieving revision 1.343
retrieving revision 1.344
diff -u -b -r1.343 -r1.344
--- CHANGELOG 3 Jan 2009 21:41:53 -0000 1.343
+++ CHANGELOG 3 Jan 2009 23:18:34 -0000 1.344
@@ -1,6 +1,10 @@
New in v1.3.0 (????/??/??)
---------------------------
+New option: --use-compatible-timestamps, which causes rdiff-backup to use - as
+the hour/minute/second separator instead of :. Enabled by default on systems
+which require : to be escaped. (Oliver Mulatz)
+
Allow rdiff-backup to backup files which it cannot read, but can change
the permissions of. (Andrew Ferguson)
Index: rdiff-backup.1
===================================================================
RCS file: /sources/rdiff-backup/rdiff-backup/rdiff-backup.1,v
retrieving revision 1.90
retrieving revision 1.91
diff -u -b -r1.90 -r1.91
--- rdiff-backup.1 22 Dec 2008 16:57:40 -0000 1.90
+++ rdiff-backup.1 3 Jan 2009 23:18:34 -0000 1.91
@@ -1,4 +1,4 @@
-.TH RDIFF-BACKUP 1 "DECEMBER 2008" "Version 1.2.3" "User Manuals" \" -*- nroff
-*-
+.TH RDIFF-BACKUP 1 "JANUARY 2009" "Version 1.3.0" "User Manuals" \" -*- nroff
-*-
.SH NAME
rdiff-backup \- local/remote mirror and incremental backup
.SH SYNOPSIS
@@ -486,6 +486,13 @@
in the following host::filename argument(s). The filename section
will be ignored.
.TP
+.B \-\-use-compatible-timestamps
+Create timestamps in which the hour/minute/second separator is a - (hyphen)
+instead of a : (colon). It is safe to use this option on one backup, and then
+not use it on another; rdiff-backup supports the intermingling of different
+timestamp formats. This option is enabled by default on platforms which
+require that the colon be escaped.
+.TP
.BI "\-\-user-mapping-file " filename
Map user names and ids according to the user mapping file
.IR filename .
Index: rdiff_backup/Globals.py
===================================================================
RCS file: /sources/rdiff-backup/rdiff-backup/rdiff_backup/Globals.py,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -b -r1.46 -r1.47
--- rdiff_backup/Globals.py 2 Jul 2008 18:03:23 -0000 1.46
+++ rdiff_backup/Globals.py 3 Jan 2009 23:18:35 -0000 1.47
@@ -159,6 +159,11 @@
chars_to_quote = None
quoting_char = ';'
+# If true, the timestamps use the following format: "2008-09-01T04-49-04-07-00"
+# (instead of "2008-09-01T04:49:04-07:00"). This creates timestamps which
+# don't need to be escaped on Windows.
+use_compatible_timestamps = 0
+
# If true, emit output intended to be easily readable by a
# computer. False means output is intended for humans.
parsable_output = None
Index: rdiff_backup/Main.py
===================================================================
RCS file: /sources/rdiff-backup/rdiff-backup/rdiff_backup/Main.py,v
retrieving revision 1.131
retrieving revision 1.132
diff -u -b -r1.131 -r1.132
--- rdiff_backup/Main.py 3 Jan 2009 21:35:59 -0000 1.131
+++ rdiff_backup/Main.py 3 Jan 2009 23:18:35 -0000 1.132
@@ -85,8 +85,8 @@
"remove-older-than=", "restore-as-of=", "restrict=",
"restrict-read-only=", "restrict-update-only=", "server",
"ssh-no-compression", "tempdir=", "terminal-verbosity=",
- "test-server", "user-mapping-file=", "verbosity=", "verify",
- "verify-at-time=", "version"])
+ "test-server", "use-compatible-timestamps",
"user-mapping-file=",
+ "verbosity=", "verify", "verify-at-time=", "version"])
except getopt.error, e:
commandline_error("Bad commandline options: " + str(e))
@@ -199,6 +199,8 @@
elif opt == "--tempdir": tempfile.tempdir = arg
elif opt == "--terminal-verbosity": Log.setterm_verbosity(arg)
elif opt == "--test-server": action = "test-server"
+ elif opt == "use-compatible-timestamps":
+ Globals.set("use_compatible_timestamps", 1)
elif opt == "--user-mapping-file": user_mapping_filename = arg
elif opt == "-v" or opt == "--verbosity": Log.setverbosity(arg)
elif opt == "--verify": action, restore_timestr = "verify",
"now"
Index: rdiff_backup/Time.py
===================================================================
RCS file: /sources/rdiff-backup/rdiff-backup/rdiff_backup/Time.py,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -b -r1.16 -r1.17
--- rdiff_backup/Time.py 23 Dec 2008 18:52:22 -0000 1.16
+++ rdiff_backup/Time.py 3 Jan 2009 23:18:35 -0000 1.17
@@ -61,8 +61,13 @@
prevtime, prevtimestr = timeinseconds, timestr
def timetostring(timeinseconds):
- """Return w3 datetime compliant listing of timeinseconds"""
- s = time.strftime("%Y-%m-%dT%H:%M:%S", time.localtime(timeinseconds))
+ """Return w3 datetime compliant listing of timeinseconds, or one in
+ which :'s have been replaced with -'s"""
+ if not Globals.use_compatible_timestamps:
+ format_string = "%Y-%m-%dT%H:%M:%S"
+ else:
+ format_string = "%Y-%m-%dT%H-%M-%S"
+ s = time.strftime(format_string, time.localtime(timeinseconds))
return s + gettzd(timeinseconds)
def stringtotime(timestring):
@@ -72,10 +77,13 @@
like a w3 datetime string, return None.
"""
+
+ regexp = re.compile('[-:]')
+
try:
date, daytime = timestring[:19].split("T")
year, month, day = map(int, date.split("-"))
- hour, minute, second = map(int, daytime.split(":"))
+ hour, minute, second = map(int, regexp.split(daytime))
assert 1900 < year < 2100, year
assert 1 <= month <= 12
assert 1 <= day <= 31
@@ -157,16 +165,18 @@
elif offset < 0: prefix = "-"
else: return "Z" # time is already in UTC
+ if Globals.use_compatible_timestamps: time_separator = '-'
+ else: time_separator = ':'
hours, minutes = map(abs, divmod(offset, 60))
assert 0 <= hours <= 23
assert 0 <= minutes <= 59
- return "%s%02d:%02d" % (prefix, hours, minutes)
+ return "%s%02d%s%02d" % (prefix, hours, time_separator, minutes)
def tzdtoseconds(tzd):
"""Given w3 compliant TZD, return how far ahead UTC is"""
if tzd == "Z": return 0
assert len(tzd) == 6 # only accept forms like +08:00 for now
- assert (tzd[0] == "-" or tzd[0] == "+") and tzd[3] == ":"
+ assert (tzd[0] == "-" or tzd[0] == "+") and (tzd[3] == ":" or tzd[3] ==
"-")
return -60 * (60 * int(tzd[:3]) + int(tzd[4:]))
def cmp(time1, time2):
Index: rdiff_backup/fs_abilities.py
===================================================================
RCS file: /sources/rdiff-backup/rdiff-backup/rdiff_backup/fs_abilities.py,v
retrieving revision 1.64
retrieving revision 1.65
diff -u -b -r1.64 -r1.65
--- rdiff_backup/fs_abilities.py 3 Jan 2009 21:32:40 -0000 1.64
+++ rdiff_backup/fs_abilities.py 3 Jan 2009 23:18:35 -0000 1.65
@@ -709,6 +709,12 @@
SetConnections.UpdateGlobal('symlink_perms',
self.dest_fsa.symlink_perms)
+ def set_compatible_timestamps(self):
+ if Globals.chars_to_quote.find(":") > -1:
+
SetConnections.UpdateGlobal('use_compatible_timestamps', 1)
+ log.Log("Enabled use_compatible_timestamps", 4)
+
+
class BackupSetGlobals(SetGlobals):
"""Functions for setting fsa related globals for backup session"""
def update_triple(self, src_support, dest_support, attr_triple):
@@ -963,6 +969,7 @@
bsg.set_symlink_perms()
update_quoting = bsg.set_chars_to_quote(Globals.rbdir, force)
bsg.set_special_escapes(Globals.rbdir)
+ bsg.set_compatible_timestamps()
if update_quoting and force:
FilenameMapping.update_quoting(Globals.rbdir)
@@ -990,6 +997,7 @@
rsg.set_symlink_perms()
rsg.set_chars_to_quote(Globals.rbdir)
rsg.set_special_escapes(Globals.rbdir)
+ rsg.set_compatible_timestamps()
def single_set_globals(rp, read_only = None):
"""Set fsa related globals for operation on single filesystem"""
@@ -1010,4 +1018,5 @@
ssg.set_symlink_perms()
ssg.set_chars_to_quote(Globals.rbdir)
ssg.set_special_escapes(Globals.rbdir)
+ ssg.set_compatible_timestamps()
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Rdiff-backup-commits] rdiff-backup CHANGELOG rdiff-backup.1 rdiff_bac...,
Andrew Ferguson <=