summaryrefslogtreecommitdiff
path: root/Types/MetaData.hs
Commit message (Collapse)AuthorAge
* metadata: Added --remove-all.Gravatar Joey Hess2017-09-28
| | | | | | | Motivation is to remove all metadata when it gets copied from a previous version of the file, and that is not deisrable. This commit was supported by the NSF-funded DataLad project.
* Added metadata --batch option, which allows getting, setting, deleting, and ↵Gravatar Joey Hess2016-07-27
| | | | modifying metadata for multiple files/keys.
* saner format for metadata --jsonGravatar Joey Hess2016-07-26
| | | | | | | | | | | | | metadata --json output format has changed, adding a inner json object named "fields" which contains only the fields and their values. This should be easier to parse than the old format, which mixed up metadata fields with other keys in the json object. Any consumers of the old format will need to be updated. This adds a dependency on unordered-containers for parsing MetaData from JSON, but it's a free dependency; aeson pulls in that library.
* minor typo fixes throughoutGravatar Yaroslav Halchenko2016-06-02
| | | | | problematic flexibility
* metadata: Added -r to remove all current values of a field.Gravatar Joey Hess2016-02-29
|
* 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
* fix test suite fail in LANG=CGravatar Joey Hess2015-08-12
| | | | | | | | | | | | This was caused by 88aeb849f620a13da47508045daae461a223c997 an Arbitrary String is not necessarily encoded using the filesystem encoding, and in a non-utf8 locale, encodeBS throws an exception on such a string. All I could think to do is limit test data to ascii. This shouldn't be a problem in practice, because the all Strings in git-annex that are not generated by Arbitrary should be loaded in a way that does apply the filesystem encoding.
* metadata: Fix encoding problem that led to mojibake when storing metadata ↵Gravatar Joey Hess2015-03-04
| | | | | | | | | | | | | | | | | | | | | | | | | strings that contained both unicode characters and a space (or '!') character. The fix is to stop using w82s, which does not properly reconstitute unicode strings. Instrad, use utf8 bytestring to get the [Word8] to base64. This passes unicode through perfectly, including any invalid filesystem encoded characters. Note that toB64 / fromB64 are also used for creds and cipher embedding. It would be unfortunate if this change broke those uses. For cipher embedding, note that ciphers can contain arbitrary bytes (should really be using ByteString.Char8 there). Testing indicated it's not safe to use the new fromB64 there; I think that characters were incorrectly combined. For credpair embedding, the username or password could contain unicode. Before, that unicode would fail to round-trip through the b64. So, I guess this is not going to break any embedded creds that worked before. This bug may have affected some creds before, and if so, this change will not fix old ones, but should fix new ones at least.
* update my email address and homepage urlGravatar Joey Hess2015-01-21
|
* 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.
* avoid generating arbitrary MetaData with illegal fieldsGravatar Joey Hess2014-03-26
|
* hilarious typoGravatar Joey Hess2014-03-18
|
* Each for each metadata field, there's now an automatically maintained ↵Gravatar Joey Hess2014-03-18
| | | | | | | | | | "$field-lastchanged" that gives the timestamp of the last change to that field. Note that this is a nearly entirely free feature. The data was already stored in the metadata log in an easily accessible way, and already was parsed to a time when parsing the log. The generation of the metadata fields may even be done lazily, although probably not entirely (the map has to be evaulated to when queried).
* pre-commit-annex hook script to automatically extract metadata from lots of ↵Gravatar Joey Hess2014-03-02
| | | | | | | | | | | | | | | | | | types of files Using the extract(1) program to do the heavy lifting. Decided to make git-annex run pre-commit-annex when committing. Since git-annex pre-commit also runs it, it'll be run when git commit is run too, via the pre-commit hook. This basically gives back the pre-commit hook that git-annex took away. The implementation avoids repeatedly looking for the hook script when the assistant is running and committing repeatedly; only checks if the hook is available once. To make the script simpler, made git-annex metadata -s field?=value only set a field when it's not already got a value. This commit was sponsored by bak.
* metadata: FIeld names are now case insensative.Gravatar Joey Hess2014-02-25
|
* metadata: Field names limited to alphanumerics and a few whitelisted ↵Gravatar Joey Hess2014-02-23
| | | | punctuation characters to avoid issues with views, etc.
* annex.genmetadata can be set to make git-annex automatically set metadata ↵Gravatar Joey Hess2014-02-23
| | | | (year and month) when adding files
* pre-commit: Update metadata when committing changes to annexed files within ↵Gravatar Joey Hess2014-02-19
| | | | | | | | | | | | | | | | | | | | a view. So the user can now switch to a view and then move files around within it to manage metadata. For example, moving a file into a new directory when in the tags=* view adds a tag to it. Implementation is fairly efficient. One diff-index, which is no more expensive than the first stage of a git commit, followed by possibly some cat-file --batch traffic to find the key (when deleting a file). Very similar to what's done in direct mode when committing. And like direct mode when updating the WC after a merge, it has to buffer the diff-tree values in order to make 2 passes over them. When not in a view, pre-commit now does one extra git symbolic-ref, which is tiny overhead. This commit was sponsored by Andrew Eskridge.
* add git annex view commandGravatar Joey Hess2014-02-18
| | | | | | | | | | | | | | | | | | (And a vpop command, which is still a bit buggy.) Still need to do vadd and vrm, though this also adds their documentation. Currently not very happy with the view log data serialization. I had to lose the TDFA regexps temporarily, so I can have Read/Show instances of View. I expect the view log format will change in some incompatable way later, probably adding last known refs for the parent branch to View or something like that. Anyway, it basically works, although it's a bit slow looking up the metadata. The actual git branch construction is about as fast as it can be using the current git plumbing. This commit was sponsored by Peter Hogg.
* add another quickcheck property, and several edge cases handledGravatar Joey Hess2014-02-16
|
* filter branches (incomplete)Gravatar Joey Hess2014-02-16
| | | | | | | | Promosing work toward metadata driven filter branches. A few methods to construct them are stubbed out; all the data types and pure code seems good. This commit was sponsored by Walter Somerville.
* 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.
* metacata command can now operate on many files at onceGravatar Joey Hess2014-02-13
|
* improve simplifierGravatar Joey Hess2014-02-12
|
* fix metadata log simplifier and additional quickcheck testsGravatar Joey Hess2014-02-12
|
* fix Ord instance for MetaValue to work like Eq instanceGravatar Joey Hess2014-02-12
|
* add metadata command to get/set metadataGravatar Joey Hess2014-02-12
| | | | | | | | | Adds metadata log, and command. Note that unsetting field values seems to currently be broken. And in general this has had all of 2 minutes worth of testing. This commit was sponsored by Julien Lefrique.
* data types and serialization for metadataGravatar Joey Hess2014-02-12
A very haskell commit! Just data types, instances to serialize the metadata to a nice format, and QuickCheck tests. This commit was sponsored by Andreas Leha.