from bup.helpers import (add_error, log, merge_iter, mmap_readwrite,
progress, qprogress, resolve_parent, slashappend)
-if compat.py_maj > 2:
- from bup.compat import buffer
-
-import sys
-
EMPTY_SHA = b'\0' * 20
FAKE_SHA = b'\x01' * 20
except EOFError:
pass
except:
- log('index metadata in %r appears to be corrupt' % filename)
+ log('index metadata in %r appears to be corrupt\n' % filename)
raise
finally:
m_file.close()
log('pack error: %s (%r)\n' % (e, self))
raise
- def stale(self, st, tstart, check_device=True):
+ def stale(self, st, check_device=True):
if self.size != st.st_size:
return True
if self.mtime != st.st_mtime:
return True
if check_device and (self.dev != st.st_dev):
return True
- # Check that the ctime's "second" is at or after tstart's.
- ctime_sec_in_ns = xstat.fstime_floor_secs(st.st_ctime) * 10**9
- if ctime_sec_in_ns >= tstart:
- return True
return False
def update_from_stat(self, st, meta_ofs):
def __eq__(self, other):
return self._cmp(other) == 0
- def __ne__():
+ def __ne__(self, other):
return self._cmp(other) != 0
def __lt__(self, other):
def __gt__(self, other):
return self._cmp(other) > 0
- def __le__():
+ def __le__(self, other):
return self._cmp(other) <= 0
- def __ge__():
+ def __ge__(self, other):
return self._cmp(other) >= 0
def write(self, f):