Make sure that foolscap.logging.log.setLogDir is called with a str (not unicode) path, v2. Includes test. fixes #1725
CREDITS: lebek
Adding 'move' button to web UI, closes #1579

This adds "move file" capability to the web UI's directory display. The
support and test framework is heavily based on the similar "rename file"
feature. Unit tests and documentation are included. Multiple in-progress
versions of this patch may be found in ticket 1579. This version
includes arbitrary URI target support and is compatible with the change
from tahoe_css to tahoe.css.
Change the arbitrary URI support from implied to explicit

The move webapi function now takes a target_type argument which lets it
know whether the target is a subdirectory name or URI. This is an
improvement over the old system in which the move handler tried to guess
whether the target was a name or a URI. Also fixed a little docs
copypaste problem and tweaked some line wrapping.
Add unit test for moving a directory

My gut tells me this case sould be tested. The rename suite tests it, so
move's will too.
webapi 'move'-button cleanups

test_web.py: use shouldFail2(), safer than old shouldFail()
directory.py: forbid slashes in from_name=, return BAD_REQUEST instead of
              GONE when trying to move into a non-directory
test_web: improve shouldFail2() error reporting
webui: merge 'move' form with 'rename' form
Improve webapi t=move docs.
webapi: remove undocumented t=mkdir-p operation

Closes #380
rename build_helpers files

This is from the darcs patch for #1342, which failed to apply on my darcs
tree, so I'm landing it from git. I'm landing the rename-files part
separately from the modify-those-files part to avoid VC complications.
modify build_helpers files

Should close #1342. This makes the actual changes to the two test
files (separated from the 'rename' patch to avoid VC complications).
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
test-dont-use-too-old-dep.py: fix tarfile timestamps

It turns out that TarFile.addfile() doesn't provide a reasonable default
timestamp, resulting in files dated to 1970 (they're probably wearing
bell-bottoms and listening to disco too). Then, when the bdist_egg command
tries to create a *zip*file with those files, it explodes because zipfiles
cannot handle timestamps before 1980 (it prefers boomboxes and jackets with
straps on the shoulders, thank you very much).

This puts a modern time.time() on the members of the tarfile, allowing future
cryptocoderarchaeologists the opportunity to make fun of fashion trends from
the user's chosen era, rather than an artificially older one.

refs #1342
Add ETags for immutable directories

Like immutable files, the ETag is based on the storage index. However, since
a directory is a special interpretation of a file, it is distinguished from
the file by prepending "DIR:" onto the start of the ETag, and adding
-representation on the end (where -representation is the ?t= argument, json,
info, etc).

It also checks the return of setETag and avoids generating a representation
if the client already has it.
Short circuit GET on ETags match

When client does a conditional GET/HEAD with If-none-match:, if the condition
fails (ie, the client's ETag matches the file's) then we can short-circuit
the whole process and immediately return an empty body.
Added unit tests covering #466:comment-15. Refactored the 'etag' behavior for immutable files to respond to all GET '?t=' flags, not just t=None

Signed-off-by: Andrew Miller <amiller@dappervision.com>
test_web: improve ETag tests, add If-None-Match test
webapi: don't allow ETags in t=info or t=rename-form, both are variable

t=info contains randomly-generated ophandles, and t=rename-form contains the
name of the child being renamed, so neither is eligible for a
short-circuiting ETag. Enhanced test_web to exercise this. Had to improve
FakeCHKFileNode slightly to let it participate. Refs #443.
test_web: fix use of headers= that's been wrong for a while