mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2024-12-24 07:06:41 +00:00
WIP and debugging things
Conflicts: src/allmydata/test/test_magic_folder.py
This commit is contained in:
parent
58f9641179
commit
a50d0e5c8b
@ -50,8 +50,13 @@ def is_new_file(pathinfo, db_entry):
|
||||
return True
|
||||
|
||||
if not pathinfo.exists and db_entry.size is None:
|
||||
print("NOT because", pathinfo.exists, db_entry.size)
|
||||
return False
|
||||
|
||||
print("NOT because", pathinfo.size, pathinfo.ctime, pathinfo.mtime,
|
||||
db_entry.size, db_entry.ctime, db_entry.mtime,
|
||||
((pathinfo.size, pathinfo.ctime, pathinfo.mtime) !=
|
||||
(db_entry.size, db_entry.ctime, db_entry.mtime)))
|
||||
return ((pathinfo.size, pathinfo.ctime, pathinfo.mtime) !=
|
||||
(db_entry.size, db_entry.ctime, db_entry.mtime))
|
||||
|
||||
@ -348,7 +353,8 @@ class Uploader(QueueMixin):
|
||||
| IN_EXCL_UNLINK
|
||||
)
|
||||
self._notifier.watch(self._local_filepath, mask=self.mask, callbacks=[self._notify],
|
||||
recursive=True)
|
||||
recursive=False)#True)
|
||||
print "WATCHING", self._local_filepath
|
||||
|
||||
def start_monitoring(self):
|
||||
self._log("start_monitoring")
|
||||
|
@ -169,6 +169,7 @@ def join(options):
|
||||
"\nUse the 'tahoe magic-folder leave' command first.\n")
|
||||
return 1
|
||||
|
||||
print("ZINGA", dmd_cap_file)
|
||||
fileutil.write(dmd_cap_file, dmd_write_cap)
|
||||
fileutil.write(collective_readcap_file, magic_readonly_cap)
|
||||
|
||||
|
@ -28,6 +28,8 @@ from allmydata.util.fileutil import get_pathinfo
|
||||
from allmydata.util.fileutil import abspath_expanduser_unicode
|
||||
from allmydata.immutable.upload import Data
|
||||
|
||||
from twisted.internet.base import DelayedCall
|
||||
#DelayedCall.debug = True
|
||||
|
||||
class MagicFolderDbTests(unittest.TestCase):
|
||||
|
||||
@ -1423,12 +1425,9 @@ class RealTestAliceBob(MagicFolderAliceBobTestMixin, unittest.TestCase):
|
||||
|
||||
def notify(self, path, mask, magic=None, flush=True):
|
||||
# Writing to the filesystem causes the notification.
|
||||
# However, flushing filesystem buffers may be necessary on Windows.
|
||||
if flush:
|
||||
fileutil.flush_volume(path.path)
|
||||
# actually, there's no way to know when the actual
|
||||
# Actually, there's no way to know when the actual
|
||||
# notification will occur, and anyway we're not waiting for
|
||||
# them in any case...so we'll just fudge it and home 100ms is enough.
|
||||
# them in any case...so we'll just fudge it and hope 100ms is enough.
|
||||
return task.deferLater(reactor, 0.1, lambda: None)
|
||||
|
||||
try:
|
||||
|
@ -611,6 +611,7 @@ if sys.platform == "win32":
|
||||
None
|
||||
)
|
||||
if hVolume == INVALID_HANDLE_VALUE:
|
||||
print("ZINGA", abspath)
|
||||
raise WinError(get_last_error())
|
||||
|
||||
if FlushFileBuffers(hVolume) == 0:
|
||||
|
Loading…
Reference in New Issue
Block a user