tahoe-lafs/tahoe-lafs.git
9 years agoMake _write_downloaded_file return the path of the destination file.
Daira Hopwood [Tue, 15 Sep 2015 17:39:54 +0000 (18:39 +0100)]
Make _write_downloaded_file return the path of the destination file.

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
9 years agoreplace_file should not fail if replaced_path does not exist.
Daira Hopwood [Tue, 15 Sep 2015 17:31:20 +0000 (18:31 +0100)]
replace_file should not fail if replaced_path does not exist.

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
9 years agoMove the test for _write_download_file() to test_magic_folder module
Ramakrishnan Muthukrishnan [Mon, 31 Aug 2015 08:24:05 +0000 (13:54 +0530)]
Move the test for _write_download_file() to test_magic_folder module

9 years agoWIP: test for _write_downloaded_file
Ramakrishnan Muthukrishnan [Mon, 31 Aug 2015 07:32:34 +0000 (13:02 +0530)]
WIP: test for _write_downloaded_file

9 years agomore debugging print statements
David Stainton [Sat, 29 Aug 2015 11:29:47 +0000 (13:29 +0200)]
more debugging print statements

9 years agoUncomment alice bob test print statements
David Stainton [Fri, 28 Aug 2015 13:19:51 +0000 (15:19 +0200)]
Uncomment alice bob test print statements

9 years agoRemove stupid errback and raise proper conflict exception
David Stainton [Wed, 26 Aug 2015 20:04:49 +0000 (22:04 +0200)]
Remove stupid errback and raise proper conflict exception

9 years agoFix replace_file; rename only if replaced_path exists
David Stainton [Wed, 26 Aug 2015 20:02:26 +0000 (22:02 +0200)]
Fix replace_file; rename only if replaced_path exists

9 years agoAdd err print statement to show the conflict...
David Stainton [Wed, 26 Aug 2015 15:50:03 +0000 (17:50 +0200)]
Add err print statement to show the conflict...

9 years agoCapture exceptions from conflict and write info in magic folder db
David Stainton [Wed, 26 Aug 2015 14:50:35 +0000 (16:50 +0200)]
Capture exceptions from conflict and write info in magic folder db

9 years agoFix _write_downloaded_file by adding base path
David Stainton [Wed, 26 Aug 2015 13:28:44 +0000 (15:28 +0200)]
Fix _write_downloaded_file by adding base path

9 years agoCorrect spelling is os.utime not utimes
David Stainton [Wed, 26 Aug 2015 12:40:08 +0000 (14:40 +0200)]
Correct spelling is os.utime not utimes

9 years agoAdd Downloader._write_downloaded_file. refs ticket:2489
Daira Hopwood [Tue, 25 Aug 2015 15:02:36 +0000 (16:02 +0100)]
Add Downloader._write_downloaded_file. refs ticket:2489

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
9 years agoRemove debug prints in backupdb.py.
Daira Hopwood [Mon, 24 Aug 2015 16:53:13 +0000 (17:53 +0100)]
Remove debug prints in backupdb.py.

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
9 years agoRemove or comment out print statements.
Daira Hopwood [Mon, 24 Aug 2015 16:49:34 +0000 (17:49 +0100)]
Remove or comment out print statements.

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
9 years agoRename Client.upload_ready_d to connected_enough_d.
Daira Hopwood [Mon, 24 Aug 2015 16:41:57 +0000 (17:41 +0100)]
Rename Client.upload_ready_d to connected_enough_d.

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
9 years agoIn Downloader._get_collective_latest_file, consume errors when getting metadata.
Daira Hopwood [Mon, 24 Aug 2015 16:17:24 +0000 (17:17 +0100)]
In Downloader._get_collective_latest_file, consume errors when getting metadata.

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
9 years agoTeach uploader to process lazy tail upon stop method
David Stainton [Mon, 24 Aug 2015 11:19:45 +0000 (13:19 +0200)]
Teach uploader to process lazy tail upon stop method

9 years agoTeach magic-folder ready method to return a deferred
David Stainton [Mon, 24 Aug 2015 11:11:37 +0000 (13:11 +0200)]
Teach magic-folder ready method to return a deferred

