Commit Graph

6327 Commits

Author SHA1 Message Date
Brian Warner
48da2cd99b tahoe_cp: be consistent with "source.basename() is None" testing 2015-03-17 11:13:57 -07:00
Brian Warner
190743e066 tahoe_cp: minor cleanups, no behavior changes 2015-03-17 11:13:33 -07:00
Brian Warner
1838fe8eaf tahoe_cp: make populate(recurse=) more explicit 2015-03-17 11:11:11 -07:00
Brian Warner
f508a98622 test_cli_cp: test cleanups
* remove redundant test cases
* add more internal asserts
* clean up set usage
2015-03-17 10:41:01 -07:00
Brian Warner
415b7b7bca test_cli_cp: improve test cases 2015-03-17 09:59:34 -07:00
Brian Warner
f3a9be1c5e improve error message for slash-terminated non-directories 2015-03-10 09:17:17 -07:00
Brian Warner
e80697da1b test_cli_cp.py: turn off debug mode, tests now assert for real 2015-03-03 18:20:03 -08:00
Brian Warner
2a361bc46f tahoe cp: overhaul target assignment, update tests
This substantially changes the internals of "tahoe cp", to behave in
accordance with the scheme developed in ticket:2329. test_cli_cp.py got
a large new test to exercise all the various combinations. This also
changes the set of error messages that "tahoe cp" can produce.

This modifies try_copy(), inserts a new implementation of
copy_things_to_directory() (and supporting methods), and fixes a few
bugs elsewhere.

fixes ticket:2329
2015-03-03 18:19:58 -08:00
Brian Warner
ca92bfdc88 tahoe_cp: delete copy_to_directory() code
This code will be replaced in the next commit with an entirely different
approach, and modifying it in a single commit would yield a completely
unreadable diff.
2015-03-03 18:18:17 -08:00
Brian Warner
c32c8794bc tahoe_cp: simplify some checks, rename some functions
no behavioral changes
2015-03-03 18:03:17 -08:00
Daira Hopwood
53fc7da2ab .travis.yml: emove 'sudo: false' as requested by https://github.com/travis-ci/travis-ci/issues/2389#issuecomment-76202191
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-02-27 23:59:18 +00:00
Brian Warner
6b6df7ab21 NEWS.rst: add partial list of changes 2015-02-25 22:05:00 -08:00
Zooko
e9e63c5e72 zetuptoolz: print out more context in case of parse_requirements error 2015-02-24 18:11:30 +00:00
Brian Warner
6d84cdd35d tahoe_cp.py: use s.basename() instead of tracking it separately 2015-02-24 02:07:57 -08:00
Brian Warner
98ec466d54 tahoe_cp.py: store basename in the Source instance 2015-02-24 01:55:53 -08:00
Brian Warner
be4b13c318 test_cli.py: split the largest test classes out into separate files
That file was getting unruly. No behavioral changes, apart from tests
now having different names.
2015-02-24 01:41:23 -08:00
Daira Hopwood
5a37ff0d0e Discourage future readers of iputil.py from using Win32 APIs in preference to route.exe.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-02-19 17:41:09 +00:00
Daira Hopwood
c5817c3ce3 It is Twisted 12.2.0 that starts depending on pywin32 for endpoints, not Twisted 12.3.0.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-02-17 19:11:57 +00:00
Daira Hopwood
19fffc059f Explicitly using "git.cmd" on Windows doesn't always work; use shell=True on Windows instead.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-02-17 19:10:54 +00:00
Daira Hopwood
2d9af506f1 Merge pull request #142 from tahoe-lafs/754.location-AUTO.2
Allow combining autodetected and statically configured locations
2015-02-10 18:28:09 +00:00
Daira Hopwood
1b83f7854c Documentation change for AUTO in tub.location. refs #754
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-02-10 18:23:59 +00:00
Daira Hopwood
0b24756cc7 Allow multiple occurrences of AUTO. refs #754
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-02-10 17:31:10 +00:00
Daira Hopwood
759512da28 Add tests for combining autodetected and statically configured locations. refs #754
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-02-10 17:12:43 +00:00
Daira Hopwood
10ebbeebaa test_node.py: refactor test_location* to reduce code duplication. refs #754
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-02-10 17:12:43 +00:00
Daira Hopwood
ca3c7abe3a Only get the local addresses if they are actually used. refs #754
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-02-10 17:12:43 +00:00
Daira Hopwood
c9a56eae2b Allow combining autodetected and statically configured locations. fixes #754
Replaces the location 'AUTO' with the autodetected IP/port combination.

