summaryrefslogtreecommitdiff
path: root/Logs/Transfer.hs
Commit message (Collapse)AuthorAge
* AssociatedFile newtypeGravatar Joey Hess2017-03-10
| | | | | | To prevent any further mistakes like 1a497cefb47557f0b4788c606f9071be422b2511 This commit was sponsored by Francois Marier on Patreon.
* fix up Read instance incompatability caused by recent commitGravatar Joey Hess2017-02-24
| | | | | | | | | | | | | | | | | | | 2f868db90c7ba16eee901b9b1472b1e1a889dd93 changed the Read instance for Key. I've checked all uses of that instance (by removing it and seeing what breaks), and they're all limited to the webapp, except one. That is GitAnnexDistribution's Read instance. So, 2f868db90c7ba16eee901b9b1472b1e1a889dd93 would have broken upgrades of git-annex from downloads.kitenet.net. Once the .info files there got updated for a new release, old releases would have failed to parse them and never upgraded. To fix this, I found a way to make the .info files that contain GitAnnexDistribution values be readable by the old version of git-annex. This commit was sponsored by Ewen McNeill.
* Some optimisations to string splitting code.Gravatar Joey Hess2017-01-31
| | | | | | | | | | | | | | | | | | | Turns out that Data.List.Utils.split is slow and makes a lot of allocations. Here's a much simpler single character splitter that behaves the same (even in wacky corner cases) while running in half the time and 75% the allocations. As well as being an optimisation, this helps move toward eliminating use of missingh. (Data.List.Split.splitOn is nearly as slow as Data.List.Utils.split and allocates even more.) I have not benchmarked the effect on git-annex, but would not be surprised to see some parsing of eg, large streams from git commands run twice as fast, and possibly in less memory. This commit was sponsored by Boyd Stephen Smith Jr. on Patreon.
* Always use filesystem encoding for all file and handle reads and writes.Gravatar Joey Hess2016-12-24
| | | | | This is a big scary change. I have convinced myself it should be safe. I hope!
* move Arbitrary instance to new Types.Transfer moduleGravatar Joey Hess2016-09-05
| | | | Avoid orphan instance warning
* avoid warning about orphan Arbirary instanceGravatar Joey Hess2016-09-05
|
* get, move, copy, mirror: Added --failed switch which retries failed copies/movesGravatar Joey Hess2016-08-03
| | | | | | | | | Note that get --from foo --failed will get things that a previous get --from bar tried and failed to get, etc. I considered making --failed only retry transfers from the same remote, but it was easier, and seems more useful, to not have the same remote requirement. Noisy due to some refactoring into Types/
* remove 163 lines of code without changing anything except importsGravatar Joey Hess2016-01-20
|
* convert from Utility.LockPool to Annex.LockPool everywhereGravatar Joey Hess2015-11-12
|
* ignore failure to clean up stale transfer lock fileGravatar Joey Hess2015-05-19
| | | | | Perhaps due to permissions problem, or perhaps a race with another process also cleaning up.
* fix crash in stale transfer lockfile cleanup codeGravatar Joey Hess2015-05-19
| | | | | Need to differentiate between the lockfile not being locked, and it not existing.
* use lock pools throughout git-annexGravatar Joey Hess2015-05-19
| | | | | | | | | | | | | The one exception is in Utility.Daemon. As long as a process only daemonizes once, which seems reasonable, and as long as it avoids calling checkDaemon once it's already running as a daemon, the fcntl locking gotchas won't be a problem there. Annex.LockFile has it's own separate lock pool layer, which has been renamed to LockCache. This is a persistent cache of locks that persist until closed. This is not quite done; lockContent stil needs to be converted.
* lock pools to work around non-concurrency/composition safety of POSIX fcntlGravatar Joey Hess2015-05-18
|
* Stale transfer lock and info files will be cleaned up automatically when ↵Gravatar Joey Hess2015-05-12
| | | | | | get/unused/info commands are run. Deleting lock files is tricky, tricky stuff. I think I got it right!
* an optimization that also fixes a reversionGravatar Joey Hess2015-05-12
| | | | | | | | | | | | | | | | | | | | This is a little optimisation; avoid loading the info file for the download of the current key when checking for other downloads. The reversion it fixes is sorta strange. b94eafec8c4a7868da753f9b22ca823552e9764c broke checking for transfers that were already in progress. Indeed, the transfer lock was not held after getTransfers was called. Why? I think it's magic in ghc's handling of getLock and setLock, although it's hard to tell since those functions are almost entirely undocumented as to their semantics. Something, either the RTS (or maybe it's linux?) notices that the same process has taken a lock and is now calling getLock on a FD attached to the same file. So, it drops the lock. So, this optimisation avoids that problematic behavior.
* Take space that will be used by running downloads into account when checking ↵Gravatar Joey Hess2015-05-12
| | | | annex.diskreserve.
* support time-1.5.0Gravatar Joey Hess2015-05-10
| | | | | | | This no longer uses old-locale's defaultTimeLocale, but provides one of its own. Factored out a Logs.TimeStamp.
* update my email address and homepage urlGravatar Joey Hess2015-01-21
|
* final scary locking refactoring (for now)Gravatar Joey Hess2014-08-20
| | | | | | | | | | Note that while before checkTransfer this called getLock with WriteLock, getLockStatus's use of ReadLock will also notice any exclusive locks. Since transfer info files are only locked exclusively, never shared, there is no behavior change. Also, fixes checkLocked to actually return Just False when the file exists, but is not locked.
* more lock file refactoringGravatar Joey Hess2014-08-20
|
* unify exception handling into Utility.ExceptionGravatar Joey Hess2014-08-07
| | | | | | | | | | | | | | | | | | | | Removed old extensible-exceptions, only needed for very old ghc. Made webdav use Utility.Exception, to work after some changes in DAV's exception handling. Removed Annex.Exception. Mostly this was trivial, but note that tryAnnex is replaced with tryNonAsync and catchAnnex replaced with catchNonAsync. In theory that could be a behavior change, since the former caught all exceptions, and the latter don't catch async exceptions. However, in practice, nothing in the Annex monad uses async exceptions. Grepping for throwTo and killThread only find stuff in the assistant, which does not seem related. Command.Add.undo is changed to accept a SomeException, and things that use it for rollback now catch non-async exceptions, rather than only IOExceptions.
* add desktop notificationsGravatar Joey Hess2014-03-22
| | | | | | | Motivation: Hook scripts for nautilus or other file managers need to provide the user with feedback that a file is being downloaded. This commit was sponsored by THM Schoemaker.
* Put non-object tmp files in .git/annex/misctmp, leaving .git/annex/tmp for ↵Gravatar Joey Hess2014-02-26
| | | | | | | | | | | | | | | | | | | | only partially transferred objects. This allows eg, putting .git/annex/tmp on a ram disk, if the disk IO of temp object files is too annoying (and if you don't want to keep partially transferred objects across reboots). .git/annex/misctmp must be on the same filesystem as the git work tree, since files are moved to there in a way that will not work cross-device, as well as symlinked into there. I first wanted to put the tmp objects in .git/annex/objects/tmp, but that would pose transition problems on upgrade when partially transferred objects existed. git annex info does not currently show the size of .git/annex/misctemp, since it should stay small. It would also be ok to make something clean it out, periodically.
* fix windows build (and make --stop work on windows, incidentially)Gravatar Joey Hess2014-02-11
| | | | The Utility.PID will clean up other code soon.
* avoid using openFile when withFile can be usedGravatar Joey Hess2014-02-03
| | | | | | Potentially fixes some FD leak if an action on an opened file handle fails for some reason. There have been some hard to reproduce reports of git-annex leaking FDs, and this may solve them.
* fix warningGravatar Joey Hess2014-01-28
|
* use locking on WindowsGravatar Joey Hess2014-01-28
| | | | This is all the easy cases, where there was already a separate lock file.
* syntaxGravatar Joey Hess2013-12-11
|
* pull in Win32-extras, to be able to get current process id in WindowsGravatar Joey Hess2013-12-11
| | | | | | | | | Fixed up a number of things that had worked around there not being a way to get that. Most notably, transfer info files on windows now include the process id, since no locking is currently done. This means the file format varies between windows and unix.
* different PID types for Unix and WindowsGravatar Joey Hess2013-12-10
| | | | | | | | Windows has a larger (unsigned) PID space, so cannot use the unix CInt there. Note that TransferInfo does not yet ever get the TransferPid populated, as there is missing locking.
* hlintGravatar Joey Hess2013-09-25
|
* assistant: Clear the list of failed transfers when doing a full transfer ↵Gravatar Joey Hess2013-09-25
| | | | | | | | | | | | | | | | | scan. This prevents repeated retries to download files that are not available, or are not referenced by the current git tree. This is motivated by a user report that the assistant was repeatedly retrying transfers of files that had been deleted (in direct mode, so removing the only copy). Note that the glacier code retries failed transfers after a while to retry downloads that have aged long enough to be available. This is ok; if we're doing a full transfer scan we'll retry on every file that is still in the git tree. Also note that this makes the assistant less likely to get every file referenced by old revs of the git tree. Not something the assistant tries to ensure anyway, so I feel this is acceptable.
* avoid more build warnings on WindowsGravatar Joey Hess2013-08-04
|
* get rid of __WINDOWS__, use mingw32_HOST_OSGravatar Joey Hess2013-08-02
| | | | | The latter is harder for me to remember, but avoids build failures in code used by the configure program.
* display "transfer already in progress" as a noteGravatar Joey Hess2013-07-17
|
* When a transfer is already being run by another process, proceed on to the ↵Gravatar Joey Hess2013-07-17
| | | | next file, rather than dying.
* moved AssociatedFile definitionGravatar Joey Hess2013-07-04
|
* improve robustness of fromDirect and replaceFileGravatar Joey Hess2013-05-25
| | | | | | | | | Made fromDirect check that a file in the tree has good content (and is not a broken symlink either) before copying it to another file that has the same key. Made replaceFile clean up the temp file if the action that creates it, or the file replacement action fails.
* fix permission damage (thanks, Windows)Gravatar Joey Hess2013-05-11
|
* clean up from windows portingGravatar Joey Hess2013-05-11
|
* git-annex now builds on Windows (doesn't work)Gravatar Joey Hess2013-05-11
|
* connect existing meters to the transfer log for downloadsGravatar Joey Hess2013-04-11
| | | | | | | | | | | | | | Most remotes have meters in their implementations of retrieveKeyFile already. Simply hooking these up to the transfer log makes that information available. Easy peasy. This is particularly valuable information for encrypted remotes, which otherwise bypass the assistant's polling of temp files, and so don't have good progress bars yet. Still some work to do here (see progressbars.mdwn changes), but this is entirely an improvement from the lack of progress bars for encrypted downloads.
* hlintGravatar Joey Hess2013-04-03
|
* show bytesCompleteGravatar Joey Hess2013-04-02
|
* webapp: Progess bar fixes for many types of special remotes.Gravatar Joey Hess2013-03-28
| | | | | | | | | | | | | There was confusion in different parts of the progress bar code about whether an update contained the total number of bytes transferred, or the number of bytes transferred since the last update. One way this bug showed up was progress bars that seemed to stick at zero for a long time. In order to fix it comprehensively, I add a new BytesProcessed data type, that is explicitly a total quantity of bytes, not a delta. Note that this doesn't necessarily fix every problem with progress bars. Particularly, buffering can now cause progress bars to seem to run ahead of transfers, reaching 100% when data is still being uploaded.
* get, copy, move: Display an error message when an identical transfer is ↵Gravatar Joey Hess2013-03-19
| | | | already in progress, rather than failing with no indication why.
* optimisation for transfers to drives that are not plugged inGravatar Joey Hess2013-03-18
| | | | | | Rather than forking a git-annex transferkey only to have it fail, just immediately record the failed transfer (so when the drive is plugged in, the scan will retry it).
* add additional debug info about reasons for transfersGravatar Joey Hess2013-03-01
|
* improve importsGravatar Joey Hess2013-02-27
|
* move Arbitrary instances out of Test and into modules that define the typesGravatar Joey Hess2013-02-27
| | | | This is possible now that we build-depend on QuickCheck.