9 years agoFix a bug in Downloader._scan_remote that incorrectly skips subsequent files
Daira Hopwood [Thu, 20 Aug 2015 18:45:49 +0000 (19:45 +0100)]
Fix a bug in Downloader._scan_remote that incorrectly skips subsequent files
(and drops a Deferred) when local version >= remote version.
Also simplify that code and robustify it for the case where the version metadata is missing.

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
9 years agoUse deferredutil.HookMixin to simplify callback for tests.
Daira Hopwood [Thu, 20 Aug 2015 15:58:55 +0000 (16:58 +0100)]
Use deferredutil.HookMixin to simplify callback for tests.

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
9 years agoMinor fix to alice bob test
David Stainton [Wed, 19 Aug 2015 19:56:29 +0000 (21:56 +0200)]
Minor fix to alice bob test

9 years agoFix _scan_remote and remove print statements
David Stainton [Wed, 19 Aug 2015 19:45:20 +0000 (21:45 +0200)]
Fix _scan_remote and remove print statements

9 years agoFix incorrect order of fields in SQL statement.
Daira Hopwood [Wed, 19 Aug 2015 14:33:52 +0000 (15:33 +0100)]
Fix incorrect order of fields in SQL statement.
My kingdom for a better SQL DSL.

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
9 years agoCleanup.
Daira Hopwood [Wed, 19 Aug 2015 14:33:08 +0000 (15:33 +0100)]
Cleanup.

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
9 years agoMore debug prints.
Daira Hopwood [Wed, 19 Aug 2015 14:32:52 +0000 (15:32 +0100)]
More debug prints.

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
9 years agoDebug prints to diagnose version mismatch after deletion (backupdb).
Daira Hopwood [Wed, 19 Aug 2015 13:48:11 +0000 (13:48 +0000)]
Debug prints to diagnose version mismatch after deletion (backupdb).

9 years agoDebug prints to diagnose version mismatch after deletion.
Daira Hopwood [Wed, 19 Aug 2015 13:31:38 +0000 (13:31 +0000)]
Debug prints to diagnose version mismatch after deletion.

9 years agoAdd some print statements.
David Stainton [Tue, 18 Aug 2015 14:33:29 +0000 (14:33 +0000)]
Add some print statements.

9 years agotest_get_pathinfo: testdir is unnecessary
Ramakrishnan Muthukrishnan [Wed, 12 Aug 2015 09:47:27 +0000 (15:17 +0530)]
test_get_pathinfo: testdir is unnecessary

Use basedir itself, instead of creating another directory inside basedir.

9 years agotest_get_pathinfo: rename the identifier d to testdir
Ramakrishnan Muthukrishnan [Wed, 12 Aug 2015 09:02:40 +0000 (14:32 +0530)]
test_get_pathinfo: rename the identifier d to testdir

d, by convention, is used for the Twisted Deferred objects.

9 years agoadd more tests for get_pathinfo()
Ramakrishnan Muthukrishnan [Wed, 12 Aug 2015 08:56:52 +0000 (14:26 +0530)]
add more tests for get_pathinfo()

When operating on a file, test if the "file" is not a directory
or a symlink. Likewise for directory and symlink.

9 years agoAdd test for get_pathinfo()
Ramakrishnan Muthukrishnan [Wed, 12 Aug 2015 08:43:13 +0000 (14:13 +0530)]
Add test for get_pathinfo()

