From 72572a368a594e7a0efc145a0f5359502d2df9fb Mon Sep 17 00:00:00 2001 From: Mike Fleetwood Date: Sun, 4 May 2014 14:56:21 +0100 Subject: [PATCH] DEBUG: Log causes of Updated mirror temp file ... does not match Turn on verbosity >= 7 to see. --- rdiff_backup/rpath.py | 13 ++++++++++--- 1 files changed, 10 insertions(+), 3 deletions(-) diff --git a/rdiff_backup/rpath.py b/rdiff_backup/rpath.py index a22fb9f..3dc9f81 100644 --- a/rdiff_backup/rpath.py +++ b/rdiff_backup/rpath.py @@ -484,17 +484,24 @@ class RORPath: pass elif key == 'sha1': pass # one or other may not have set elif key == 'mirrorname' or key == 'incname': pass - elif (not other.data.has_key(key) or - self.data[key] != other.data[key]): + elif not other.data.has_key(key): + log.Log("Loose compare %s to %s: second has no attribute: %s" % (self.index, other.index, repr(key)), 7) + return 0 + elif self.data[key] != other.data[key]: + log.Log("Loose compare %s to %s: attribute differs: first.data[%s]=%s != second.data[%s]=%s" % (self.index, other.index, repr(key), repr(self.data[key]), repr(key), repr(other.data[key])), 7) return 0 if self.lstat() and not self.issym() and Globals.change_ownership: # Now compare ownership. Symlinks don't have ownership try: - if user_group.map_rpath(self) != other.getuidgid(): return 0 + if user_group.map_rpath(self) != other.getuidgid(): + log.Log("Loose compare %s to %s: user group mismatch: user_group.map_rpath(first)=%s != second.getuidgid()=%s" % (self.index, other.index, repr(user_group.map_rpath(self)), repr(other.getuidgid())), 7) + return 0 except KeyError: + log.Log("Loose compare %s to %s: KeyError exception testing user group match" % (self.index, other.index), 7) return 0 # uid/gid might be missing if metadata file is corrupt + log.Log("Loose compare %s to %s: OK" % (self.index, other.index), 7) return 1 def equal_verbose(self, other, check_index = 1, -- 1.7.1