352 |
|
|
353 |
def equal_verbose(self, other, check_index = 1, |
def equal_verbose(self, other, check_index = 1, |
354 |
compare_inodes = 0, compare_ownership = 0, |
compare_inodes = 0, compare_ownership = 0, |
355 |
compare_acls = 0, compare_eas = 0, verbosity = 2): |
compare_acls = 0, compare_eas = 0, compare_size = 1, |
356 |
|
compare_type = 1, verbosity = 2): |
357 |
"""Like __eq__, but log more information. Useful when testing""" |
"""Like __eq__, but log more information. Useful when testing""" |
358 |
if check_index and self.index != other.index: |
if check_index and self.index != other.index: |
359 |
log.Log("Index %s != index %s" % (self.index, other.index), |
log.Log("Index %s != index %s" % (self.index, other.index), |
365 |
(self.issym() or not compare_ownership)): |
(self.issym() or not compare_ownership)): |
366 |
# Don't compare gid/uid for symlinks, or if told not to |
# Don't compare gid/uid for symlinks, or if told not to |
367 |
pass |
pass |
368 |
|
elif key == 'type' and not compare_type: pass |
369 |
elif key == 'atime' and not Globals.preserve_atime: pass |
elif key == 'atime' and not Globals.preserve_atime: pass |
370 |
elif key == 'ctime': pass |
elif key == 'ctime': pass |
371 |
elif key == 'devloc' or key == 'nlink': pass |
elif key == 'devloc' or key == 'nlink': pass |
372 |
elif key == 'size' and not self.isreg(): pass |
elif key == 'size' and (not self.isreg() or not compare_size): pass |
373 |
elif key == 'inode' and (not self.isreg() or not compare_inodes): |
elif key == 'inode' and (not self.isreg() or not compare_inodes): |
374 |
pass |
pass |
375 |
elif key == 'ea' and not compare_eas: pass |
elif key == 'ea' and not compare_eas: pass |