Author: Chris Kerr <debdepba@dasganma.tk>
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-02-09 19:18:58 +00:00
Daira Hopwood
ce7a867b22 .travis.yml: add "sudo: false" option, to attempt to resolve "Connection reset by peer" problems during build.
See https://github.com/travis-ci/travis-ci/issues/2389 .

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-02-07 02:45:10 +00:00
Daira Hopwood
9f2ffc3458 Fix warnings due to bitrot in MANIFEST.in. closes #2380
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-02-06 23:59:12 +00:00
Daira Hopwood
9ac392802b Test the quotemarks=True and quotemarks=False options of quote_local_unicode_path.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-02-05 02:22:27 +00:00
Daira Hopwood
d53c7ee905 Test the quotemarks=False option of encodingutil.quote_path.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-02-05 02:13:23 +00:00
Daira Hopwood
fc90607eec Further refine error handling in windows_getenv to correctly handle zero-length environment values. refs #1674
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-02-04 17:02:02 +00:00
Brian Warner
30987c1e7d remove stray trailing whitespace 2015-02-04 01:35:44 -08:00
Brian Warner
3afe827ad0 Merge branch 'pr138': fix long paths on windows 2015-02-04 01:31:46 -08:00
Brian Warner
597542dc77 test that web.static= is really treated as a relative path
Also ssh.authorized_keys_file .
2015-02-03 22:23:31 -08:00
Daira Hopwood
86726729b7 Quote the default node-directory correctly in help output. refs #2235
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-02-04 00:10:21 +00:00
Daira Hopwood
d756ef1765 More robust error handling in windows_getenv. refs #1674
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-02-03 23:47:53 +00:00
Brian Warner
7426eccb29 tahoe_cp.py: clean up unicode handling 2015-02-03 11:10:36 -08:00
Daira Hopwood
8147f3c77e Changes filename to unicode before placing the file. refs #2027
Author: Mark Berger <mark.berger.j@gmail.com>
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-01-30 00:50:25 +00:00
Daira Hopwood
b6a645aeb3 Adds test_ticket_2027 to test_cli.Cp. refs #2027
Author: Mark Berger <mark.berger.j@gmail.com>
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-01-30 00:50:25 +00:00
Daira Hopwood
c1d5c4f07a Fix user-path-expansion on Windows for non-ASCII home directories. refs #1674
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-01-30 00:50:24 +00:00
Daira Hopwood
14f783086f Change uses of os.path.expanduser and os.path.abspath. refs #2235
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-01-30 00:50:18 +00:00
Daira Hopwood
4a0cdce86b Use absolute paths in tahoe cp and tahoe backup. refs #2235
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-01-30 00:47:35 +00:00
Daira Hopwood
21b477f235 Add support in abspath_expanduser_unicode for expanding relative to a base path. refs #2235
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-01-30 00:47:09 +00:00
Daira Hopwood
95f98e1aae Quote local paths correctly. refs #2235
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-01-30 00:05:20 +00:00
Daira Hopwood
c20a3525b7 Use "long" paths prefixed with \\?\ on Windows. refs #2235
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-01-30 00:05:14 +00:00
Daira Hopwood
9a401b760e fileutil cleanup: delete the unused open_or_create function.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-01-29 18:19:57 +00:00
Mark Berger
db12f1cffb Adds _servers_with_shares to ServermapUpdater
When calculating the query boundary for updates to mutable files,
instead of using servers that used to have shares, use servers we
have added to the servermap. This way the querying process won't finish
until we have finished interacting with the servers that have shares.

This fixes the race condition which sometimes caused the querying process
to finish before the updater was done talking to servers with shares.
2015-01-27 00:40:14 -08:00
Brian Warner
118d78a67d Revert "Enable DeprecationWarnings for Travis-CI even on Python 2.7. refs #2366"
This reverts commit cec7727bf9.

It caused travis (for py2.7) to fail on these tests:

* allmydata.test.test_runner.BinTahoe.test_version_no_noise
* allmydata.test.test_runner.RunNode.test_client_no_noise
* allmydata.test.test_system.SystemTest.test_filesystem_with_cli_in_subprocess
2015-01-26 22:12:00 -08:00
Daira Hopwood
cec7727bf9 Enable DeprecationWarnings for Travis-CI even on Python 2.7. refs #2366
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-01-22 02:49:16 +00:00
Daira Hopwood
6f74282688 Merge pull request #137 from warner/2312-deprecation
Appease req.setHeader by passing bytes, not ints.
2015-01-22 02:29:50 +00:00