]> arthur.barton.de Git - bup.git/blobdiff - lib/bup/index.py
index: add newline to 'corrupt index' message
[bup.git] / lib / bup / index.py
index 2e7e5eca7a9e2c3f043423c8f0cbc296d51191ea..6b773ceac74d86e7f5bd455fa2a3e41604fce9a4 100644 (file)
@@ -8,11 +8,6 @@ from bup.compat import range
 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
 
@@ -95,7 +90,7 @@ class MetaStoreWriter:
             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()
@@ -205,7 +200,7 @@ class Entry:
             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:
@@ -224,10 +219,6 @@ class Entry:
             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):
@@ -305,7 +296,7 @@ class Entry:
     def __eq__(self, other):
         return self._cmp(other) == 0
 
-    def __ne__():
+    def __ne__(self, other):
         return self._cmp(other) != 0
 
     def __lt__(self, other):
@@ -314,10 +305,10 @@ class Entry:
     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):