Commit Graph

6349 Commits

Author SHA1 Message Date
Daira Hopwood
f5643636f4 Work in progress.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-09-02 16:06:03 +01:00
David Stainton
e6b98b54ad WIP 2015-09-02 15:10:53 +02:00
David Stainton
48ae3e0be5 Revert "Attempt to fix test_persistence"
This reverts commit 257d6665d2.
2015-09-01 14:35:03 +02:00
David Stainton
257d6665d2 Attempt to fix test_persistence
broken WIP, startup path was broken
2015-08-31 23:38:55 +02:00
David Stainton
bbf47cb278 Add db util function for retrieving all downloaded files 2015-08-31 23:38:31 +02:00
Daira Hopwood
5b3b8463ae More precise and correct error reporting in replace_file.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-08-31 18:05:33 +01:00
Daira Hopwood
8462a03ed0 Fix path handling in Downloader._process.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-08-31 17:54:08 +01:00
Daira Hopwood
754f99486b Make _write_downloaded_file return the path of the destination file.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-08-31 17:53:36 +01:00
Daira Hopwood
bfda47fef4 replace_file should not fail if replaced_path does not exist.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-08-31 17:52:55 +01:00
Daira Hopwood
472e267075 Restore some print statements.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-08-31 17:34:41 +01:00
Ramakrishnan Muthukrishnan
982c89a835 Move the test for _write_download_file() to test_magic_folder module 2015-08-31 13:54:05 +05:30
Ramakrishnan Muthukrishnan
9bf5f5c312 _process(): pass absolute path to the _write_download_file() 2015-08-31 13:53:48 +05:30
Ramakrishnan Muthukrishnan
eac7aefe26 WIP: test for _write_downloaded_file 2015-08-31 13:02:34 +05:30
Ramakrishnan Muthukrishnan
ef3cdd7db1 magic_folder: typo utimes -> utime 2015-08-31 12:51:05 +05:30
David Stainton
fbd400e6e5 more debugging print statements 2015-08-29 13:29:47 +02:00
David Stainton
09ee9d0e63 Uncomment alice bob test print statements 2015-08-28 15:19:51 +02:00
David Stainton
dfafd0e29c Remove stupid errback and raise proper conflict exception 2015-08-26 22:04:49 +02:00
David Stainton
24ec381dda Fix replace_file; rename only if replaced_path exists 2015-08-26 22:02:26 +02:00
David Stainton
47dc2c275c Add err print statement to show the conflict... 2015-08-26 17:50:03 +02:00
David Stainton
264138b44f Capture exceptions from conflict and write info in magic folder db 2015-08-26 16:50:35 +02:00
David Stainton
cdc4bc8e76 Fix _write_downloaded_file by adding base path 2015-08-26 15:28:44 +02:00
David Stainton
354280c26e Correct spelling is os.utime not utimes 2015-08-26 14:40:08 +02:00
Daira Hopwood
f113db62ac Add Downloader._write_downloaded_file. refs ticket:2489
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-08-25 16:02:36 +01:00
Daira Hopwood
552342f8b6 Remove debug prints in backupdb.py.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-08-24 17:53:13 +01:00
Daira Hopwood
6b8b952211 Remove or comment out print statements.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-08-24 17:49:34 +01:00
Daira Hopwood
1ba8b96726 Rename Client.upload_ready_d to connected_enough_d.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-08-24 17:41:57 +01:00
Daira Hopwood
0fde8b493a In Downloader._get_collective_latest_file, consume errors when getting metadata.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-08-24 17:17:24 +01:00
David Stainton
d0cadd17fd Teach uploader to process lazy tail upon stop method 2015-08-24 13:19:45 +02:00
David Stainton
0dc96dd951 Teach magic-folder ready method to return a deferred 2015-08-24 13:11:37 +02:00
Daira Hopwood
1957a30c52 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>
2015-08-20 19:45:49 +01:00
Daira Hopwood
76b3e4038a Use deferredutil.HookMixin to simplify callback for tests.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-08-20 16:58:55 +01:00
David Stainton
7297bb5fc1 Minor fix to alice bob test 2015-08-19 21:56:29 +02:00
David Stainton
14ea4497ae Fix _scan_remote and remove print statements 2015-08-19 21:45:20 +02:00
Daira Hopwood
decc5ff412 Fix incorrect order of fields in SQL statement.
My kingdom for a better SQL DSL.

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-08-19 15:33:52 +01:00
Daira Hopwood
db242c7652 Cleanup.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-08-19 15:33:08 +01:00
Daira Hopwood
fc14b47175 More debug prints.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-08-19 15:32:52 +01:00
Daira Hopwood
9eadfc5154 Debug prints to diagnose version mismatch after deletion (backupdb). 2015-08-19 13:48:11 +00:00
Daira Hopwood
5b23b354c6 Debug prints to diagnose version mismatch after deletion. 2015-08-19 13:31:38 +00:00
David Stainton
8a98a99979 Add some print statements. 2015-08-18 14:33:29 +00:00
Daira Hopwood
36680042d3 Merge pull request #184 from vu3rdd/2477.refactor-all-the-things.0
test for get_pathinfo()
2015-08-12 14:11:58 +01:00
Ramakrishnan Muthukrishnan
8adc28bb9d test_get_pathinfo: testdir is unnecessary
Use basedir itself, instead of creating another directory inside basedir.
2015-08-12 15:17:27 +05:30
Ramakrishnan Muthukrishnan
e49d76f68d test_get_pathinfo: rename the identifier d to testdir
d, by convention, is used for the Twisted Deferred objects.
2015-08-12 14:32:40 +05:30
Ramakrishnan Muthukrishnan
d36521997e 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.
2015-08-12 14:26:52 +05:30
Ramakrishnan Muthukrishnan
4bab676316 Add test for get_pathinfo() 2015-08-12 14:14:07 +05:30
Daira Hopwood
6eb272856e Use get_pathinfo instead of separate os.path.{is*,exists} calls.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-08-11 17:02:53 +01:00
Daira Hopwood
4f7c02c651 Extend get_pathinfo to add size, ctime and mtime.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-08-11 16:02:25 +01:00
Daira Hopwood
f2d40cea9b Remove an unnecessary precondition and an incorrect comment.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-08-11 15:46:31 +01:00
Daira Hopwood
5377f3bbd5 Add fileutil.get_pathinfo function.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-08-11 15:43:01 +01:00
Daira Hopwood
144f4ff5ff Extract get_metadata and get_filenode to methods of Uploader.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-08-11 15:21:10 +01:00
Daira Hopwood
8eb81b84f2 Processing symlinks and special files should not be an error.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-08-11 15:19:05 +01:00