From 9af9bc2c12198d3250438118fd70ba6fe8d497ac Mon Sep 17 00:00:00 2001 From: ben Date: Thu, 5 Sep 2002 08:12:38 +0000 Subject: Various changes, including stopped checking directory sizes when comparing RORPaths. git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup/trunk@190 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109 --- rdiff-backup/rdiff_backup/Main.py | 4 ++-- rdiff-backup/rdiff_backup/lazy.py | 2 +- rdiff-backup/rdiff_backup/rpath.py | 1 + rdiff-backup/src/Main.py | 4 ++-- rdiff-backup/src/lazy.py | 2 +- rdiff-backup/src/rpath.py | 1 + 6 files changed, 8 insertions(+), 6 deletions(-) diff --git a/rdiff-backup/rdiff_backup/Main.py b/rdiff-backup/rdiff_backup/Main.py index 76c652a..60435be 100644 --- a/rdiff-backup/rdiff_backup/Main.py +++ b/rdiff-backup/rdiff_backup/Main.py @@ -159,7 +159,7 @@ def set_action(): else: action = "backup" else: commandline_error("Too many arguments given") - if l == 0 and action != "server" and action != "test-server": + if l == 0 and action != "server": commandline_error("No arguments given") if l > 0 and action == "server": commandline_error("Too many arguments given") @@ -295,7 +295,7 @@ def backup_init_dirs(rpin, rpout): elif not datadir.lstat() and not force: Log.FatalError( """Destination directory %s exists, but does not look like a rdiff-backup directory. Running rdiff-backup like this could mess up -what is currently in it. If you want to overwrite it, run +what is currently in it. If you want to update or overwrite it, run rdiff-backup with the --force option.""" % rpout.path) if not rpout.lstat(): diff --git a/rdiff-backup/rdiff_backup/lazy.py b/rdiff-backup/rdiff_backup/lazy.py index 4c32b5d..e583676 100644 --- a/rdiff-backup/rdiff_backup/lazy.py +++ b/rdiff-backup/rdiff_backup/lazy.py @@ -339,7 +339,7 @@ class ITRBranch: def on_error(self, exc, *args): """This is run on any exception in start/end-process""" self.caught_exception = 1 - if args and isinstance(args[0], tuple): + if args and args[0] and isinstance(args[0], tuple): filename = os.path.join(*args[0]) elif self.index: filename = os.path.join(*self.index) else: filename = "." diff --git a/rdiff-backup/rdiff_backup/rpath.py b/rdiff-backup/rdiff_backup/rpath.py index 7365f14..14a68c7 100644 --- a/rdiff-backup/rdiff_backup/rpath.py +++ b/rdiff-backup/rdiff_backup/rpath.py @@ -250,6 +250,7 @@ class RORPath(RPathStatic): pass elif key == 'atime' and not Globals.preserve_atime: pass elif key == 'devloc' or key == 'inode' or key == 'nlink': pass + elif key == 'size' and self.isdir(): pass elif (not other.data.has_key(key) or self.data[key] != other.data[key]): return None return 1 diff --git a/rdiff-backup/src/Main.py b/rdiff-backup/src/Main.py index 76c652a..60435be 100644 --- a/rdiff-backup/src/Main.py +++ b/rdiff-backup/src/Main.py @@ -159,7 +159,7 @@ def set_action(): else: action = "backup" else: commandline_error("Too many arguments given") - if l == 0 and action != "server" and action != "test-server": + if l == 0 and action != "server": commandline_error("No arguments given") if l > 0 and action == "server": commandline_error("Too many arguments given") @@ -295,7 +295,7 @@ def backup_init_dirs(rpin, rpout): elif not datadir.lstat() and not force: Log.FatalError( """Destination directory %s exists, but does not look like a rdiff-backup directory. Running rdiff-backup like this could mess up -what is currently in it. If you want to overwrite it, run +what is currently in it. If you want to update or overwrite it, run rdiff-backup with the --force option.""" % rpout.path) if not rpout.lstat(): diff --git a/rdiff-backup/src/lazy.py b/rdiff-backup/src/lazy.py index 4c32b5d..e583676 100644 --- a/rdiff-backup/src/lazy.py +++ b/rdiff-backup/src/lazy.py @@ -339,7 +339,7 @@ class ITRBranch: def on_error(self, exc, *args): """This is run on any exception in start/end-process""" self.caught_exception = 1 - if args and isinstance(args[0], tuple): + if args and args[0] and isinstance(args[0], tuple): filename = os.path.join(*args[0]) elif self.index: filename = os.path.join(*self.index) else: filename = "." diff --git a/rdiff-backup/src/rpath.py b/rdiff-backup/src/rpath.py index 7365f14..14a68c7 100644 --- a/rdiff-backup/src/rpath.py +++ b/rdiff-backup/src/rpath.py @@ -250,6 +250,7 @@ class RORPath(RPathStatic): pass elif key == 'atime' and not Globals.preserve_atime: pass elif key == 'devloc' or key == 'inode' or key == 'nlink': pass + elif key == 'size' and self.isdir(): pass elif (not other.data.has_key(key) or self.data[key] != other.data[key]): return None return 1 -- cgit v1.2.1