aboutsummaryrefslogtreecommitdiff
path: root/Command/Info.hs
Commit message (Collapse)AuthorAge
* add --json-error-messages (not yet implemented)Gravatar Joey Hess2018-02-19
| | | | | | | | | | Added --json-error-messages option, which includes error messages in the json output, rather than outputting them to stderr. The actual rediretion of errors is not implemented yet, this is only the docs and option plumbing. This commit was supported by the NSF-funded DataLad project.
* 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.
* 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.
* info: Support being passed a treeish, and show info about the annexed files ↵Gravatar Joey Hess2016-09-15
| | | | in it similar to how a directory is handled.
* 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/
* info: When run on a file now includes an indication of whether the content ↵Gravatar Joey Hess2016-07-30
| | | | is present locally.
* Removed dependency on json library; all JSON is now handled by aeson.Gravatar Joey Hess2016-07-26
| | | | | I've eyeballed all --json commands, and the only difference should be that some fields are re-ordered.
* allow using Aeson for streaming JSON outputGravatar Joey Hess2016-07-26
| | | | | | | Keeping Text.JSON use for now, because it seems a better fit for most of the commands, which don't use very structured JSON objects, but just output whatever fields suites them. But this lets Aeson be used when a more structured data type is available to serialize to JSON.
* info: Mention when run in a dead repository.Gravatar Joey Hess2016-02-19
|
* remove 163 lines of code without changing anything except importsGravatar Joey Hess2016-01-20
|
* remove excess spaceGravatar Joey Hess2016-01-20
|
* info: Support --batch mode.Gravatar Joey Hess2016-01-15
|
* whereis --json: Urls are now listed inside the remote that claims them, ↵Gravatar Joey Hess2016-01-15
| | | | rather than all together at the end.
* info --json: Improve json for "backend usage", using a nested object with ↵Gravatar Joey Hess2016-01-01
| | | | fields for each backend instead of the previous weird nested lists. This may break existing parsers of this json output, if there were any.
* info: Fix "backend usage" numbers, which were counting present keys twice.Gravatar Joey Hess2016-01-01
| | | | Let's just count the referenced keys for that, and not present keys at all.
* enableremote: List uuids and descriptions of remotes that can be enabled, ↵Gravatar Joey Hess2015-10-26
| | | | and accept either the uuid or the description in leu if the name.
* info: Don't allow use in a non-git-annex repository, since it uses the ↵Gravatar Joey Hess2015-09-16
| | | | | | | git-annex branch and would create it if it were missing. I made the change to allow in 2014 without any rationalle or associated request that I can find.
* info: Support querying info of individual files in direct mode.Gravatar Joey Hess2015-09-09
|
* converted InfoGravatar Joey Hess2015-07-11
|
* wipGravatar Joey Hess2015-07-09
|
* convert all commands to work with optparse-applicativeGravatar Joey Hess2015-07-08
| | | | Still no options though.
* display cmdparamdesc in optparse-applicative usage messagesGravatar Joey Hess2015-07-08
| | | | | Since optparse-applicative display "FOO" as "[FOO]", the paramOptional modifier which wrapped it in square brackets was removed from most places.
* started converting to use optparse-applicativeGravatar Joey Hess2015-07-08
| | | | | | | | | | | | This is a work in progress. It compiles and is able to do basic command dispatch, including git autocorrection, while using optparse-applicative for the core commandline parsing. * Many commands are temporarily disabled before conversion. * Options are not wired in yet. * cmdnorepo actions don't work yet. Also, removed the [Command] list, which was only used in one place.
* Increased the default annex.bloomaccuracy from 1000 to 10000000Gravatar Joey Hess2015-06-16
| | | | | | | | | | | | | | | | | | | This makes git annex unused use around 48 mb more memory than it did before, but the massive increase in accuracy makes this worthwhile for all but the smallest systems. Also, I want to use the bloom filter for sync --all --content, to avoid dropping files that the preferred content doesn't want, and 1/1000 false positives would be far too many in that use case, even if it were acceptable for unused. Actual memory use numbers: 1000: 21.06user 3.42system 0:26.40elapsed 92%CPU (0avgtext+0avgdata 501552maxresident)k 1000000: 21.41user 3.55system 0:26.84elapsed 93%CPU (0avgtext+0avgdata 549496maxresident)k 10000000: 21.84user 3.52system 0:27.89elapsed 90%CPU (0avgtext+0avgdata 549920maxresident)k Based on these numbers, 10 million seemed a better pick than 1 million.
* info: Added json output for "backend usage", "numcopies stats", ↵Gravatar Joey Hess2015-06-16
| | | | "repositories containing these files", and "transfers in progress".
* refactorGravatar Joey Hess2015-04-30
|
* info: Added --bytes option.Gravatar Joey Hess2015-04-12
|
* info dir: Added information about repositories that contain files in the ↵Gravatar Joey Hess2015-04-12
| | | | | | | | | | | specified directory. This is a nearly free feature; it piggybacks on the location log lookups done for the numcopies stats. So, the only extra overhead is updating the map of repository sizes. However, I had to switch to Data.Map.Strict, which needs containers 0.5. If backporting to wheezy, will probably need to revert this commit.
* info: Display repository mode: bare when in a bare (non-direct mode) repo.Gravatar Joey Hess2015-04-09
|
* info remove: show trust levelGravatar Joey Hess2015-04-05
|
* The file matching options are now only accepted by commands that can ↵Gravatar Joey Hess2015-02-06
| | | | actually use them.
* remove debug printGravatar Joey Hess2015-01-23
|
* 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.
* implemented old Richih wishlist about remote/uuid infoGravatar Joey Hess2015-01-13
| | | | | | | | * info: Can now display info about a given uuid. * Added to remote/uuid info: Count of the number of keys present on the remote, and their size. This is rather expensive to calculate, so comes last and --fast will disable it. * Git remote info now includes the date of the last sync with the remote.
* info: avoid strange display of here repo when it has NoUUIDGravatar Joey Hess2014-10-28
| | | | This happens when info is run in a git repo before git annex init.
* add per-remote-type infoGravatar Joey Hess2014-10-21
| | | | | | | | | | Now `git annex info $remote` shows info specific to the type of the remote, for example, it shows the rsync url. Remote types that support encryption or chunking also include that in their info. This commit was sponsored by Ævar Arnfjörð Bjarmason.
* info: When passed the name or uuid of a remote, displays info about that remote.Gravatar Joey Hess2014-10-21
| | | | | | No per-remote-type info yet. This commit was sponsored by Stanley Yamane.
* info: When run on a single annexed file, displays some info about the file, ↵Gravatar Joey Hess2014-10-21
| | | | including its key and size.
* doh't use "def" for command definitions, it conflicts with Data.Default.defGravatar Joey Hess2014-10-14
|
* 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.
* info: Allow use in a repository where annex.uuid is not set.Gravatar Joey Hess2014-04-15
|
* Fix direct mode getKeysPresent false positive & also sped up direct mode ↵Gravatar Joey Hess2014-03-07
| | | | | | | | | unused and unannex unused: In direct mode, files that are deleted from the work tree are no longer incorrectly detected as unused. Direct mode `git annex info` slows down a bit due to more stringent checking, but not by a lot.
* 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.
* 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
* reorganize some files and importsGravatar Joey Hess2014-01-26
|
* 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.