9 years agoUse get_pathinfo instead of separate os.path.{is*,exists} calls.
Daira Hopwood [Tue, 11 Aug 2015 16:02:53 +0000 (17:02 +0100)]
Use get_pathinfo instead of separate os.path.{is*,exists} calls.

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
9 years agoExtend get_pathinfo to add size, ctime and mtime.
Daira Hopwood [Tue, 11 Aug 2015 15:02:25 +0000 (16:02 +0100)]
Extend get_pathinfo to add size, ctime and mtime.

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
9 years agoRemove an unnecessary precondition and an incorrect comment.
Daira Hopwood [Tue, 11 Aug 2015 14:46:31 +0000 (15:46 +0100)]
Remove an unnecessary precondition and an incorrect comment.

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
9 years agoAdd fileutil.get_pathinfo function.
Daira Hopwood [Tue, 11 Aug 2015 14:43:01 +0000 (15:43 +0100)]
Add fileutil.get_pathinfo function.

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
9 years agoExtract get_metadata and get_filenode to methods of Uploader.
Daira Hopwood [Tue, 11 Aug 2015 14:21:10 +0000 (15:21 +0100)]
Extract get_metadata and get_filenode to methods of Uploader.

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
9 years agoProcessing symlinks and special files should not be an error.
Daira Hopwood [Tue, 11 Aug 2015 14:19:05 +0000 (15:19 +0100)]
Processing symlinks and special files should not be an error.

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
9 years agoRefactor uploader by inlining _add_file into _process._maybe_upload.
Daira Hopwood [Tue, 11 Aug 2015 14:17:16 +0000 (15:17 +0100)]
Refactor uploader by inlining _add_file into _process._maybe_upload.

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
9 years agoRefactor uploader by inlining _add_file into _process._maybe_upload.
Daira Hopwood [Tue, 11 Aug 2015 14:09:56 +0000 (15:09 +0100)]
Refactor uploader by inlining _add_file into _process._maybe_upload.

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
9 years agoRefactor uploader by extracting _process_child to a top-level method.
Daira Hopwood [Tue, 11 Aug 2015 14:06:27 +0000 (15:06 +0100)]
Refactor uploader by extracting _process_child to a top-level method.

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
9 years agoSwap two checks to clarify which is failing.
Daira Hopwood [Tue, 11 Aug 2015 14:04:36 +0000 (15:04 +0100)]
Swap two checks to clarify which is failing.

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
9 years agofix code that adds version number of deleted file to magic-folder db
David Stainton [Fri, 31 Jul 2015 22:55:15 +0000 (15:55 -0700)]
fix code that adds version number of deleted file to magic-folder db

9 years agoenable version checking tests - currently a righteous fail
David Stainton [Fri, 31 Jul 2015 22:08:35 +0000 (15:08 -0700)]
enable version checking tests - currently a righteous fail

9 years agomake various changes - work in progress
David Stainton [Fri, 31 Jul 2015 22:06:12 +0000 (15:06 -0700)]
make various changes - work in progress

9 years agoadd version checking to alice bob test
David Stainton [Fri, 31 Jul 2015 18:09:30 +0000 (11:09 -0700)]
add version checking to alice bob test

9 years agoUpdate magic-folder db after download
David Stainton [Fri, 31 Jul 2015 17:51:19 +0000 (10:51 -0700)]
Update magic-folder db after download

9 years agoAdd final download to alice bob test
David Stainton [Thu, 30 Jul 2015 21:13:39 +0000 (14:13 -0700)]
Add final download to alice bob test

- that is to say after alice deletes the file she rewrites it
and this causes bob to download this latest version

9 years agoRemove old unused append to deque function from downloader
David Stainton [Thu, 30 Jul 2015 20:57:29 +0000 (13:57 -0700)]
Remove old unused append to deque function from downloader

9 years agoWIP to unify queue processing between uploader and downloader.
Daira Hopwood [Thu, 30 Jul 2015 17:52:05 +0000 (18:52 +0100)]
WIP to unify queue processing between uploader and downloader.

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
9 years agoRepair tests.
Daira Hopwood [Thu, 30 Jul 2015 17:12:50 +0000 (18:12 +0100)]
Repair tests.

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
9 years agoMove uploader's _append_to_deque and _turn_deque to QueueMixin.
Daira Hopwood [Thu, 30 Jul 2015 17:04:44 +0000 (18:04 +0100)]
Move uploader's _append_to_deque and _turn_deque to QueueMixin.

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
9 years agoMake sure that counter names and log messages include "uploader" or "downloader".
Daira Hopwood [Thu, 30 Jul 2015 17:04:13 +0000 (18:04 +0100)]
Make sure that counter names and log messages include "uploader" or "downloader".

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
9 years agoTrivial fix.
Daira Hopwood [Thu, 30 Jul 2015 15:24:57 +0000 (16:24 +0100)]
Trivial fix.

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
9 years agoremove debugging print statements
David Stainton [Wed, 29 Jul 2015 00:52:27 +0000 (17:52 -0700)]
remove debugging print statements

9 years agoFix alice bob test
David Stainton [Wed, 29 Jul 2015 00:46:46 +0000 (17:46 -0700)]
Fix alice bob test

