3677 Commits

Author SHA1 Message Date
David Stainton
a845fe6da3 Change behavior upon finding missing files
- Fix test test_magic_folder
- Do not throw exception for missing files...
- Check for entry in magic folder db; only write tahoe metadata
deleted=true if magic folder db entry for file exists.
2015-07-21 00:42:34 +01:00
David Stainton
7c937eabe7 Add check_file_db_exists to backupdb api
- this backupdb utility function checks to if a file's entry
exists in the db but does not stat the file on disk or otherwise
talk to the filesystem
2015-07-21 00:42:34 +01:00
David Stainton
8b20399796 handle local file deletion events 2015-07-21 00:42:34 +01:00
Daira Hopwood
e68b09b081 Rename drop-upload to Magic Folder. fixes ticket:2405
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-07-21 00:42:15 +01:00
Daira Hopwood
3120499069 Remove a debug print.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-07-21 00:20:56 +01:00
Daira Hopwood
567cabc195 Remove unused code.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-07-21 00:20:56 +01:00
Daira Hopwood
d2950aaf62 Fix test errors.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-07-21 00:20:56 +01:00
David Stainton
5a8503a730 Minor code cleanup 2015-07-21 00:20:56 +01:00
David Stainton
899d8f5742 Add private config magic_folder_parent_dircap
- this commit also updates the tests
2015-07-21 00:20:56 +01:00
Daira Hopwood
1ce31cc9a7 Add parent_dircap stub argument to DropUploader. refs ticket:2441
Author: David Stainton <david@leastauthority.com>
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-07-21 00:20:55 +01:00
Daira Hopwood
1ef48fe868 Add IN_MOVED_FROM to inotify mask.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-07-21 00:20:55 +01:00
Daira Hopwood
b19eb94c7e Explicitly pass overwrite=True to add_file. (It is the default, but this is clearer.)
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-07-21 00:20:55 +01:00
Daira Hopwood
c27eafcb5c More fixes to drop-upload tests.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-07-21 00:20:55 +01:00
Daira Hopwood
aaed7ee8d7 Fix drop-upload tests. refs ticket:2427
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-07-21 00:20:55 +01:00
Daira Hopwood
7802d3e350 Fix an incorrect addCallback.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-07-21 00:20:55 +01:00
Daira Hopwood
a2cb04fe7d fileutil: make the error behaviour of replace_file on Unix more similar to Windows.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-07-21 00:20:55 +01:00
Daira Hopwood
3cffe2599e fileutil.py: add rename_no_overwrite and replace_file.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-07-21 00:20:55 +01:00
Daira Hopwood
3854501e4b WIP debugging.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-07-21 00:20:55 +01:00
Daira Hopwood
cd0b360912 Cosmetics.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-07-21 00:20:55 +01:00
David Stainton
184a716a14 WIP 2015-07-21 00:20:55 +01:00
David Stainton
abe591e5f8 fix more inotify test calls 2015-07-21 00:20:55 +01:00
David Stainton
364526fd66 Clean up test at end
this gets rid of the dirty reactor
2015-07-21 00:20:55 +01:00
David Stainton
6aefeb2ea7 Copy all daira code from other branch... 2015-07-21 00:20:55 +01:00
David Stainton
1a5726eda4 Test inotify with event agnostic notify
def notify(self, path, mask)
instead of
def notify_close_write(self, path)
2015-07-21 00:20:55 +01:00
David Stainton
9c4b780c35 Add sleep to test 2015-07-21 00:20:55 +01:00
David Stainton
036b586cfd WIP 2015-07-21 00:20:55 +01:00
Daira Hopwood
f6fbc7255b Disable use of Unicode-mode FilePaths on non-Windows platorms. fixes ticket:2444
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-07-21 00:20:55 +01:00
Daira Hopwood
7223c2821e Teach uploader to use flat hierarchy. refs ticket:2442
Author: David Stainton <david@leastauthority.com>
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-07-21 00:20:55 +01:00
David Stainton
91dab93b3b Add Magic Folder path encoding. refs ticket:2442 2015-07-21 00:20:55 +01:00
Daira Hopwood
c5916adacd Move backupdb out of scripts. fixes ticket:2408
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-07-21 00:20:48 +01:00
Daira Hopwood
d4a708d16e Process directories unconditionally.
Also pass overwrite=False and suppress ExistingChildError when creating a
subdirectory, to avoid orphaning any existing directory.

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-07-21 00:19:12 +01:00
Daira Hopwood
ceb84605b9 autoAdd isn't needed now that we add watches for subdirectories manually.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-07-21 00:19:12 +01:00
Daira Hopwood
ae7808c212 WIP
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-07-21 00:19:12 +01:00
Daira Hopwood
a9ecbba380 Teach uploader to keep object stats, not file stats.
We keep track of objects instead of files so that we are
not forced to determine the object type (file, directory,
symlink, special file etc.)

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-07-21 00:19:12 +01:00
Daira Hopwood
39c8b97503 Add ignore count to uploaded callback.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-07-21 00:19:12 +01:00
Daira Hopwood
164b23c399 Teach StorageFarmBroker to fire a deferred when a connection threshold is reached. refs #1449
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-07-21 00:19:12 +01:00
Daira Hopwood
67239ffa9c Enable Windows inotify support.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-07-21 00:19:12 +01:00
Daira Hopwood
1607724c59 New code for Windows drop-upload support. refs #1431
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-07-21 00:19:12 +01:00
Daira Hopwood
5153dff291 Add magic folder db.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-07-21 00:19:12 +01:00
Daira Hopwood
b37478195f Unicode path fixes for drop-upload.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-07-21 00:19:12 +01:00
Daira Hopwood
c830419e04 Eliminate mock dependency.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-07-17 22:12:25 +01:00
Daira Hopwood
3ae6ceb6a8 Add Namespace utility class. (This is already used in the leasedb/cloud backend branch.)
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-07-17 22:12:25 +01:00
Daira Hopwood
2d7c852ace Bump pyasn1 requirement to >= 0.1.8.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-07-16 15:38:06 +01:00
Daira Hopwood
baaf2a4a55 Blacklist mock > 1.0.1.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-07-16 15:24:45 +01:00
Brian Warner
28b74b0b74 test/check_load: hush (newer) pyflakes
pyflakes-0.9.2 gets confused about list comprehensions, so rename the
loop variable even though we'd deleted that name already.
2015-07-12 18:25:55 -07:00
Brian Warner
7aedd7c1b2 test_web: avoid IP autodetection, was causing dirty reactor 2015-07-12 18:20:43 -07:00
Daira Hopwood
f18da535c9 Remove packages from not_import_versionable that we now can always version.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-06-02 18:12:23 +01:00
Daira Hopwood
96024d7244 Add OpenSSL version check and tests. refs ticket:2215
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-06-02 18:07:20 +01:00
Brian Warner
45ebbbf44b wrap long lines, and tolerate various-width wrappings of the --help output
test_cli.Help was too sensitive to the way that the --help output was
wrapped, which caused failures on travis when COLUMNS= was set low and
the expected strings were split across separate lines.
2015-05-26 11:40:17 -07:00
Brian Warner
8f41713fe9 cli: improve formatting of all commands
Also:

* do some light refactoring of create-client/node
* make it clear that these commands' --basedir options do the same as
  the global --node-directory option
* use "global-options" instead of "global-opts"
2015-05-26 11:31:06 -07:00