aboutsummaryrefslogtreecommitdiff
path: root/Logs/PreferredContent.hs
Commit message (Collapse)AuthorAge
* Limit annex.largefiles parsing to the subset of preferred content ↵Gravatar Joey Hess2016-02-03
| | | | | | expressions that make sense in its context. So, not "standard" or "lackingcopies", etc.
* simplifyGravatar Joey Hess2016-02-03
|
* remove 163 lines of code without changing anything except importsGravatar Joey Hess2016-01-20
|
* 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.
* oops, didn't mean to commit this debugGravatar Joey Hess2015-10-06
|
* analysisGravatar Joey Hess2015-10-06
|
* Fix bug in combination of preferred and required content settings. When one ↵Gravatar Joey Hess2015-09-15
| | | | | | | was set to the empty string and the other set to some expression, this bug caused all files to be wanted, instead of only files matching the expression. Avoid: MAny `MOr` otherexpression Which matches anything.
* add test case that all standard group preferred content expressions parseGravatar Joey Hess2015-06-17
|
* import Data.Default in CommonGravatar Joey Hess2015-01-28
|
* update my email address and homepage urlGravatar Joey Hess2015-01-21
|
* webapp: avoid overwriting remote configs when enabling itGravatar Joey Hess2014-05-30
| | | | | | | | | | | | | | | | | Avoid stomping on existing group and preferred content settings when enabling or combining with an already existing remote. Two level fix. First, use defaultStandardGroup rather than setStandardGroup, so if there is an existing configuration in the git-annex branch, it's not overwritten. To handle pre-existing ssh remotes (including gcrypt), a second level is needed, because before syncing with the remote, it's configuration won't be available locally. (And syncing could take a long time.) So, in this case, keep track of whether the remote is being created or enabled, and only set configs when creating it. This commit was sponsored by Anders Lannerback.
* Added required content configuration.Gravatar Joey Hess2014-03-29
| | | | | | | This includes checking when dropping files that any required content configuration is satisfied. However, it does not yet include an active check on the required content; the location log is trusted when checking the required content expression.
* 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.
* finish wiring up groupwantedGravatar Joey Hess2014-03-15
|
* vicfg: Allows editing preferred content expressions for groups.Gravatar Joey Hess2014-03-15
| | | | | This is stored in the git-annex branch, but not yet actually hooked up and used.
* "standard" can now be used as a first-class keyword in preferred content ↵Gravatar Joey Hess2014-03-14
| | | | | | | | | | | expressions. For example "standard or (include=otherdir/*)" or even "not standard" Note that the implementation avoids any potential for loops (if a standard preferred content expression itself mentioned standard). This commit was sponsored by Jochen Bartl.
* fix transfers of key with no associated fileGravatar Joey Hess2014-01-23
| | | | | | | | | | | | | | | | | Several places assumed this would not happen, and when the AssociatedFile was Nothing, did nothing. As part of this, preferred content checks pass the Key around. Note that checkMatcher is sometimes now called with Just Key and Just File. It currently constructs a FileMatcher, ignoring the Key. However, if it constructed a FileKeyMatcher, which contained both, then it might be possible to speed up parts of Limit, which currently call the somewhat expensive lookupFileKey to get the Key. I have not made this optimisation yet, because I am not sure if the key is always the same. Will need some significant checking to satisfy myself that's the case..
* added GETWANTED, SETWANTED for Tobias's flickr remoteGravatar Joey Hess2014-01-01
| | | | | | | | | | | | | | | This was unexpectedly difficult because of a depdenency cycle. To parse a preferred content expression involves several things that need to operate on the list of remotes. Which needs Remote.External. The only way to avoid this cycle (I tried breaking it at several points) was to skip parsing the expression in SETWANTED. That's sorta ok, because git-annex already has to deal with unparsable preferred content expressions being stored, in order to handle eg, upgrades. But I'm still not very happy that I cannot check it. I feel this is a strong indication that I need to beware of further bloating the special remote protocol interface.
* add PreferredContentExpression typeGravatar Joey Hess2014-01-01
|
* Another round of s/amoung/among/Gravatar Richard Hartmann2013-12-19
|
* refactorGravatar Joey Hess2013-10-28
|
* refactor git-annex branch log filename code into central locationGravatar Joey Hess2013-08-29
| | | | | | | Having one module that knows about all the filenames used on the branch allows working back from an arbitrary filename to enough information about it to implement dropping dead remotes and doing other log file compacting as part of a forget transition.
* per-IA-item content directoriesGravatar Joey Hess2013-04-25
|
* invalidated the wrong cache when setting preferred contentGravatar Joey Hess2013-03-31
|
* New annex.largefiles setting, which configures which files `git annex add` ↵Gravatar Joey Hess2013-03-29
| | | | | | | | | | | | | and the assistant add to the annex. I would have sort of liked to put this in .gitattributes, but it seems it does not support multi-word attribute values. Also, making this a single config setting makes it easy to only parse the expression once. A natural next step would be to make the assistant `git add` files that are not annex.largefiles. OTOH, I don't think `git annex add` should `git add` such files, because git-annex command line tools are not in the business of wrapping git command line tools.
* whitespace fixesGravatar Joey Hess2012-12-13
|
* --auto fixesGravatar Joey Hess2012-12-06
| | | | | | | * get/copy --auto: Transfer data even if it would exceed numcopies, when preferred content settings want it. * drop --auto: Fix dropping content when there are no preferred content settings.
* where indentingGravatar Joey Hess2012-11-11
|
* add ConfigMonitor threadGravatar Joey Hess2012-10-20
| | | | | | | | | | | | | | | | | | | | Monitors git-annex branch for changes, which are noticed by the Merger thread whenever the branch ref is changed (either due to an incoming push, or a local change), and refreshes cached config values for modified config files. Rate limited to run no more often than once per minute. This is important because frequent git-annex branch changes happen when files are being added, or transferred, etc. A primary use case is that, when preferred content changes are made, and get pushed to remotes, the remotes start honoring those settings. Other use cases include propigating repository description and trust changes to remotes, and learning when a remote has added a new special remote, so the webapp can present the GUI to enable that special remote locally. Also added a uuid.log cache. All other config files already had caches.
* Replace "in=" with "present" in preferred content expressionsGravatar Joey Hess2012-10-19
| | | | | | | | | | | | in= was problimatic in two ways. First, it referred to a remote by name, but preferred content expressions can be evaluated elsewhere, where that remote doesn't exist, or a different remote has the same name. This name lookup code could error out at runtime. Secondly, in= seemed pretty useless. in=here did not cause content to be gotten, but it did let present content be dropped. present is more useful, although "not present" is unstable and should be avoided.
* Preferred content path matching bugfix.Gravatar Joey Hess2012-10-17
| | | | | | | When in a subdir, both the normal filepath, and the filepath relative to the top of the git repo are needed for matching. The former for key lookup, and the latter for include/exclude to match against. Previously, key lookup didn't work in this situation.
* avoid duplicate code with a more generic monadic matcherGravatar Joey Hess2012-10-13
| | | | | Interesting type signature ghc derived for this: forall o (m :: * -> *). Monad m => Matcher o -> (o -> m Bool) -> m Bool
* ui for selecting a repository groupGravatar Joey Hess2012-10-10
|
* add standard group selector to repo edit formGravatar Joey Hess2012-10-10
|
* webapp: configure new repos to use the standard preferred content settingsGravatar Joey Hess2012-10-10
|
* webapp: put new repos in standard groupsGravatar Joey Hess2012-10-10
| | | | | | | I'm using transfer for most things, both removable drives and cloud storage, because it's the safest choice. We'll see if it makes sense to prompt for the group when setting this up, or let the user pick something else after the fact.
* refactorGravatar Joey Hess2012-10-10
|
* standard preferred content settings for client, transfer, backup, and ↵Gravatar Joey Hess2012-10-10
| | | | | | | | archive repositories I've designed these to work well together, I hope. If I get it wrong, I can just change the code in one place, since these expressions won't be stored in the git-annex branch.
* rename --ingroup to --inallgroupGravatar Joey Hess2012-10-10
|
* add --ingroup limitGravatar Joey Hess2012-10-08
|
* Added --smallerthan and --largerthan limitsGravatar Joey Hess2012-10-08
|
* wired preferred content up to get, copy, and drop --autoGravatar Joey Hess2012-10-08
|
* add AssumeNotPresent parameter to limitsGravatar Joey Hess2012-10-05
| | | | | | | | | | | | | Solves the issue with preferred content expressions and dropping that I mentioned yesterday. My solution was to add a parameter to specify a set of repositories where content should be assumed not to be present. When deciding whether to drop, it can put the current repository in, and then if the expression fails to match, the content can be dropped. Using yesterday's example "(not copies=trusted:2) and (not in=usbdrive)", when the local repo is one of the 2 trusted copies, the drop check will see only 1 trusted copy, so the expression matches, and so the content will not be dropped.
* added preferred-content log, and allow editing it with vicfgGravatar Joey Hess2012-10-04
This includes a full parser for the boolean expressions in the log, that compiles them into Matchers. Those matchers are not used yet. A complication is that matching against an expression should never crash git-annex with an error. Instead, vicfg checks that the expressions parse. If a bad expression (or an expression understood by some future git-annex version) gets into the log, it'll be ignored. Most of the code in Limit couldn't fail anyway, but I did have to make limitCopies check its parameter first, and return an error if it's bad, rather than erroring at runtime.