# in from_stat().
meta.ctime = meta.mtime = meta.atime = 0
meta_ofs = msw.store(meta)
- rig.cur.from_stat(pst, meta_ofs, tstart)
+ rig.cur.from_stat(pst, meta_ofs, tstart,
+ check_device=opt.check_device)
if not (rig.cur.flags & index.IX_HASHVALID):
if hashgen:
(rig.cur.gitmode, rig.cur.sha) = hashgen(path)
Options:
H,hash print the hash for each object next to its name
l,long print more information about each file
+no-check-device don't invalidate an entry if the containing device changes
fake-valid mark all index entries as up-to-date even if they aren't
fake-invalid mark all index entries as invalid
f,indexfile= the name of the index file (normally BUP_DIR/bupindex)
log('pack error: %s (%r)\n' % (e, self))
raise
- def from_stat(self, st, meta_ofs, tstart):
- old = (self.dev, self.ino, self.nlink, self.ctime, self.mtime,
+ def from_stat(self, st, meta_ofs, tstart, check_device=True):
+ old = (self.dev if check_device else 0,
+ self.ino, self.nlink, self.ctime, self.mtime,
self.uid, self.gid, self.size, self.flags & IX_EXISTS)
- new = (st.st_dev, st.st_ino, st.st_nlink, st.st_ctime, st.st_mtime,
+ new = (st.st_dev if check_device else 0,
+ st.st_ino, st.st_nlink, st.st_ctime, st.st_mtime,
st.st_uid, st.st_gid, st.st_size, IX_EXISTS)
self.dev = st.st_dev
self.ino = st.st_ino