summaryrefslogtreecommitdiff
path: root/Utility
Commit message (Collapse)AuthorAge
* generalize parseDuration so it can be used in the ReadM monadGravatar Joey Hess2015-07-08
|
* better method for running tasty's optparse as a subcommandGravatar Joey Hess2015-07-08
|
* import: Fix failure of cross-device import on Windows.Gravatar Joey Hess2015-07-07
| | | | | As well as import, 2 other places ran "mv" manually, so changed them to use moveFile as well.
* avoid "Defined but not used" warning on androidGravatar Joey Hess2015-07-02
|
* use bloom filter in second pass of sync --all --contentGravatar Joey Hess2015-06-16
| | | | | | | | This is needed because when preferred content matches on files, the second pass would otherwise want to drop all keys. Using a bloom filter avoids this, and in the case of a false positive, a key will be left undropped that preferred content would allow dropping. Chances of that happening are a mere 1 in 1 million.
* instance Hashable Key for bloomfilterGravatar Joey Hess2015-06-16
|
* improve url parsing moreGravatar Joey Hess2015-06-14
| | | | | Now can handle eg, "http://[::1]/download/cdrom-fontzip[foo]", where the first [] need to stay unescaped, but the rest have to be escaped.
* Improve url parsing to handle some urls containing illegal [] characters in ↵Gravatar Joey Hess2015-06-14
| | | | | | their paths. Ie, "https://archive.org/download/zoom-2/Zoom - Release 2 (1996)(Active Software)[!].iso"
* oh foo, I didn't mean to include this in the prev commitGravatar Joey Hess2015-06-11
|
* 4 ns optimisation of repeated calls to hasDifference on the same DifferencesGravatar Joey Hess2015-06-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | I want this as fast as possible, so it can be added to code paths without slowing them down. Avoid the set lookup, and rely on laziness, drops runtime from 14.37 ns to 11.03 ns according to this criterion benchmark: import Criterion.Main import qualified Types.Difference as New import qualified Types.DifferenceOld as Old main :: IO () main = defaultMain [ bgroup "hasDifference" [ bench "new" $ whnf (New.hasDifference New.OneLevelObjectHash) new , bench "old" $ whnf (Old.hasDifference Old.OneLevelObjectHash) old ] ] where s = "fromList [ObjectHashLower, OneLevelObjectHash, OneLevelBranchHash]" new = New.readDifferences s old = Old.readDifferences s A little bit of added boilerplate, but I suppose it's worth it to not need to worry about set lookup overhead. Note that adding more differences would slow down the old implementation; the new implementation will run the same speed.
* two more breakages introduced when removing the Params constructorGravatar Joey Hess2015-06-03
|
* fix bug introduced in recent Params removalGravatar Joey Hess2015-06-02
|
* Revert "When listing DBus services, also list activatable services."Gravatar Joey Hess2015-06-02
| | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 334954d8bf9113b679f8af29ad481b0daece86f7. Sebastian thinks best to revert this: It seems to me the reason I needed to look at activatable sockets might actually be a networkd bug, and I was in error about patch 0001. On my machines (without DHCP), networkd quits after configuring the links. I thought this had to do with network activation, but that was probably mistaken. This was obscured by my testing the change by doing systemctl stop/start on networkd; now that I actually unplugged the network cable, I noticed no DBus messages are triggered by this on this machine. Your test case might have had a similar problem (networkd quitting on idle). Might be related to [1]. On another machine (with DHCP) networkd remains active all the time, and patch 0002 works there. You might want to revert 0001, though: Suppose someone’s running no manager at all, so that polling would be required. Because networkd is still listed as activable, we would refrain from polling – by mistake, because networkd doesn’t seem to actually go active if we listen on its bus, and it’s listed as activable even when it’s not configured. Connectivity-related messages will come in when stopping/starting the service, but not when unplugging the cable.
* When listing DBus services, also list activatable services.Gravatar Sebastian Reuße2015-06-02
|
* remove Params constructor from Utility.SafeCommandGravatar Joey Hess2015-06-01
| | | | | | | | | | | | | | | | | | This removes a bit of complexity, and should make things faster (avoids tokenizing Params string), and probably involve less garbage collection. In a few places, it was useful to use Params to avoid needing a list, but that is easily avoided. Problems noticed while doing this conversion: * Some uses of Params "oneword" which was entirely unnecessary overhead. * A few places that built up a list of parameters with ++ and then used Params to split it! Test suite passes.
* AMP hackGravatar Joey Hess2015-05-31
|
* merge haddock formatting from propellorGravatar Joey Hess2015-05-30
|
* qualify imports to avoid conflict with regex-tdfa-rcGravatar Joey Hess2015-05-30
|
* fsck: When checksumming a file fails due to a hardware fault, the file is ↵Gravatar Joey Hess2015-05-27
| | | | now moved to the bad directory, and the fsck proceeds. Before, the fsck immediately failed.
* implment catchHardwareFaultGravatar Joey Hess2015-05-27
|
* improve error message when checksum command exits nonzeroGravatar Joey Hess2015-05-27
|
* merge haddock documentation from propellorGravatar Joey Hess2015-05-27
|
* need more polymorphismGravatar Joey Hess2015-05-22
|
* fix windows buildGravatar Joey Hess2015-05-22
|
* 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.
* unused importsGravatar Joey Hess2015-05-19
|
* honor core.sharedRepository settings in lockContentGravatar Joey Hess2015-05-19
| | | | | | | | The content file may not be owned by the user running git-annex, in which case, setting the owner write bit was not enough to let lockContent act on the file. However, with some core.sharedRepository configs, the file should be writable by the user's group. So, the thing to do is to call thawContent on it.
* convert lockContent to use new LockPoolsGravatar Joey Hess2015-05-19
| | | | | | | | | | | | Also cleaned up the code, avoiding creating a lock file if we're going to open it for create later anyway. And, if there's an exception while preparing to lock the file, but not at the point of actually taking the lock, throw an exception, instead of silently not locking and pretending to succeed. And, on Windows, always use lock file, even if the repo somehow got into indirect mode (maybe with cygwin git..)
* 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
|
* comment typosGravatar Joey Hess2015-05-17
|
* Fix an unlikely race that could result in two transfers of the same key ↵Gravatar Joey Hess2015-05-12
| | | | | | running at once. As discussed in bug report.
* couple of AMP warnings I missed beforeGravatar Joey Hess2015-05-10
|
* more {-# OPTIONS_GHC -fno-warn-tabs #-} ... Forcing people who have what is ↵Gravatar Joey Hess2015-05-10
| | | | merely a difference of opinion to you to do this is a bit of an asshole move. Just saying.
* disable horrible tab warning, needed in every file that Setup.hs pulls inGravatar Joey Hess2015-05-10
| | | | | | | | This is certianly a cabal bug for not passing the build options in the cabal file when building Setup.hs. And, why oh why did ghc enable this warning by default? So unhappy with this choice.
* rejigger imports for clean build with ghc 7.10's AMP changesGravatar Joey Hess2015-05-10
| | | | | The explict import Prelude after import Control.Applicative is a trick to avoid a warning.
* FlexibleContexts needed by ghc 7.10Gravatar Joey Hess2015-05-10
|
* switch to Control.Monad.ST to avoid build warning in ghc 7.10Gravatar Joey Hess2015-05-10
|
* Improve quvi 0.4 output parsing to handle cases wher there is no known ↵Gravatar Joey Hess2015-05-08
| | | | filename extension. This is currently the case when using quvi with youtube. In this case, the extension ".m" will be used.
* avoid using relative path from temp dir to dest fileGravatar Joey Hess2015-05-07
| | | | | | | | | | | That failed on OSX. The temp dir was /var/folders/fb/pnwjj52n7fg0r9mnvpsfll180000gr/T/downloadurl and the relative path ../../../../../../Volumes/Visitors/joeyh/git-annex/r/.git/... Didn't work. I have no clue why, how did OSX manage to break this? But, the relative path is longer most of the time anyway, so let's just use the absolute path.
* Replace dataenc with sandi.Gravatar Magnus Therning2015-05-07
| | | | | | The library dataenc is unmaintained and has been superseded by sandi. Signed-off-by: Magnus Therning <magnus@therning.org>
* Support checking ftp urls for file presence.Gravatar Joey Hess2015-05-05
|
* Work around wget bug #784348 which could cause it to clobber git-annex ↵Gravatar Joey Hess2015-05-05
| | | | symlinks when downloading from ftp.
* add more generic interfaceGravatar Joey Hess2015-05-05
|
* revert reversion merged from propellorGravatar Joey Hess2015-04-29
|
* avoid dupicate bracket import errrorGravatar Joey Hess2015-04-29
| | | | | | | | | | Ambiguous occurrence `bracket' It could refer to either `Control.Exception.bracket', imported from `Control.Exception' at Utility/FileMode.hs:14:27-33 (and originally defined in `Control.Exception.Base') or `Utility.Exception.bracket', imported from `Utility.Exception' at Utility/FileMode.hs:22:1-24 (and originally defined in `Control.Monad.Catch')
* merge generalization of writeFileProtected from propellorGravatar Joey Hess2015-04-28
|
* Dropped support for older versions of yesod and warp than the ones in Debian ↵Gravatar Joey Hess2015-04-22
| | | | | | Jessie. 466 lines of compat cruft deleted!
* Removed dependency on haskell SHA library, instead using cryptohash >= 0.11.0.Gravatar Joey Hess2015-04-19
|
* refactorGravatar Joey Hess2015-04-19
|