aboutsummaryrefslogtreecommitdiff
path: root/Limit.hs
Commit message (Collapse)AuthorAge
* securehash matchingGravatar Joey Hess2017-02-27
| | | | | | | Added --securehash option to match files using a secure hash function, and corresponding securehash preferred content expression. This commit was sponsored by Ethan Aubin.
* add KeyVariety typeGravatar Joey Hess2017-02-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Where before the "name" of a key and a backend was a string, this makes it a concrete data type. This is groundwork for allowing some varieties of keys to be disabled in file2key, so git-annex won't use them at all. Benchmarks ran in my big repo: old git-annex info: real 0m3.338s user 0m3.124s sys 0m0.244s new git-annex info: real 0m3.216s user 0m3.024s sys 0m0.220s new git-annex find: real 0m7.138s user 0m6.924s sys 0m0.252s old git-annex find: real 0m7.433s user 0m7.240s sys 0m0.232s Surprising result; I'd have expected it to be slower since it now parses all the key varieties. But, the parser is very simple and perhaps sharing KeyVarieties uses less memory or something like that. This commit was supported by the NSF-funded DataLad project.
* 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.
* Avoid backtraces on expected failures when built with ghc 8; only use ↵Gravatar Joey Hess2016-11-15
| | | | | | | | | | | | | backtraces for unexpected errors. ghc 8 added backtraces on uncaught errors. This is great, but git-annex was using error in many places for a error message targeted at the user, in some known problem case. A backtrace only confuses such a message, so omit it. Notably, commands like git annex drop that failed due to eg, numcopies, used to use error, so had a backtrace. This commit was sponsored by Ethan Aubin.
* Fix bug in annex.largefiles mimetype= matching when git-annex is run in a ↵Gravatar Joey Hess2016-04-12
| | | | subdirectory of the repository.
* Support --metadata field<number, --metadata field>number etc to match ranges ↵Gravatar Joey Hess2016-02-27
| | | | | | | of numeric values. Similarly (well, for free), support preferred content expressions like metadata=field<number and metadata=field>number
* Avoid crashing when built with MagicMime support, but when the magic ↵Gravatar Joey Hess2016-02-23
| | | | database cannot be loaded.
* matchexpression: Added --largefiles option to parse an annex.largefiles ↵Gravatar Joey Hess2016-02-03
| | | | expression.
* annex.largefiles: Add support for mimetype=text/* etc, when git-annex is ↵Gravatar Joey Hess2016-02-03
| | | | linked with libmagic.
* simplifyGravatar Joey Hess2016-02-03
|
* annex.largefiles can be configured in .gitattributes tooGravatar Joey Hess2016-02-02
| | | | | This is particulary useful for v6 repositories, since the .gitattributes configuration will apply in all clones of the repository.
* matchexpression: New plumbing command to check if a preferred content ↵Gravatar Joey Hess2016-01-25
| | | | expression matches some data.
* remove 163 lines of code without changing anything except importsGravatar Joey Hess2016-01-20
|
* reorgGravatar Joey Hess2015-12-15
|
* avoid unnecessary reading of git-annex branch data when matching on ↵Gravatar Joey Hess2015-12-04
| | | | | | | annex.largefiles This makes git annex clean not look at the git-annex branch at all, and so speeds it up by 50% or more.
* Improve shutdown due to --time-limit, especially for fsckGravatar Joey Hess2015-07-31
| | | | | | | | | | | | | | | * Perform a clean shutdown when --time-limit is reached. This includes running queued git commands, and cleanup actions normally run when a command is finished. * fsck: Commit incremental fsck database when --time-limit is reached. Previously, some of the last files fscked did not make it into the database when using --time-limit. Note that this changes Annex.addCleanup hooks, to run after --time-limit expires. Fsck was using such a hook to clean up after a --incremental-schedule, and that shouldn't run when --time-limit exipires it. So, instead, moved that cleanup code to be run by cleanupIncremental. Resulted in some data type juggling.
* Added new "anything" preferred content expression, which matches all ↵Gravatar Joey Hess2015-06-16
| | | | versions of all files.
* refactorGravatar Joey Hess2015-04-30
|
* relFile does not have to be relative; rename to currFileGravatar Joey Hess2015-02-06
|
* update my email address and homepage urlGravatar Joey Hess2015-01-21
|
* add getFileSize, which can get the real size of a large file on WindowsGravatar Joey Hess2015-01-20
| | | | | | | | | | | | | | Avoid using fileSize which maxes out at just 2 gb on Windows. Instead, use hFileSize, which doesn't have a bounded size. Fixes support for files > 2 gb on Windows. Note that the InodeCache code only needs to compare a file size, so it doesn't matter it the file size wraps. So it has been left as-is. This was necessary both to avoid invalidating existing inode caches, and because the code passed FileStatus around and would have become more expensive if it called getFileSize. This commit was sponsored by Christian Dietrich.
* hlintGravatar Joey Hess2014-10-09
|
* fix some mixed space+tab indentationGravatar Joey Hess2014-10-09
| | | | | | | | | This fixes all instances of " \t" in the code base. Most common case seems to be after a "where" line; probably vim copied the two space layout of that line. Done as a background task while listening to episode 2 of the Type Theory podcast.
* 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.
* replace (Key, Backend) with KeyGravatar Joey Hess2014-04-17
| | | | | | | | | | Only fsck and reinject and the test suite used the Backend, and they can look it up as needed from the Key. This simplifies the code and also speeds it up. There is a small behavior change here. Before, all commands would warn when acting on an annexed file with an unknown backend. Now, only fsck and reinject show that warning.
* reorg matcher types; no non-type code changesGravatar Joey Hess2014-03-29
|
* Improve behavior when unable to parse a preferred content expression ↵Gravatar Joey Hess2014-03-20
| | | | | | | (thanks, ion). Fall back to "present" as the preferred conent expression, which will not result in any content movement.
* theoretical optimisation of --inGravatar Joey Hess2014-03-13
| | | | | Avoids looking up the remote each time, but in practice, does not result in a measurable speedup.
* --metadata field=value can now use globs to match, and matches case ↵Gravatar Joey Hess2014-02-21
| | | | | | insensatively, the same as git annex view field=value does. Also refactored glob code into its own module.
* limiting files based on metadataGravatar Joey Hess2014-02-13
| | | | | | Note that there is currently no caching, so --metadata foo=bar --metadata tag=blah will currently read the log 2x per file.
* more hlintGravatar Joey Hess2014-02-11
|
* --in can now refer to files that were located in a repository at some past ↵Gravatar Joey Hess2014-02-06
| | | | date. For example, --in="here@{yesterday}"
* Windows: Avoid using unix-compat's rename, which refuses to rename directories.Gravatar Joey Hess2014-01-29
| | | | Opened a bug about this: https://github.com/jystic/unix-compat/issues/10
* add "unused" preferred content expressionGravatar Joey Hess2014-01-22
| | | | | | | With a really nice optimisation that keeps it from having any overhead in normal operation! This commit was sponsored by Ulises Vitulli.
* benchmarked numcopies .gitattributes in preferred contentGravatar Joey Hess2014-01-21
| | | | | | | | | | | Checking .gitattributes adds a full minute to a git annex find looking for files that don't have enough copies. 2:25 increasts to 3:27. I feel this is too much of a slowdown to justify making it the default. So, exposed two versions of the preferred content expression, a slow one and a fast but approximate one. I'm using the approximate one in the default preferred content expressions to avoid slowing down the assistant.
* reorgGravatar Joey Hess2014-01-21
|
* reorganize numcopies code (no behavior changes)Gravatar Joey Hess2014-01-21
| | | | | | | Move stuff into Logs.NumCopies. Add a NumCopies newtype. Better names for various serialization classes that are specific to one thing or another.
* Add and use numcopiesneeded preferred content expression.Gravatar Joey Hess2014-01-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add numcopiesneeded preferred content expression. * Client, transfer, incremental backup, and archive repositories now want to get content that does not yet have enough copies. This means the asssistant will make copies of files that don't yet meet the configured numcopies, even to places that would not normally want the file. For example, if numcopies is 4, and there are 2 client repos and 2 transfer repos, and 2 removable backup drives, the file will be sent to both transfer repos in order to make 4 copies. Once a removable drive get a copy of the file, it will be dropped from one transfer repo or the other (but not both). Another example, numcopies is 3 and there is a client that has a backup removable drive and two small archive repos. Normally once one of the small archives has a file, it will not be put into the other one. But, to satisfy numcopies, the assistant will duplicate it into the other small archive too, if the backup repo is not available to receive the file. I notice that these examples are fairly unlikely setups .. the old behavior was not too bad, but it's nice to finally have it really correct. .. Almost. I have skipped checking the annex.numcopies .gitattributes out of fear it will be too slow. This commit was sponsored by Florian Schlegel.
* improve matcher data type to allow matching Keys, instead of just files (no ↵Gravatar Joey Hess2014-01-18
| | | | behavior changes)
* refactorGravatar Joey Hess2013-10-28
|
* update for Duration type changeGravatar Joey Hess2013-10-08
|
* squash compiler warnings on WindowsGravatar Joey Hess2013-08-04
|
* fix Android build, broken for 2 daysGravatar Joey Hess2013-05-26
|
* refactorGravatar Joey Hess2013-05-24
|
* fix permission damage (thanks, Windows)Gravatar Joey Hess2013-05-11
|
* git-annex now builds on Windows (doesn't work)Gravatar Joey Hess2013-05-11
|
* Avoid depending on regex-tdfa on mips, mipsel, and s390, where it fails to ↵Gravatar Joey Hess2013-05-06
| | | | build.
* per-IA-item content directoriesGravatar Joey Hess2013-04-25
|
* clean up urlrenderer handling when the webapp is not builtGravatar Joey Hess2013-04-03
|
* hlintGravatar Joey Hess2013-04-03
|