Commit ba1b31b9 authored by ben's avatar ben

Various changes, including stopped checking directory sizes when

comparing RORPaths.


git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup@190 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
parent f8df9288
...@@ -159,7 +159,7 @@ def set_action(): ...@@ -159,7 +159,7 @@ def set_action():
else: action = "backup" else: action = "backup"
else: commandline_error("Too many arguments given") 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") commandline_error("No arguments given")
if l > 0 and action == "server": if l > 0 and action == "server":
commandline_error("Too many arguments given") commandline_error("Too many arguments given")
...@@ -295,7 +295,7 @@ def backup_init_dirs(rpin, rpout): ...@@ -295,7 +295,7 @@ def backup_init_dirs(rpin, rpout):
elif not datadir.lstat() and not force: Log.FatalError( elif not datadir.lstat() and not force: Log.FatalError(
"""Destination directory %s exists, but does not look like a """Destination directory %s exists, but does not look like a
rdiff-backup directory. Running rdiff-backup like this could mess up 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) rdiff-backup with the --force option.""" % rpout.path)
if not rpout.lstat(): if not rpout.lstat():
......
...@@ -339,7 +339,7 @@ class ITRBranch: ...@@ -339,7 +339,7 @@ class ITRBranch:
def on_error(self, exc, *args): def on_error(self, exc, *args):
"""This is run on any exception in start/end-process""" """This is run on any exception in start/end-process"""
self.caught_exception = 1 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]) filename = os.path.join(*args[0])
elif self.index: filename = os.path.join(*self.index) elif self.index: filename = os.path.join(*self.index)
else: filename = "." else: filename = "."
......
...@@ -250,6 +250,7 @@ class RORPath(RPathStatic): ...@@ -250,6 +250,7 @@ class RORPath(RPathStatic):
pass pass
elif key == 'atime' and not Globals.preserve_atime: pass elif key == 'atime' and not Globals.preserve_atime: pass
elif key == 'devloc' or key == 'inode' or key == 'nlink': 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 elif (not other.data.has_key(key) or
self.data[key] != other.data[key]): return None self.data[key] != other.data[key]): return None
return 1 return 1
......
...@@ -159,7 +159,7 @@ def set_action(): ...@@ -159,7 +159,7 @@ def set_action():
else: action = "backup" else: action = "backup"
else: commandline_error("Too many arguments given") 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") commandline_error("No arguments given")
if l > 0 and action == "server": if l > 0 and action == "server":
commandline_error("Too many arguments given") commandline_error("Too many arguments given")
...@@ -295,7 +295,7 @@ def backup_init_dirs(rpin, rpout): ...@@ -295,7 +295,7 @@ def backup_init_dirs(rpin, rpout):
elif not datadir.lstat() and not force: Log.FatalError( elif not datadir.lstat() and not force: Log.FatalError(
"""Destination directory %s exists, but does not look like a """Destination directory %s exists, but does not look like a
rdiff-backup directory. Running rdiff-backup like this could mess up 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) rdiff-backup with the --force option.""" % rpout.path)
if not rpout.lstat(): if not rpout.lstat():
......
...@@ -339,7 +339,7 @@ class ITRBranch: ...@@ -339,7 +339,7 @@ class ITRBranch:
def on_error(self, exc, *args): def on_error(self, exc, *args):
"""This is run on any exception in start/end-process""" """This is run on any exception in start/end-process"""
self.caught_exception = 1 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]) filename = os.path.join(*args[0])
elif self.index: filename = os.path.join(*self.index) elif self.index: filename = os.path.join(*self.index)
else: filename = "." else: filename = "."
......
...@@ -250,6 +250,7 @@ class RORPath(RPathStatic): ...@@ -250,6 +250,7 @@ class RORPath(RPathStatic):
pass pass
elif key == 'atime' and not Globals.preserve_atime: pass elif key == 'atime' and not Globals.preserve_atime: pass
elif key == 'devloc' or key == 'inode' or key == 'nlink': 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 elif (not other.data.has_key(key) or
self.data[key] != other.data[key]): return None self.data[key] != other.data[key]): return None
return 1 return 1
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment