Commit Graph

617 Commits

Author SHA1 Message Date
Brian Warner
5874a7d3a7 bin/tahoe: clean up global-vs-subcommand arguments like --node-directory
The new rules for "bin/tahoe ARG1.. SUBCOMMAND ARG2.." arg:

* --node-directory is only accepted in ARG1, not ARG2
* create-*/start/stop/restart accept --basedir in ARG2, or an explicit
  basedir argument
* only one of --node-directory/--basedir/explicit-basedir is accepted
* --quiet/--version is only accepted in ARG1, not ARG2

Closes #166
2013-04-09 19:11:32 +01:00
David-Sarah Hopwood
656e819560 Improve 'tahoe put --help' to clarify behaviour for mutable files, and
make sure the documented behaviour is tested. fixes #1372

Signed-off-by: David-Sarah Hopwood <david-sarah@jacaranda.org>
2013-03-20 01:27:17 +00:00
David-Sarah Hopwood
ef0a6c3015 Avoid double-counting source files in 'tahoe cp --verbose'. fixes #1783
Signed-off-by: David-Sarah Hopwood <david-sarah@jacaranda.org>
2013-03-20 00:57:50 +00:00
David-Sarah Hopwood
ea9dfb0de1 tahoe_ls.py: JSON responses don't need quotemarks or quoted newlines.
Signed-off-by: David-Sarah Hopwood <david-sarah@jacaranda.org>
2013-03-07 16:22:47 +00:00
David-Sarah Hopwood
a9272522d5 tahoe_check.py: tolerate missing fields in check results for LIT files/dirs. fixes #1758
Also test this case and improve some existing tests of 'tahoe check'.

Signed-off-by: David-Sarah Hopwood <david-sarah@jacaranda.org>
2013-01-03 22:16:20 +00:00
David-Sarah Hopwood
1ffed22651 CLI: fix synopsis for 'tahoe ls'. fixes #1839
Signed-off-by: David-Sarah Hopwood <david-sarah@jacaranda.org>
2012-11-01 23:40:06 +00:00
frederik b
595d611c9b fixed wrong index in tahoe cp --verbose, as explained in #1805
this bug shows wrong counters for copied files in verbose mode
2012-09-29 21:32:51 -07:00
Brian Warner
15c95c2e12 Apply David-Sarah's recommended changes. Closes #974 2012-09-04 15:45:38 -07:00
Andrew Miller
4f19f2b4b4 When the CLI cannot connect to the gateway, it prints an error message rather than raising a python exception. Includes a unit test
Signed-off-by: Andrew Miller <amiller@dappervision.com>
2012-09-04 14:48:50 -07:00
david-sarah
2ee1bc7148 Catch exceptions from CLI in order to prevent the Ubuntu crash monolog from triggering. refs #1746 2012-05-20 15:35:29 +00:00
david-sarah
4ddcde3094 Since we now require Python 2.5, we can use os.SEEK_END. 2012-05-16 21:39:48 +00:00
david-sarah
a1a1b5bf8a Simplifications resulting from requiring Python 2.5 and therefore being able to use sqlite3 from the standard library. This also drops sqlite3 from the set of versions and paths we report. 2012-05-16 02:47:25 +00:00
david-sarah
379901bf8f Add 'tahoe debug flogtool' command, test for --help, and docs. This version gets the help synopses more correct, and changes the doc to say that this command is added in 1.10.0 rather than 1.9.2. fixes #1693 2012-03-31 22:41:22 +00:00
Brian Warner
5ea8b698a5 'tahoe admin generate-keypair/derive-pubkey': add Ed25519 keypair commands
Also add parse_privkey/parse_pubkey tools to util.keyutil
2012-03-13 18:24:32 -07:00
david-sarah
7f8bbcc155 Use a private/drop_upload_dircap file instead of the [drop_upload]upload.dircap option in tahoe.cfg. Fail if the upload.dircap option is used, or options are missing. Also updates tests and docs. fixes #1593 2011-11-20 23:24:26 +00:00
Brian Warner
d28041fbe4 CLI: don't deprecate --mutable, small docs fixes. refs #1561
Also don't accept 'tahoe mkdir --format=chk'.
2011-10-13 21:00:02 -07:00
Brian Warner
57ee56533f add --format= to 'tahoe put'/'mkdir', remove --mutable-type. Closes #1561 2011-10-13 20:15:00 -07:00
Brian Warner
dad354b275 webapi: handle format=, remove mutable-type=
* fix CLI commands (put, mkdir) to send format=, not mutable-type=
* fix tests
* test_cli: fix tests that observe t=json output, don't ignore failures in
  'tahoe put'
* fix handling of version= to make it easier to use the default
* interpret ?mutable=true&format=MDMF as MDMF, not SDMF
2011-10-13 09:29:51 -07:00
Brian Warner
0716c496c8 MDMF: remove extension fields from caps, tolerate arbitrary ones. Fixes #1526
The filecaps used to be produced with hints for 'k' and segsize, but they
weren't actually used, and doing so had the potential to limit how we change
those filecaps in the future. Also the parsing code had some problems dealing
with other numbers of extensions. Removing the existing fields and making the
parser tolerate (and ignore) extra ones makes MDMF more future-proof.
2011-10-02 00:35:53 +01:00
david-sarah
23f46b758e CLI: make the --mutable-type option value for 'tahoe put' and 'tahoe mkdir' case-insensitive, and change --help for these commands accordingly. fixes #1527 2011-09-04 19:09:22 -07:00
Kevan Carstensen
64996a913d cli: make --mutable-type imply --mutable in 'tahoe put' 2011-09-03 12:09:20 -07:00
Brian Warner
d575ccba28 Teach 'tahoe debug catalog-shares about MDMF. Closes #1507. 2011-08-28 01:09:31 -07:00
Brian Warner
97b601f75a debug.py: remove some dead comments 2011-08-28 00:45:56 -07:00
Brian Warner
9f827ffa7b hush pyflakes 2011-08-28 00:42:54 -07:00
Brian Warner
a3d6fd4992 teach 'tahoe debug dump-share' about MDMF and offsets. refs #1507 2011-08-28 00:38:34 -07:00
Brian Warner
482a7dd3f1 Add 'tahoe debug dump-cap' support for MDMF, DIR2-CHK, DIR2-MDMF. refs #1507.
This also adds tests for all those cases, and fixes an omission in uri.py
that broke parsing of DIR2-MDMF-Verifier and DIR2-CHK-Verifier.
2011-08-27 12:50:48 -07:00
Kevan Carstensen
4d09ef3d83 cli: teach CLI how to create MDMF mutable files
Specifically, 'tahoe mkdir' and 'tahoe put' now take a --mutable-type
argument.
2011-08-01 19:16:13 -07:00
Brian Warner
5aad81f84d replace tabs with spaces in the #1441 'tahoe debug' synopsis 2011-08-11 10:37:04 -07:00
david-sarah
0dc917af08 Correct the information printed by '/usr/bin/tahoe debug --help' on Debian/Ubuntu. fixes #1441 2011-07-24 09:25:30 -07:00
Zooko O'Whielacronx
b7683d9b83 drop-upload: rename the 'upload.uri' parameter to 'upload.dircap', and a couple of cleanups to error messages. refs #1429
I rerecorded this patch, originally by David-Sarah, to use "darcs replace" instead of editing to do the renames. This uncovered one missed rename in Client.init_drop_uploader. (Which also means that code isn't exercised by the current unit tests.)
refs #1429
2011-08-09 15:05:08 -07:00
david-sarah
bbed522033 Remove all trailing whitespace from .py files. 2011-08-08 17:11:17 -07:00
david-sarah
32a7717205 Drop-upload frontend, rerecorded for 1.9 beta (and correcting a minor mistake). Includes some fixes for Windows but not the Windows inotify implementation. fixes #1429 2011-08-08 16:40:49 -07:00
Brian Warner
550d67f51f remove get_serverid() from ReadBucketProxy and customers, including Checker
and debug.py dump-share commands
refs #1363
2011-08-01 15:43:07 -07:00
david-sarah
2da3f69f25 Address Kevan's comment in #776 about Options classes missed when adding 'self.command_name'. refs #776, #1359 2011-08-01 15:13:17 -07:00
david-sarah
06a5d0c1a3 cleanup: implement rm as a synonym for unlink rather than vice-versa. refs #776 2011-08-01 15:01:08 -07:00
david-sarah
52963f4a76 tahoe_rm.py: better error message when there is no path. refs #1292 2011-01-22 00:42:12 -07:00
Kevan Carstensen
448278e807 cli: make 'tahoe cp' overwrite mutable files in-place 2011-07-29 13:20:39 -07:00
david-sarah
b21a4f6b3f src/allmydata/scripts/cli.py: fix pyflakes warning. 2011-07-27 19:14:02 -07:00
david-sarah
b978378392 Fix the help synopses of CLI commands to include [options] in the right place. fixes #1359, fixes #636 2011-07-24 15:54:40 -07:00
david-sarah
f9d218c673 encodingutil: argv and output encodings are always the same on all platforms. Lose the unnecessary generality of them being different. fixes #1120 2011-06-29 11:53:56 -07:00
david-sarah
49fd2e6e56 scripts/common.py: don't assume that the default alias is always 'tahoe' (it is, but the API of get_alias doesn't say so). refs #1342 2011-01-30 10:49:23 -07:00
david-sarah
74b6ea36c4 CLI: improve help synopsis for 'tahoe create-key-generator'. 2011-01-22 17:50:04 -08:00
david-sarah
cb02adb110 Don't put debugging information in 'My versions' section of the Welcome page. Also remove the extra blank line between version and command output when --version[-and-path] is used. refs #1306 2011-01-21 20:02:20 -08:00
david-sarah
0c51ce3d89 CLI: improve help synopses for some commands. 2011-01-21 17:27:00 -08:00
david-sarah
28bd80812f Change --version and --version-and-path to not exit immediately, if a command is given. 2011-01-20 23:59:13 -08:00
david-sarah
3798d9946e Add support to bin/tahoe for invoking a runner command prefixed with @, with the Tahoe libraries on the PYTHONPATH. This is documented in 'tahoe debug --help'. 2011-01-18 21:11:37 -08:00
david-sarah
74b1eec1d6 trivial: add comment in scripts/debug.py about trial option parsing. refs #1296 2011-01-18 22:08:08 -08:00
david-sarah
7a887871b0 src/allmydata/scripts/debug.py: add 'tahoe debug trial' command (rebased for trunk). refs #1296 2011-01-18 12:46:59 -08:00
Brian Warner
980fb0b2bb 'tahoe debug catalog-shares': sort SIs and shnums
Without this, SIs or shnums could be emitted in random order, depending upon
what the filesystem happens to return.
2011-01-17 01:59:32 -08:00
david-sarah
f10a2c0902 CLI: make 'tahoe create-alias' and 'tahoe add-alias' accept a trailing colon on the new alias name (v2, minor change not to rely on implicit Unicode conversion). Includes doc changes and news; tests in a separate patch. fixes #1305 2011-01-13 19:44:14 -08:00
Brian Warner
b9fb74d2a0 Improve 'tahoe ln' help text. Patch by David-Sarah. Closes #1230. 2011-01-17 00:14:21 -08:00
david-sarah
d3f24736ca create_node.py: add comments to default tahoe.cfg to clarify the meaning of each section. fixes #1311 2011-01-16 21:24:19 -08:00
Brian Warner
45212d8000 Set "reserved_space=1G" in newly-created storage nodes. Closes #1208. 2011-01-16 12:58:22 -08:00
david-sarah
2d5f3f694f scripts/backupdb.py: more accurate comment about path field. 2010-12-12 09:03:20 -08:00
david-sarah
bb7c04ff9f scripts/cli.py: fix missing 'put' in usage example for 'tahoe put'. 2010-12-12 09:02:07 -08:00
david-sarah
ee4e0d8106 scripts/cli.py: remove the disclaimer in the help for 'tahoe cp' that it does not handle non-ASCII filenames well. (At least, we intend to handle them.) 2010-11-29 16:21:45 -08:00
david-sarah
9ceb527787 Change another doc reference from .txt to .rst in a text string. 2010-11-28 09:45:07 -08:00
Brian Warner
69b42c6cb7 remove --multiple/-m option from all CLI commands: closes #1262
I personally used "tahoe start/restart -m ../MY-TESTNET/node*" all the time,
to spin up or update a local testgrid while iterating over new code. However,
with the recent switch from "subprocess.Popen(/bin/twistd)" to "import and
call twistd.run()" in scripts/startstop_node.py (yay fewer processes!),
"start -m" broke, and fixing it requires os.fork, which is unavailable on
windows (boo windows!). And I was probably the only one using -m. So in the
interests of uniformity among platforms and simpler code (yay negative code
days!), we're just removing -m from everything. I will start using a little
shell script or something to simulate the removed functionality.

This patch also cleans up CLI-function calling a bit: get the basedir from
the config dict (instead of sometimes from a separate argument), and always
return a numeric exit code.
2010-11-27 00:38:09 -08:00
Brian Warner
f36bda2780 Revert previous commit: there's an ugly corner-case on windows that fails tests.
Specifically, test_runner.CreateNode.test_client failed, because the
os.fork-is-present test decided that --multiple should not be allowed on
windows, even though --multiple works just fine for 'tahoe create-client'.
The only restriction on --multiple is for 'tahoe start' and 'tahoe restart'.

This needs a different approach, probably by cleaning up BasedirMixin. We
should only be withholding --multiple on windows for "start" and
"restart". (we should continue withholding --multiple on all platforms for
"run").

This reverts (git) commit f3adb037ae:
 "startstop_node.py: fix "tahoe start -m" by forking before non-final targets"
2010-11-26 16:44:11 -08:00
Brian Warner
f3adb037ae startstop_node.py: fix "tahoe start -m" by forking before non-final targets
* don't advertise -m flag on tahoe start/restart/run unless os.fork is
  available (i.e. windows)
* test_runner.py: add test to exercise "start/stop/restart -m"
2010-11-26 14:45:38 -08:00
david-sarah
38a0d3f5fa tahoe_mv.py: when checking success of the DELETE operation, look at the status code from DELETE rather than from the previous PUT. fixes #1255 2010-11-09 17:09:16 -08:00
david-sarah
cb777ad14f tahoe_mv.py: use do_http, not urllib.openurl, in order to avoid connecting to the webapi server via a proxy. refs #1253 2010-11-09 16:53:36 -08:00
david-sarah
6eaa7f2356 tahoe backup: perform tilde expansion in exclude-from filename (version 2). fixes #1241 2010-10-30 20:52:31 -07:00
david-sarah
1950d5a719 scripts/runner.py: fix unused import of allmydata. refs #1190 2010-10-29 17:31:49 -07:00
david-sarah
2a8f700026 scripts/runner.py: remove pkg_resources.require() calls. These are at best redundant because we have already called _auto_deps.require_auto_deps() (from allmydata.__init__) at that point, and they are causing failure of the test-from-prefixdir step on some buildslaves. refs #1190 2010-10-29 16:53:28 -07:00
Brian Warner
c88eb097d9 scripts/tahoe_backup.py: oops, fix missing import, thanks pyflakes
test_cli.py: hush minor pyflakes complaint
2010-10-29 02:42:23 -07:00
Francois Deppierraz
14ee763c54 tahoe_cp.py: Don't call urllib.quote with an Unicode argument, fix #1224
tahoe_backup.py: Fix another (potential) occurrence of calling urllib.quote()
with an Unicode parameter
2010-10-29 01:45:20 -07:00
david-sarah
270322ad47 startstop_node.py: pyflakes import fix. refs #1190 2010-10-27 18:48:05 -07:00
Brian Warner
ac3b26ecf2 'tahoe start': use import+call rather than find+spawn
This removes the need to use a locally-built (dependency) bin/twistd, and
removes a big chunk of behavior differences between unix and windows. It
also happens to resolve the "client node probably started" uncertainty.
Might help with #1190, #602, and #71.
2010-10-26 23:13:42 -07:00
Zooko O'Whielacronx
98ffbfb31f setup: add --multi-version to the "setup.py develop" command-line
fixes #530. I earlier tried this twice (see #530 for history) and then twice rolled it back due to some problems that arose. However, I didn't write down what the problems were in enough detail on the ticket that I can tell today whether those problems are still issues, so here goes the third attempt. (I did write down on the ticket that it would not create site.py or .pth files in the target directory with --multi-version mode, but I didn't explain why *that* was a problem.)
2010-10-05 11:23:50 -07:00
david-sarah
a7c474a098 CLI: further improve consistency of basedir options and add tests. addresses #118 2010-08-03 01:54:16 -07:00
david-sarah
b730385ec8 CLI: make the synopsis for 'tahoe unlink' say unlink instead of rm. 2010-08-03 01:53:59 -07:00
david-sarah
a32f625db9 CLI: make all of the option descriptions imperative sentences. 2010-08-03 01:48:01 -07:00
david-sarah
37b07a545f Changes to Tahoe needed to work with new zetuptoolz (that does not use .exe wrappers on Windows), and to support Unicode arguments and stdout/stderr -- v5 2010-07-25 01:32:16 -07:00
david-sarah
54a9ba8232 scripts/common.py: fix an error introduced when rebasing to the ticket798 branch, which caused base directories to be duplicated in self.basedirs. 2010-08-01 23:49:29 -07:00
david-sarah
f952532f08 Basedir/node directory option improvements for ticket798 branch. addresses #188, #706, #715, #772, #890 2010-08-01 21:30:04 -07:00
david-sarah
16647b49f6 scripts/create_node.py: allow nickname to be Unicode. Also ensure webport is validly encoded in config file. 2010-08-01 17:02:12 -07:00
david-sarah
02199db615 Additional Unicode basedir changes for ticket798 branch. 2010-08-01 18:05:52 -07:00
david-sarah
d3a8ef762f Unicode basedir changes for ticket798 branch. 2010-08-01 16:53:10 -07:00
david-sarah
618db4867c Replace uses of os.path.abspath with abspath_expanduser_unicode where necessary. This makes basedir paths consistently represented as Unicode. 2010-07-21 17:14:18 -07:00
Zooko O'Whielacronx
fd874d6669 setup: fix a couple instances of hard-coded 'allmydata-tahoe' in the scripts, tighten the tests (as suggested by David-Sarah) 2010-08-01 09:42:07 -07:00
Zooko O'Whielacronx
1c62db0db8 docs: use current cap to Zooko's wiki page in example text
fixes #1134
2010-07-20 18:05:43 -07:00
david-sarah
a8161c915a Correct stringutils->encodingutil patch to be the newer version, rather than the old version that was committed in error. 2010-07-17 18:34:35 -07:00
david-sarah
8090785716 CLI: add 'tahoe unlink' as an alias to 'tahoe rm', for forward-compatibility. 2010-07-17 15:04:11 -07:00
david-sarah
11077ea74d Rename stringutils to encodingutil, and drop listdir_unicode and open_unicode (since the Python stdlib functions work fine with Unicode paths). Also move some utility functions to fileutil. 2010-07-11 17:30:15 -07:00
david-sarah
e2ef2c2691 cli.py: make command descriptions consistently end with a full stop. 2010-07-13 18:45:38 -07:00
david-sarah
1a0674bf37 CLI: allow Unicode patterns in exclude option to 'tahoe backup'. 2010-06-16 20:39:01 -07:00
david-sarah
ffd1c5aca5 Fix for Unicode-related test failures on Zooko's OS X 10.6 machine. 2010-06-08 22:54:48 -07:00
david-sarah
7092de1b6f Remove the 'tahoe debug consolidate' subcommand. 2010-06-07 11:37:57 -07:00
david-sarah
731e3d68df common_http.py, tahoe_cp.py: Fix an error in calling the superclass constructor in HTTPError and MissingSourceError (introduced by the Unicode fixes). 2010-06-07 10:47:14 -07:00
david-sarah
65b6f4e3ce Unicode fixes for platforms with non-native-Unicode filesystems. 2010-06-06 21:32:38 -07:00
david-sarah
80252debcd Unicode fixes. 2010-06-06 18:02:15 -07:00
Zooko O'Whielacronx
442008a690 unicode: always decode json manifest as utf-8 then encode for stdout
pyflakes pointed out that the exception handler fallback called an un-imported function, showing that the fallback wasn't being exercised.
I'm not 100% sure that this patch is right and would appreciate François or someone reviewing it.
2010-06-04 01:48:40 -07:00
Zooko O'Whielacronx
952f3bf3ef fix flakes 2010-06-04 00:58:45 -07:00
Francois Deppierraz
496802420e Fix handling of correctly encoded unicode filenames (#534)
Tahoe CLI commands working on local files, for instance 'tahoe cp' or 'tahoe
backup', have been improved to correctly handle filenames containing non-ASCII
characters.
  
In the case where Tahoe encounters a filename which cannot be decoded using the
system encoding, an error will be returned and the operation will fail.  Under
Linux, this typically happens when the filesystem contains filenames encoded
with another encoding, for instance latin1, than the system locale, for
instance UTF-8.  In such case, you'll need to fix your system with tools such
as 'convmv' before using Tahoe CLI.
  
All CLI commands have been improved to support non-ASCII parameters such as
filenames and aliases on all supported Operating Systems except Windows as of
now.
2010-05-19 17:43:56 -07:00
david-sarah
e76092e16c Change relative imports to absolute 2010-02-26 01:14:33 -07:00
Francois Deppierraz
dd95e8e71b CLI: Support for https url in option --node-url
This patch modifies the regular expression used for verifying of '--node-url'
parameter.  Support for accessing a Tahoe gateway over HTTPS was already
present, thanks to Python's urllib.
2010-04-30 11:56:09 -07:00
Brian Warner
e2031aff0f backupdb.did_create_directory: use REPLACE INTO, not INSERT INTO + ignore error
This handles the case where we upload a new tahoe directory for a
previously-processed local directory, possibly creating a new dircap (if the
metadata had changed). Now we replace the old dirhash->dircap record. The
previous behavior left the old record in place (with the old dircap and
timestamps), so we'd never stop creating new directories and never converge
on a null backup.
2010-04-27 22:08:03 -07:00
Brian Warner
f6f8256b35 "tahoe webopen": add --info flag, to get ?t=info
Also fix some trailing whitespace.
2010-04-24 16:30:03 -07:00
Zooko O'Whielacronx
34a50b857a docs: a few small edits to try to guide newcomers through the docs
These edits were suggested by my watching over Jake Appelbaum's shoulder as he completely ignored/skipped/missed install.html and also as he decided that debian.txt wouldn't help him with basic installation. Then I threw in a few docs edits that have been sitting around in my sandbox asking to be committed for months.
2010-03-03 15:19:02 -08:00
david-sarah
973f0afdd3 Change direct accesses to an_uri.storage_index to calls to .get_storage_index() (fixes #948) 2010-02-21 18:45:04 -08:00
david-sarah
6a7feea455 Tweak to 'tahoe ls --help' output (#837) 2010-02-23 19:02:31 -08:00
david-sarah
03134eedb5 Improve behaviour of 'tahoe ls' for unknown objects, addressing kevan's comments 2010-02-19 22:13:13 -08:00
Kevan Carstensen
63c8c65747 Alter CLI utilities to handle nonexistent aliases better 2010-02-10 18:43:18 -08:00
david-sarah
6057bc02cc Prevent mutable objects from being retrieved from an immutable directory, and associated forward-compatibility improvements. 2010-01-26 22:44:30 -08:00
Brian Warner
5045a8721a scripts/runner.py: simplify David-Sarah's clever grouped-commands usage trick 2010-01-27 14:37:58 -08:00
Brian Warner
e769bbb6dd tahoe backup: skip all symlinks, with warning. Fixes #850, addresses #641. 2010-01-27 14:35:17 -08:00
Brian Warner
52185053c3 "tahoe backup": fix --exclude-vcs docs to include Git 2010-01-27 12:10:44 -08:00
francois
b03406af9d tahoe_backup.py: display warnings on errors instead of stopping the whole backup. Fix #729.
This patch displays a warning to the user in two cases:
  
  1. When special files like symlinks, fifos, devices, etc. are found in the
     local source.
  
  2. If files or directories are not readables by the user running the 'tahoe
     backup' command.

In verbose mode, the number of skipped files and directories is printed at the
end of the backup.

Exit status returned by 'tahoe backup':

  - 0 everything went fine
  - 1 the backup failed
  - 2 files were skipped during the backup
2010-01-20 01:42:49 -08:00
Zooko O'Whielacronx
a1444d9367 cli: merge the better version of David-Sarah's split-usage-and-help patch with the earlier version that I mistakenly committed 2010-01-25 20:45:59 -08:00
david-sarah
b079f32da2 Split tahoe --help options into groups. 2010-01-11 20:39:35 -08:00
Zooko O'Whielacronx
b94b9af189 cli: split usage strings into groups (patch by David-Sarah Hopwood) 2010-01-25 20:39:21 -08:00
david-sarah
87f1bae7fe Add create-node CLI command, and make create-client equivalent to create-node --no-storage (fixes #760) 2010-01-15 21:20:55 -08:00
Brian Warner
bb4883bbd4 tahoe_add_alias.py: minor refactoring 2010-01-14 22:42:20 -08:00
Brian Warner
731d15e56f hush pyflakes-0.4.0 warnings: remove trivial unused variables. For #900. 2010-01-14 14:15:29 -08:00
Brian Warner
874a979a8e tahoe add-alias/create-alias: don't corrupt non-newline-terminated alias
file. Closes #741.
2010-01-14 13:02:46 -08:00
Brian Warner
d3d1293d2f change docs and --help to use "grid" instead of "virtual drive": closes #892.
Thanks to David-Sarah Hopwood for the patch.
2010-01-14 12:11:19 -08:00
Brian Warner
00d0ca3902 addendum to "Fix 'tahoe ls' on files (#771)"
tahoe_ls.py: tolerate missing metadata
web/filenode.py: minor cleanups
test_cli.py: test 'tahoe ls FILECAP'
2009-12-27 18:21:49 -05:00
Brian Warner
a8a768ef9d Fix 'tahoe ls' on files (#771). Patch adapted from Kevan Carstensen.
web/filenode.py: also serve edge metadata when using t=json on a
                 DIRCAP/childname object.
tahoe_ls.py: list file objects as if we were listing one-entry directories.
             Show edge metadata if we have it, which will be true when doing
             'tahoe ls DIRCAP/filename' and false when doing 'tahoe ls
             FILECAP'
2009-12-27 17:54:43 -05:00
Brian Warner
931ab76588 tahoe_get: don't create the output file on error. Closes #121. 2009-12-27 17:04:04 -05:00
Brian Warner
499add09e6 webapi: don't accept zero-length childnames during traversal. Closes #358, #676.
This forbids operations that would implicitly create a directory with a
zero-length (empty string) name, like what you'd get if you did "tahoe put
local /oops/blah" (#358) or "POST /uri/CAP//?t=mkdir" (#676). The error
message is fairly friendly too.

Also added code to "tahoe put" to catch this error beforehand and suggest the
correct syntax (i.e. without the leading slash).
2009-12-27 15:10:43 -05:00
Brian Warner
2e0a61a953 CLI: send 'Accept:' header to ask for text/plain tracebacks. Closes #646.
The webapi has been looking for an Accept header since 1.4.0, but it treats a
missing header as equal to */* (to honor RFC2616). This change finally
modifies our CLI tools to ask for "text/plain, application/octet-stream",
which seems roughly correct (we either want a plain-text traceback or error
message, or an uninterpreted chunk of binary data to save to disk). Some day
we'll figure out how JSON fits into this scheme.
2009-12-27 14:58:28 -05:00
Brian Warner
74974b27fe Implement more coherent behavior when copying with dircaps/filecaps (closes #761). Patch by Kevan Carstensen. 2009-11-30 13:10:09 -08:00
Brian Warner
9901a08fd3 Add dirnodes to backupdb and "tahoe backup", closes #606.
* backups now share dirnodes with any previous backup, in any location,
  so renames and moves are handled very efficiently
* "tahoe backup" no longer bothers reading the previous snapshot
* if you switch grids, you should delete ~/.tahoe/private/backupdb.sqlite,
  to force new uploads of all files and directories
2009-11-26 15:42:57 -08:00
Brian Warner
6e7fb1006d Use DIR-IMM and t=mkdir-immutable for "tahoe backup", for #828 2009-11-18 11:28:13 -08:00
kevan
52aceb1a8e Implement more clearly defined moving semantics in tahoe_mv.py 2009-07-19 20:45:23 -07:00
kevan
36f2e01275 Update tahoe mv help text. 2009-07-19 20:45:03 -07:00
Brian Warner
531cc7899f rename NewDirectoryNode to DirectoryNode, NewDirectoryURI to DirectoryURI 2009-07-17 17:15:49 -05:00
Brian Warner
efa608a135 'tahoe stats': tolerate empty directories. Closes #693. 2009-07-15 00:51:09 -07:00
Brian Warner
b640baf500 cli: webopen: when called with no arguments, open the Welcome page 2009-07-01 13:05:48 -07:00
Brian Warner
b43672c9f5 one last tweak 2009-06-25 22:26:27 -07:00
Brian Warner
08effc6499 more 'tahoe cp' docs tweaks 2009-06-25 22:16:52 -07:00
Brian Warner
b30db031ab cli.py: minor tweaks to test posthooks 2009-06-25 19:45:57 -07:00
Brian Warner
df1ddf83f5 cli.py: update comments on 'tahoe cp' --help a bit 2009-06-25 19:38:37 -07:00
Brian Warner
8d5cc756f0 cli: add some --help text to 'tahoe cp' 2009-06-25 16:57:51 -07:00
Zooko O'Whielacronx
8c18ac38a9 backup: remove the --no-backupdb command, the handling of "can't import sqlite", and the related tests, and change an error message to more correctly indicate failure to load the database from disk rather than failure to import sqlite module
Fixes #728.
2009-06-04 10:31:31 -07:00
Zooko O'Whielacronx
2841d6a266 setup: add pysqlite and sqlite to get_package_versions() 2009-06-04 08:37:28 -07:00
Zooko O'Whielacronx
77b578928e trivial: fix comment 2009-04-13 10:41:38 -07:00
Zooko O'Whielacronx
9729753692 dirnode: add 'tahoe'/'linkcrtime' and 'tahoe'/'linkmotime' to take the place of what 'mtime'/'ctime' originally did, and make the 'tahoe' subdict be unwritable through the set_children API
Also add extensive documentation in docs/frontends/webapi.txt about the behaviors of these values.  See ticket #628.
2009-04-11 15:52:05 -07:00
Zooko O'Whielacronx
b12a7f9ee8 leases, time_format: modify time stamping in lease description
* emit lease expiry date in ISO-8601'ish format as well as Brian's format
 * rename iso_utc_time_to_localseconds() to iso_utc_time_to_seconds()
 * add iso_utc_date()
 * simplify the body of iso_utc_time_to_seconds()
2009-04-03 15:59:04 -07:00
Brian Warner
b5d4972a7a move GC docs out of proposed/, since it's all implemented now. Add reference to configuration.txt . Add expire.*= suggestions to tahoe.cfg . 2009-03-23 16:08:20 -07:00
Brian Warner
475e7b8804 tahoe_ls.py: add comment about error cases to improve 2009-03-16 22:12:06 -07:00
Brian Warner
f0b0ad1c8f tahoe cp -r: add --caps-only flag, to write filecaps into local files instead of actual file contents. Used only for debugging and as a quick tree-comparison tool. 2009-03-15 16:19:58 -07:00
Brian Warner
e59164e0bb consolidate: remove pointless 'else' after for loop 2009-03-13 01:27:51 -07:00
Brian Warner
ae64ddf8e6 consolidate: add eta, flush stdout 2009-03-13 01:24:51 -07:00
Brian Warner
06bf443e91 consolidate: tolerate unicode dirnames 2009-03-12 23:54:02 -07:00
Brian Warner
a18f8d4cc7 consolidator: add progress to scan-old-directory passes 2009-03-12 22:47:28 -07:00
Brian Warner
ddb2f1a6e3 consolidator: fix cycle detection to not trigger on merely shared directories, add snapshot counter to progress 2009-03-12 21:22:29 -07:00
Brian Warner
ddc9a7ae74 consolidator: re-use more directories, add total directories seen-vs-used counts 2009-03-12 20:48:01 -07:00
Brian Warner
809ec25ffa tahoe_backup.py: tolerate more time formats 2009-03-12 18:16:00 -07:00
Brian Warner
1c24707f19 consolidator: add more verbose traversal of directories 2009-03-12 16:29:00 -07:00
Brian Warner
760688a224 consolidate: create multiple numbered backups of the original Archives directory, not just the first time 2009-03-12 16:04:27 -07:00
Brian Warner
c4c6a62954 add 'tahoe debug consolidate' command, to merge directories created by repeated 'tahoe cp -r' or the allmydata win32 backup tool, into the form that would have been created by 'tahoe backup'. 2009-03-12 13:56:06 -07:00
Brian Warner
969b758bf5 tahoe_cp.py: return 0 for success, instead of None 2009-03-12 13:53:45 -07:00
Brian Warner
192c161be7 tahoe_cp.py: improve error reporting slightly: don't json-interpret HTTP errors, pass through tahoe webapi error messages 2009-03-07 05:40:51 -07:00
Brian Warner
24ebdb3954 tahoe_cp.py: don't be verbose unless --verbose is passed: default is one line of success 2009-03-07 02:44:21 -07:00
Brian Warner
0dee2a6036 storage: add a lease-checker-and-expirer crawler, plus web status page.
This walks slowly through all shares, examining their leases, deciding which
are still valid and which have expired. Once enabled, it will then remove the
expired leases, and delete shares which no longer have any valid leases. Note
that there is not yet a tahoe.cfg option to enable lease-deletion: the
current code is read-only. A subsequent patch will add a tahoe.cfg knob to
control this, as well as docs. Some other minor items included in this patch:

 tahoe debug dump-share has a new --leases-only flag
 storage sharefile/leaseinfo code is cleaned up
 storage web status page (/storage) has more info, more tests coverage
 space-left measurement on OS-X should be more accurate (it was off by 2048x)
  (use stat .f_frsize instead of f_bsize)
2009-03-06 22:45:17 -07:00
Brian Warner
7c35f01073 startstop_node.py: when restarting, tolerate a stale pid too 2009-02-25 19:52:45 -07:00
Brian Warner
a3c1fe35d9 CLI: modify 'tahoe manifest' and 'tahoe deep-check' to report ERROR: properly. For #590. 2009-02-24 23:44:15 -07:00
Brian Warner
7f8708cb7c scripts/common: fix alias handling on windows again, emit slightly nicer error message in response to an unknown alias 2009-02-24 22:21:36 -07:00
Brian Warner
fdb0200eca #165: make 'tahoe restart --force' the default behavior: warn but do not stop if restart is used on something that wasn't a running node, and always try to start it afterwards. This is particularly important for #315 (restart -m), because otherwise a single not-already-running node will prevent all nodes from being restarted, resulting in longer downtime than necessary 2009-02-24 21:42:13 -07:00
Brian Warner
a0aea06a9e scripts/common: on windows, tolerate paths like 'c:\dir\file.txt', by treating single-letter aliases on windows/cygwin as non-aliases 2009-02-24 17:55:22 -07:00
Alberto Berti
e1c925b373 Two small fixes on documentation for cli backup command. 2009-02-24 16:36:34 -07:00
Alberto Berti
7e8958671b Add elapsed timestamp to cli backup command final summary. 2009-02-24 11:14:25 -07:00
Brian Warner
15ee186499 scripts: stop using RuntimeError, for #639 2009-02-22 17:31:06 -07:00
Alberto Berti
b2f8fe04c6 Use failUnlessEqual instead of failUnless(a == b) 2009-02-22 16:42:14 -07:00
Alberto Berti
89a20fe4dd Better implementation of filtering algorithm. 2009-02-22 16:40:49 -07:00
Alberto Berti
2fbca1596b Removed '.hgrags' from vcs excludes 2009-02-22 16:39:46 -07:00
Alberto Berti
5d57da93fd Added --exclude, --exclude-from and --exclude-vcs options to backup command.
It is still impossible to specify absolute exclusion path, only
relative. I must check with tar or rsync how they allow them to be
specified.
2009-02-22 11:08:29 -07:00
Alberto Berti
c54fdd61b0 Raise a more explanatory exception for errors encountered during backup processing. 2009-02-22 11:02:52 -07:00
Alberto Berti
ffab4002aa Add missing synopsis and descriptions for alias commands. 2009-02-20 18:31:06 -07:00
Brian Warner
ef53da2b12 break storage.py into smaller pieces in storage/*.py . No behavioral changes. 2009-02-18 14:46:55 -07:00
Brian Warner
bce4a5385b add --add-lease to 'tahoe check', 'tahoe deep-check', and webapi. 2009-02-17 19:32:43 -07:00
Brian Warner
fde2289e7b CLI #590: convert 'tahoe deep-check' to streaming form, improve display, add tests 2009-02-17 17:15:11 -07:00
Brian Warner
770f976a85 test_cli: add test coverage for help strings 2009-02-16 15:08:33 -07:00
Zooko O'Whielacronx
14d23d99a5 setup: make the "full version string" be "allmydata-tahoe/1.3.0" instead of "allmydata-tahoe-1.3.0" and the UserAgent string of the cli be "allmydata-tahoe/1.3.0 (tahoe-client)"
This is webbish.  Thanks to kpreid for suggesting it.
2009-02-12 22:37:38 -07:00
Zooko O'Whielacronx
7eb260a9cf versioning: include an "appname" in the application version string in the versioning protocol, and make that appname be controlled by setup.py
It is currently hardcoded in setup.py to be 'allmydata-tahoe'.  Ticket #556 is to make it configurable by a runtime command-line argument to setup.py: "--appname=foo", but I suddenly wondered if we really wanted that and at the same time realized that we don't need that for tahoe-1.3.0 release, so this patch just hardcodes it in setup.py.
setup.py inspects a file named 'src/allmydata/_appname.py' and assert that it contains the string "__appname__ = 'allmydata-tahoe'", and creates it if it isn't already present.  src/allmydata/__init__.py import _appname and reads __appname__ from it.  The rest of the Python code imports allmydata and inspects "allmydata.__appname__", although actually every use it uses "allmydata.__full_version__" instead, where "allmydata.__full_version__" is created in src/allmydata/__init__.py to be:

__full_version__ = __appname + '-' + str(__version__).

All the code that emits an "application version string" when describing what version of a protocol it supports (introducer server, storage server, upload helper), or when describing itself in general (introducer client), usese allmydata.__full_version__.

This fixes ticket #556 at least well enough for tahoe-1.3.0 release.
2009-02-11 17:18:16 -07:00
Brian Warner
23fdd4f48e backupdb: cosmetic: capitalize the no-pysqlite instructions properly. Thanks to Terrell Russell for the catch. 2009-02-11 15:28:30 -07:00
Brian Warner
f7a263eb0b #619: make 'tahoe backup' complain and refuse to run if sqlite is unavailable and --no-backupdb is not passed 2009-02-10 18:49:10 -07:00
Brian Warner
19902a0f16 test_runner.py: revert the CreateNode section to using runner() inline, rather than spawning a process, to get more precise coverage 2009-02-09 02:26:17 -07:00
Brian Warner
d8e00c37b5 test_cli.Backup: capture stderr when sqlite is unavailable 2009-02-07 15:14:40 -07:00
Brian Warner
5bc0ef7ffe backupdb.py: catch OperationalError on duplicate-insert too, since pysqlite2 on dapper raises it instead of IntegrityError 2009-02-06 01:34:01 -07:00
Brian Warner
ca32db5b39 #598: add cli+backupdb tests, improve user display, update docs, move docs out of proposed/ 2009-02-05 22:07:01 -07:00
Brian Warner
add0e1f2f8 #598: add backupdb to 'tahoe backup' command, enable it by default 2009-02-05 19:56:40 -07:00
Brian Warner
4be2e11d11 add sqlite-based backupdb, for #598 and others (including 'tahoe cp'). Not enabled yet. 2009-02-05 18:17:56 -07:00
Zooko O'Whielacronx
9ba5f9347d setup: add a case to execute "python .../twistd.py" if "twistd" is not found 2009-02-04 18:06:20 -07:00
Brian Warner
0716fbcd16 CLI: tahoe_check: stop escaping the JSON output when using --raw 2009-02-02 21:12:32 -07:00
Brian Warner
cfce8b5eab #598: first cut of 'tahoe backup' command: no backupdb, but yes shared-unchanged-directories and Archives/TIMESTAMP and Latest/ 2009-02-02 21:09:02 -07:00
Brian Warner
91dacc3dbc CLI: move node-url -should-end-in-slash code into a common place, so other tools can rely upon it later 2009-02-02 21:08:56 -07:00
Brian Warner
a7de479767 tahoe_ls: CLI command should return rc=0, not None 2009-02-02 21:07:20 -07:00
Brian Warner
1427db1c88 CLI: fix examples in tahoe put --help 2009-01-27 15:39:09 -07:00
Brian Warner
1de4110b35 #509: remove non-streaming 'tahoe manifest' CLI form 2009-01-23 17:00:02 -07:00
Brian Warner
6a04103cc2 #509 CLI: add 'tahoe manifest --stream' 2009-01-23 16:33:21 -07:00
Brian Warner
6ba154851f CLI: remove the '-v' alias for --version-and-path, to free up '-v' for more traditional uses (like --verbose) 2009-01-23 15:21:50 -07:00
Zooko O'Whielacronx
fafdd2ce59 setup: fix "tahoe start" to work on Windows even when a Tahoe base dir hasn't been configured in the Windows registry 2009-01-21 12:47:20 -07:00
cgalvan
7bfaa74ef1 add option to show version and path to the tahoe executable 2009-01-16 12:47:51 -07:00
Larry Hosken
3267984fa9 'tahoe cp -r', upon encountering a dangling symlink, would assert out.
This was somewhat sad; the assertion didn't say what path caused the
error, what went wrong.  So... silently skip over things that are
neither dirs nor files.
2009-01-07 23:51:14 -07:00
Zooko O'Whielacronx
821e64203c cli: make startstop_node wait 40 seconds instead of 20 for a process to go away after we signalled it to go away, before emitting a warning
Because the unit tests on the VirtualZooko? buildslave failed when it took 31 seconds for a process to go away.
Perhaps getting warning message after only 5 seconds instead of 40 seconds is desirable, and we should change the unit tests and set this back to 5, but I don't know exactly how to change the unit tests. Perhaps match this particular warning message about the shutdown taking a while and allow the code under test to pass if the only stderr that it emits is this warning.
2009-01-06 07:51:06 -07:00
Zooko O'Whielacronx
778167c2b1 immutable: refactor downloader to be more reusable for checker/verifier/repairer (and better)
The code for validating the share hash tree and the block hash tree has been rewritten to make sure it handles all cases, to share metadata about the file (such as the share hash tree, block hash trees, and UEB) among different share downloads, and not to require hashes to be stored on the server unnecessarily, such as the roots of the block hash trees (not needed since they are also the leaves of the share hash tree), and the root of the share hash tree (not needed since it is also included in the UEB).  It also passes the latest tests including handling corrupted shares well.
  
ValidatedReadBucketProxy takes a share_hash_tree argument to its constructor, which is a reference to a share hash tree shared by all ValidatedReadBucketProxies for that immutable file download.
  
ValidatedReadBucketProxy requires the block_size and share_size to be provided in its constructor, and it then uses those to compute the offsets and lengths of blocks when it needs them, instead of reading those values out of the share.  The user of ValidatedReadBucketProxy therefore has to have first used a ValidatedExtendedURIProxy to compute those two values from the validated contents of the URI.  This is pleasingly simplifies safety analysis: the client knows which span of bytes corresponds to a given block from the validated URI data, rather than from the unvalidated data stored on the storage server.  It also simplifies unit testing of verifier/repairer, because now it doesn't care about the contents of the "share size" and "block size" fields in the share.  It does not relieve the need for share data v2 layout, because we still need to store and retrieve the offsets of the fields which come after the share data, therefore we still need to use share data v2 with its 8-byte fields if we want to store share data larger than about 2^32.
  
Specify which subset of the block hashes and share hashes you need while downloading a particular share.  In the future this will hopefully be used to fetch only a subset, for network efficiency, but currently all of them are fetched, regardless of which subset you specify.
  
ReadBucketProxy hides the question of whether it has "started" or not (sent a request to the server to get metadata) from its user.

Download is optimized to do as few roundtrips and as few requests as possible, hopefully speeding up download a bit.
2009-01-05 09:51:45 -07:00
Zooko O'Whielacronx
8d83699783 cli: make startstop_node wait 20 seconds instead of 5 for a process to go away after we signalled it to go away
Because the unit tests on the VirtualZooko buildslave failed when it took 16 seconds for a process to go away.
Perhaps getting notification after only 5 seconds instead of 20 seconds is desirable, and we should change the unit tests and set this back to 5, but I don't know exactly how to change the unit tests.  Perhaps match this particular warning message about the shutdown taking a while and allow the code under test to pass if the only stderr that it emits is this warning.
2008-12-30 01:20:22 -07:00
Zooko O'Whielacronx
883e51b02d cli: undo the effects of [http://allmydata.org/trac/tahoe/changeset/20081222235453-92b7f-f841e18afb94e1fd95e6dafb799a3d876dd85c69]
We're just going to mark unicode in the cli as unsupported for tahoe-lafs-1.3.0.  Unicode filenames on the command-line do actually work for some platforms and probably only if the platform encoding is utf-8, but I'm not sure, and in any case for it to be marked as "supported" it would have to work on all platforms, be thoroughly tested, and also we would have to understand why it worked.  :-)
2008-12-24 09:53:17 -07:00
Zooko O'Whielacronx
36df38e58b cli: decode all cli arguments, assuming that they are utf-8 encoded
Also encode all args to urllib as utf-8 because urllib doesn't handle unicode objects.
I'm not sure if it is appropriate to *assume* utf-8 encoding of cli args.  Perhaps the Right thing to do is to detect the platform encoding.  Any ideas?
This patch is mostly due to François Deppierraz.
2008-12-22 17:54:53 -07:00
Zooko O'Whielacronx
c79230c854 cli: if response code from wapi server is not 200 then stop instead of proceeding
Also, include the data that failed to json parse in an exception raised by the json parser.
2008-12-20 07:49:18 -07:00
Zooko O'Whielacronx
82ee44ed5b debug: pass empty optional arguments to ReadBucketProxy
because those arguments are about to become non-optional (for other code than test/debug code)
2008-12-16 17:51:45 -07:00
Brian Warner
a2ce315074 CLI: check for pre-existing aliases in 'tahoe create-alias' and 'tahoe add-alias' 2008-12-02 20:20:22 -07:00
Brian Warner
71c62f8fcb #542 'tahoe create-key-generator': fix the .tac file this creates to be compatible with modern code, add a test 2008-12-01 17:47:21 -07:00
Brian Warner
cfba882b30 storage: replace sizelimit with reserved_space, make the stats 'disk_avail' number incorporate this reservation 2008-12-01 17:24:21 -07:00
Zooko O'Whielacronx
fe6abac87b wui/wapi: change the default port number from 8123 to 3456 to avoid conflict with TorButton
See ticket #536 for details.
2008-11-25 17:57:37 -07:00
Brian Warner
b84c2c6541 manifest: add storage-index strings to the json results 2008-11-19 16:00:27 -07:00
Brian Warner
677928a1da cli: tahoe stats: abbreviate total sizes too 2008-11-18 20:28:16 -07:00
Brian Warner
9871f3f1b7 cli: 'tahoe stats': add abbreviated size to the histogram. Not sure this actually improves things. 2008-11-18 20:17:36 -07:00
Brian Warner
0cdf526b50 cli: add 'tahoe check' and 'tahoe deep-check' commands, with primitive reporting code 2008-11-18 19:12:10 -07:00
Brian Warner
9c866ada71 cli: factor out slow-http-operation to a separate module 2008-11-18 19:11:13 -07:00
Brian Warner
5c3e153d0e cli: tahoe stats/manifest: change --verbose to --raw, since I want -v for --verify for check/deep-check/repair 2008-11-18 18:36:08 -07:00
Brian Warner
918970b63a 'tahoe create-key-generator': fix help text 2008-11-18 01:47:58 -07:00
Brian Warner
8473a96ada #330: convert stats-gatherer into a .tac file service, add 'tahoe create-stats-gatherer' 2008-11-18 01:46:20 -07:00
Brian Warner
cae54ab118 tahoe.cfg: add controls for k and N (and shares-of-happiness) 2008-11-18 00:29:44 -07:00
Brian Warner
ead0e4d6ca cli: add tests for 'tahoe stats --verbose' 2008-11-17 22:11:14 -07:00
Brian Warner
94de73ddc0 cli: add --verbose to 'tahoe manifest', to show the raw JSON data 2008-11-17 22:02:19 -07:00
Brian Warner
5a60086dbc CLI: add 'tahoe stats', to run start-deep-stats and print the results 2008-11-13 19:43:50 -07:00
francois
c1f639d230 Fix an filename encoding issue with "tahoe cp" 2008-11-11 14:08:03 -07:00
Brian Warner
0d93d6244e CLI: add 'tahoe manifest', which takes a directory and returns a list of things you can reach from it 2008-11-12 20:17:25 -07:00
Brian Warner
c9175de0f2 create_node.py: also remove now-unused import of pkg_resources 2008-11-12 18:47:16 -07:00
Brian Warner
9976bd439a tahoe.cfg: add tub.location, to override the location hints we include in our FURL. This replaces advertised_ip_addresses, which doesn't remain useful enough to retain it. Helps with #517 (Tor). 2008-11-12 18:44:58 -07:00
Zooko O'Whielacronx
74ce1cdc00 setup: remove pkg_resources.require() from create_node.py and add it to runner.py
Brian correctly points out that the latter is an entry point.
2008-11-12 15:25:03 -07:00
Zooko O'Whielacronx
1aed9fcfa1 setup: the .tac files created by create_node.py call pkg_resources.require() so that they can load tahoe and twisted packages which were installed with setuptools multi-version mode
Also the create_node.py script itself uses pkg_resources.require() for the same reason.
1970-01-01 17:50:05 -07:00
Brian Warner
a2e195df3e debug catalog-shares: tolerate even more errors on bad files/directories 2008-10-30 14:54:47 -07:00
Brian Warner
d97c34d622 debug/test_cli: fix error handling for catalog-shares, to make the test stop failing on windows 2008-10-30 12:06:51 -07:00
Brian Warner
6a7d5b893b create_node.py: add 'web.static = public_html' to the initial tahoe.cfg 2008-10-29 17:13:36 -07:00
Brian Warner
a9101112a4 catalog-shares command: tolerate errors, log them to stderr, handle v2-immutable shares 2008-10-29 15:10:10 -07:00
Brian Warner
7338440d86 scripts/create_node.py: remove empty-string defaults for --introducer= and --nickname= 2008-10-23 16:02:35 -07:00
Brian Warner
fd32d72b20 scripts/debug.py: emit the immutable-share version number, tolerate v2 2008-10-09 18:34:22 -07:00
Brian Warner
a0250e320b debug.py: oops, add missing import for ReadBucketProxy 2008-10-09 17:29:22 -07:00
Brian Warner
288d55825c storage: split WriteBucketProxy and ReadBucketProxy out into immutable/layout.py . No behavioral changes. 2008-10-09 17:08:00 -07:00
Brian Warner
dbc2337639 CLI: remove 'tahoe admin generate-keypair', since the pycryptopp ecdsa API is about to change incompatibly. We'll undo this once pycryptopp is updated 2008-10-06 17:23:20 -07:00
Brian Warner
034364c80b scripts/admin: split up generate_keypair code so that unit tests can use it more easily 2008-10-01 16:52:38 -07:00
Brian Warner
cd26f58305 #518: replace various BASEDIR/* config files with a single BASEDIR/tahoe.cfg, with backwards-compatibility of course 2008-09-30 16:21:49 -07:00
Brian Warner
935d185696 tolerate simplejson-2.0.0 and newer, which frequently return bytestrings instead of unicode objects. Closes #523 2008-09-30 15:21:06 -07:00
robk-tahoe
ed9873c2a9 CLI: rework webopen, and moreover its tests w.r.t. path handling
in the recent reconciliation of webopen patches, I wound up adjusting
webopen to 'pass through' the state of the trailing slash on the given
argument to the resultant url passed to the browser.  this change 
removes the requirement that arguments must be directories, and allows
webopen to be used with files.  it also broke the tests that assumed
that webopen would always normalise the url to have a trailing slash.

in fixing the tests, I realised that, IMHO, there's something deeply
awry with the way tahoe handles paths; specifically in the combination
of '/' being the name of the root path within an alias, but a leading
slash on paths, e.g. 'alias:/path', is catagorically incorrect. i.e.
 'tahoe:' == 'tahoe:/' == '/' 
but 'tahoe:/foo' is an invalid path, and must be 'tahoe:foo'

I wound up making the internals of webopen simply spot a 'path' of
'/' and smash it to '', which 'fixes' webopen to match the behaviour
of tahoe's path handling elsewhere, but that special case sort of
points to the weirdness.

(fwiw, I personally found the fact that the leading / in a path was
disallowed to be weird - I'm just used to seeing paths qualified by
the leading / I guess - so in a debate about normalising path handling
I'd vote to include the /)
2008-09-24 09:45:23 -07:00
robk-tahoe
2c9a854f10 CLI: reconcile webopen changes
I think this is largely attributable to a cleanup patch I'd made
which never got committed upstream somehow, but at any rate various
conflicting changes to webopen had been made. This cleans up the
conflicts therein, and hopefully brings 'tahoe webopen' in line with
other cli commands.
2008-09-24 08:20:02 -07:00
robk-tahoe
8f28d64d77 cli: cleanup webopen command
moved the body of webopen out of cli.py into tahoe_webopen.py

made its invocation consistent with the other cli commands, most
notably replacing its 'vdrive path' with the same alias parsing,
allowing usage such as 'tahoe webopen private:Pictures/xti'
2008-06-18 13:19:40 -07:00
Brian Warner
53f53b7c82 add --syslog argument to 'tahoe start' and 'tahoe restart', used to pass --syslog to twistd for non-Tahoe nodes (like cpu-watcher) 2008-09-24 18:03:02 -07:00
Brian Warner
6607fdc586 CLI: add 'tahoe admin generate-keypair' command 2008-09-18 17:11:33 -07:00
Brian Warner
f00d1961d2 startstop_node.py: find twistd in our supportlib if we had to build Twisted as a setuptools dependency. This is a form of cgalvan's #505 patch, simplified because now 'setup.py trial' takes care of sys.path and PYTHONPATH 2008-09-11 19:51:38 -07:00
Brian Warner
7a206421b4 CLI: tolerate blank lines in the aliases file 2008-08-12 19:50:50 -07:00
Brian Warner
014c9b5969 CLI: add 'tahoe debug corrupt-share', and use it for deep-verify tests, and fix non-deep web checker API to pass verify=true into node 2008-08-12 17:05:01 -07:00
Brian Warner
67e7333955 'tahoe debug dump-share': add --offsets, to show section offsets 2008-08-12 14:46:56 -07:00
Brian Warner
acb0297806 scripts/debug: split out dump_immutable_share 2008-08-12 13:55:17 -07:00
Brian Warner
533afd039f scripts/debug: clean up use of stdout/stderr 2008-08-12 13:52:42 -07:00
Brian Warner
1711b5591f CLI: move the 'repl' command to 'tahoe debug repl' 2008-08-12 13:40:17 -07:00