summaryrefslogtreecommitdiff
path: root/Remote/Directory.hs
Commit message (Collapse)AuthorAge
* crippled filesystem support, probing and initial supportGravatar Joey Hess2013-02-14
| | | | | | | | | | | | git annex init probes for crippled filesystems, and sets direct mode, as well as `annex.crippledfilesystem`. Avoid manipulating permissions of files on crippled filesystems. That would likely cause an exception to be thrown. Very basic support in Command.Add for cripped filesystems; avoids the lock down entirely since doing it needs both permissions and hard links. Will make this better soon.
* Special remotes now all rollback storage of keys that get modified during ↵Gravatar Joey Hess2013-01-09
| | | | the transfer, which can happen in direct mode.
* Fix transferring files to special remotes in direct mode.Gravatar Joey Hess2013-01-06
|
* type based git config handling for remotesGravatar Joey Hess2013-01-01
| | | | | Still a couple of places that use git config ad-hoc, but this is most of it done.
* whitespace fixesGravatar Joey Hess2012-12-13
|
* avoid unnecessary MaybeGravatar Joey Hess2012-11-30
|
* Bugfix: directory special remote could loop forever storing a key when a ↵Gravatar Joey Hess2012-11-19
| | | | | | | | | | too small chunksize was configured. Ensure that each file has something written to it, even if the bytestring chunk size is greater than the configured chunksize. This means we may write a bit larger than the configured value, but only when the configured value is very small; ie, < 8 kb.
* directory special remote: Made more efficient and robust.Gravatar Joey Hess2012-11-19
| | | | | | | | | Files are now written to a tmp directory in the remote, and once all chunks are written, etc, it's moved into the final place atomically. For now, checkpresent still checks every single chunk of a file, because the old method could leave partially transferred files with some chunks present and others not.
* S3: Added progress display for uploading and downloading.Gravatar Joey Hess2012-11-18
|
* simplifyGravatar Joey Hess2012-11-18
|
* better streaming while encrypting/decryptingGravatar Joey Hess2012-11-18
| | | | | | Both the directory and webdav special remotes used to have to buffer the whole file contents before it could be decrypted, as they read from chunks. Now the chunks are streamed through gpg with no buffering.
* webdav now checks presence of and receives chunked contentGravatar Joey Hess2012-11-16
| | | | | Note that receiving encrypted chunked content currently involves buffering. (So does doing so with the directory special remote.)
* generic chunked content helperGravatar Joey Hess2012-11-16
| | | | | However, directory still uses its optimzed chunked file writer, as it uses less memory than the generic one in the helper.
* where indentingGravatar Joey Hess2012-11-11
|
* upload progress tracking for the directory special remoteGravatar Joey Hess2012-09-21
|
* unify typesGravatar Joey Hess2012-09-21
|
* add a progress callback to storeKey, and threaded it all the way throughGravatar Joey Hess2012-09-19
| | | | | | | | Transfer info files are updated when the callback is called, updating the number of bytes transferred. Left unused p variables at every place the callback should be used. Which is rather a lot..
* add support for readonly remotesGravatar Joey Hess2012-08-26
| | | | | | | Currently only the web special remote is readonly, but it'd be possible to also have readonly drives, or other remotes. These are handled in the assistant by only downloading from them, and never trying to upload to them.
* tweak field nameGravatar Joey Hess2012-08-26
|
* add a path field to remotesGravatar Joey Hess2012-07-22
| | | | | Also broke out some helper functions around constructing remotes, to be used later.
* record transfer information on local git remotesGravatar Joey Hess2012-07-01
| | | | | | | | | | | | | | | In order to record a semi-useful filename associated with the key, this required plumbing the filename all the way through to the remotes' storeKey and retrieveKeyFile. Note that there is potential for deadlock here, narrowly avoided. Suppose the repos are A and B. A sends file foo to B, and at the same time, B gets file foo from A. So, A locks its upload transfer info file, and then locks B's download transfer info file. At the same time, B is taking the two locks in the opposite order. This is only not a deadlock because the lock code does not wait, and aborts. So one of A or B's transfers will be aborted and the other transfer will continue. Whew!
* pointlessnessGravatar Joey Hess2012-06-29
|
* avoid ByteString.Char8 where not neededGravatar Joey Hess2012-06-20
| | | | | Its truncation behavior is a red flag, so avoid using it in these places where only raw ByteStrings are used, without looking at the data inside.
* noopGravatar Joey Hess2012-04-21
|
* Directory special remotes now check annex.diskreserve.Gravatar Joey Hess2012-04-20
|
* rationalize getConfigGravatar Joey Hess2012-03-22
| | | | | | | | | | getConfig got a remote-specific config, and this confusing name caused it to be used a couple of places that only were interested in global configs. Rename to getRemoteConfig and make getConfig only get global configs. There are no behavior changes here, but remote.<name>.annex-web-options never actually worked (and per-remote web options is a very unlikely to be useful case so I didn't make it work), so fix the documentation for it.
* nukes another 15 lines thanks to ifMGravatar Joey Hess2012-03-15
|
* better chunked file retrievalGravatar Joey Hess2012-03-04
| | | | | | Avoids opening every chunk at once, instead streaming them in. Not done for encrypted file retrieval yet.
* thread through original key to retrieveEnctyptedGravatar Joey Hess2012-03-04
| | | | | Allows showing progress bar for this last case of the directory special remote.
* add progress display when receiving filesGravatar Joey Hess2012-03-04
| | | | | | That was actually really easy. But, when getting a file from an encrypted directory special remote, no meter can be shown, because the total file size is not known.
* Add progress bar display to the directory special remote.Gravatar Joey Hess2012-03-04
| | | | | | | So far I've only written progress bars for sending files, not yet receiving. No longer uses external cp at all. ByteString IO is fast enough.
* tweakGravatar Joey Hess2012-03-03
|
* Directory special remotes now support chunking files written to themGravatar Joey Hess2012-03-03
| | | | | | Avoiding writing files larger than a specified size is useful on certian things. For example, box.com has a file size limit of 100 mb. Could also be useful on really crappy removable media.
* whereis: Prints the urls of files that the web special remote knows about.Gravatar Joey Hess2012-02-14
|
* remove Utility.Conditional and use IfElseGravatar Joey Hess2012-01-24
| | | | | | | This drops the >>! and >>? with the nice low fixity. IfElse does have undocumented >>=>>! and >>=>>? operators, but I deem that too fishy. Anyway, using whenM and unlessM is easier; I sometimes mixed the operators up.
* fsck --from remote --fastGravatar Joey Hess2012-01-20
| | | | | | | Avoids expensive file transfers, at the expense of checking file size and/or contents. Required some reworking of the remote code.
* optimize fsck --from directory special remoteGravatar Joey Hess2012-01-19
| | | | No need to copy anything, just symlink to the file.
* add tmp flag parameter to retrieveKeyFileGravatar Joey Hess2012-01-19
|
* Fix data loss bug in directory special remoteGravatar Joey Hess2012-01-16
| | | | | | | | | | | | | | | | When moving a file to the remote failed, and partially transferred content was left behind in the directory, re-running the same move would think it succeeded and delete the local copy. I reproduced data loss when moving files to a partition that was almost full. Interrupting a transfer could have similar results. Easily fixed by using a temp file which is then moved atomically into place once the transfer completes. I've audited other calls to copyFileExternal, and other special remote file transfer code; everything else seems to use temp files correctly (rsync, git), or otherwise use atomic transfers (bup, S3).
* type alias cleanupGravatar Joey Hess2011-12-31
|
* better filtering out of special remotesGravatar Joey Hess2011-12-31
|
* more partial function removalGravatar Joey Hess2011-12-15
| | | | | Left a few Prelude.head's in where it was checked not null and too hard to remove, etc.
* use lowercase hash by default; non-bare repos are a special caseGravatar Joey Hess2011-12-02
| | | | | | | | Directory special remotes will now always store keys in the lowercase name, which avoids the complication of catching failures to create the mixed case name. Git remotes using http will now try the lowercase name first.
* refactorGravatar Joey Hess2011-12-02
|
* refactorGravatar Joey Hess2011-11-28
|
* add support for using hashDirLower in addition to hashDirMixedGravatar Joey Hess2011-11-28
| | | | | | | | | | Supporting multiple directory hash types will allow converting to a different one, without a flag day. gitAnnexLocation now checks which of the possible locations have a file. This means more statting of files. Several places currently use gitAnnexLocation and immediately check if the returned file exists; those need to be optimised.
* Put a workaround in the directory special remote for strange behavior with ↵Gravatar Joey Hess2011-11-22
| | | | VFAT filesystems on Linux (mounted with shortname=mixed)
* factored out some useful error catching methodsGravatar Joey Hess2011-11-10
|
* safer inannex checkingGravatar Joey Hess2011-11-09
| | | | | | | | git-annex-shell inannex now returns always 0, 1, or 100 (the last when it's unclear if content is currently in the index due to it currently being moved or dropped). (Actual locking code still not yet written.)
* reorder repo parameters lastGravatar Joey Hess2011-11-08
| | | | | | | | | | | | | Many functions took the repo as their first parameter. Changing it consistently to be the last parameter allows doing some useful things with currying, that reduce boilerplate. In particular, g <- gitRepo is almost never needed now, instead use inRepo to run an IO action in the repo, and fromRepo to get a value from the repo. This also provides more opportunities to use monadic and applicative combinators.