9 years agoTeach downloader to stop when told to stop
David Stainton [Wed, 29 Jul 2015 00:02:51 +0000 (17:02 -0700)]
Teach downloader to stop when told to stop

9 years agoAdd logic to only add object to download queue when appropriate
David Stainton [Tue, 28 Jul 2015 18:09:35 +0000 (11:09 -0700)]
Add logic to only add object to download queue when appropriate

9 years agowip
David Stainton [Tue, 28 Jul 2015 00:00:39 +0000 (17:00 -0700)]
wip

9 years agoTry to fix some tests - WIP.
Daira Hopwood [Mon, 27 Jul 2015 16:51:40 +0000 (17:51 +0100)]
Try to fix some tests - WIP.

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
9 years agoRename and refactor path variables to be more consistent.
Daira Hopwood [Mon, 27 Jul 2015 16:51:25 +0000 (17:51 +0100)]
Rename and refactor path variables to be more consistent.

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
9 years agoWIP - fix some bugs
David Stainton [Fri, 24 Jul 2015 22:12:57 +0000 (15:12 -0700)]
WIP - fix some bugs

9 years agoRefactor MagicFolder into Uploader and Downloader classes (WIP). refs ticket:2477
Daira Hopwood [Thu, 23 Jul 2015 23:27:26 +0000 (00:27 +0100)]
Refactor MagicFolder into Uploader and Downloader classes (WIP). refs ticket:2477

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
9 years agoSimplify and document the type of MagicFolder._download_scan_batch.
Daira Hopwood [Thu, 23 Jul 2015 22:15:24 +0000 (23:15 +0100)]
Simplify and document the type of MagicFolder._download_scan_batch.

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
9 years agoRemove redundant call to abspath_expanduser_unicode.
Daira Hopwood [Thu, 23 Jul 2015 21:53:16 +0000 (22:53 +0100)]
Remove redundant call to abspath_expanduser_unicode.

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
9 years agoReduce code duplication and make sure errors from delegate commands are output.
Daira Hopwood [Mon, 20 Jul 2015 22:46:03 +0000 (23:46 +0100)]
Reduce code duplication and make sure errors from delegate commands are output.

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
9 years agoChange INVITE_SEPARATOR to '+'.
Daira Hopwood [Mon, 20 Jul 2015 22:03:02 +0000 (23:03 +0100)]
Change INVITE_SEPARATOR to '+'.

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
9 years agoRename MagicFolderCLITestMixin to MagicFolderTestMixin.
Daira Hopwood [Mon, 20 Jul 2015 22:01:44 +0000 (23:01 +0100)]
Rename MagicFolderCLITestMixin to MagicFolderTestMixin.

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
9 years agoFix tests.
Daira Hopwood [Mon, 20 Jul 2015 17:13:08 +0000 (18:13 +0100)]
Fix tests.

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
9 years agoAdd checks (that currently fail) for version in local db.
Daira Hopwood [Mon, 20 Jul 2015 16:31:39 +0000 (17:31 +0100)]
Add checks (that currently fail) for version in local db.

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
9 years agoUse relative paths in magic folder db.
Daira Hopwood [Mon, 20 Jul 2015 16:30:56 +0000 (17:30 +0100)]
Use relative paths in magic folder db.

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
9 years agoWIP
Daira Hopwood [Mon, 20 Jul 2015 16:27:57 +0000 (17:27 +0100)]
WIP

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
9 years agoFix some pyflakes errors and warnings.
Daira Hopwood [Thu, 16 Jul 2015 17:41:44 +0000 (18:41 +0100)]
Fix some pyflakes errors and warnings.

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
9 years agoRepair backupdb.
Daira Hopwood [Thu, 16 Jul 2015 16:55:02 +0000 (17:55 +0100)]
Repair backupdb.

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
9 years agofix bug in test_errors and add test
David Stainton [Wed, 15 Jul 2015 23:54:26 +0000 (16:54 -0700)]
fix bug in test_errors and add test

- test that we report the correct error when
a write cap is passed as a collective dircap

9 years agoadd kw arg to _get_count for tests
David Stainton [Wed, 15 Jul 2015 23:16:33 +0000 (16:16 -0700)]
add kw arg to _get_count for tests

9 years agomake test_magic_folder use non-ascii chars in nickname
David Stainton [Wed, 15 Jul 2015 22:43:53 +0000 (15:43 -0700)]
make test_magic_folder use non-ascii chars in nickname

9 years agoMake alice bob test use non-ascii chars in nicknames
David Stainton [Wed, 15 Jul 2015 22:37:40 +0000 (15:37 -0700)]
Make alice bob test use non-ascii chars in nicknames

9 years agoadd comments and blank lines to make setup_alice_and_bob more readable
David Stainton [Wed, 15 Jul 2015 22:33:33 +0000 (15:33 -0700)]
add comments and blank lines to make setup_alice_and_bob more readable

9 years agorename to do_invite and do_join for tests
David Stainton [Wed, 15 Jul 2015 22:29:52 +0000 (15:29 -0700)]
rename to do_invite and do_join for tests

9 years agorename to do_create_magic_folder for tests
David Stainton [Wed, 15 Jul 2015 22:23:09 +0000 (15:23 -0700)]
rename to do_create_magic_folder for tests

9 years agorevert previous additional blank line
David Stainton [Wed, 15 Jul 2015 22:16:52 +0000 (15:16 -0700)]
revert previous additional blank line

9 years agowrap long import line
David Stainton [Wed, 15 Jul 2015 22:15:33 +0000 (15:15 -0700)]
wrap long import line

9 years agowrap long line and spell magic folder without hyphen
David Stainton [Wed, 15 Jul 2015 22:14:18 +0000 (15:14 -0700)]
wrap long line and spell magic folder without hyphen

9 years agoSpell magic folder without the hyphen
David Stainton [Wed, 15 Jul 2015 22:11:26 +0000 (15:11 -0700)]
Spell magic folder without the hyphen

9 years agowrap long line
David Stainton [Wed, 15 Jul 2015 22:09:40 +0000 (15:09 -0700)]
wrap long line

9 years agoreplace bare asserts with usage error message
David Stainton [Wed, 15 Jul 2015 22:07:24 +0000 (15:07 -0700)]
replace bare asserts with usage error message

9 years agoget rid of another diminish hack and force alias args to end with ':'
David Stainton [Wed, 15 Jul 2015 21:22:15 +0000 (14:22 -0700)]
get rid of another diminish hack and force alias args to end with ':'

9 years agoget rid of terrible diminish cap hack
David Stainton [Wed, 15 Jul 2015 20:57:58 +0000 (13:57 -0700)]
get rid of terrible diminish cap hack

9 years agominor corrections
David Stainton [Wed, 15 Jul 2015 19:35:10 +0000 (12:35 -0700)]
minor corrections

9 years agoslightly better error message
David Stainton [Wed, 15 Jul 2015 19:32:53 +0000 (12:32 -0700)]
slightly better error message

9 years agochange spelling module variable INVITE_SEPARATOR
David Stainton [Wed, 15 Jul 2015 19:30:05 +0000 (12:30 -0700)]
change spelling module variable INVITE_SEPARATOR

9 years agodon't double increment version
David Stainton [Wed, 15 Jul 2015 19:24:00 +0000 (12:24 -0700)]
don't double increment version

9 years agostart with version 0
David Stainton [Wed, 15 Jul 2015 19:21:54 +0000 (12:21 -0700)]
start with version 0

9 years agosimplify _db_file_is_uploaded
David Stainton [Wed, 15 Jul 2015 19:19:08 +0000 (12:19 -0700)]
simplify _db_file_is_uploaded

9 years agobetter handle download failures
David Stainton [Wed, 15 Jul 2015 19:18:05 +0000 (12:18 -0700)]
better handle download failures

9 years agoremove superfluous plus sign
David Stainton [Wed, 15 Jul 2015 19:15:25 +0000 (12:15 -0700)]
remove superfluous plus sign

9 years agofix remote scan procedure
David Stainton [Wed, 15 Jul 2015 19:14:12 +0000 (12:14 -0700)]
fix remote scan procedure

9 years agoreplace calls to filter with list comprehension
David Stainton [Tue, 14 Jul 2015 23:43:49 +0000 (16:43 -0700)]
replace calls to filter with list comprehension