summaryrefslogtreecommitdiff
path: root/Annex.hs
Commit message (Collapse)AuthorAge
* factor out common importsGravatar Joey Hess2011-10-03
| | | | no code changes
* refactor catfile codeGravatar Joey Hess2011-09-28
| | | | split into generic IO code, and a thin Annex wrapper
* rework annex-ignore handlingGravatar Joey Hess2011-09-18
| | | | | | | | Only one place need to filter the list of remotes for ignored remotes: keyPossibilities. Make the full list available to everything else. This allows getting rid of the special case handing for --from and --to to make ignored remotes not be ignored with those options.
* refactor --exclude to use Utility.MatcherGravatar Joey Hess2011-09-18
| | | | | This should change no behavior, but opens the poissibility to use the matcher for other sorts of limits on which files git-annex processes.
* remove optimize subcommand; use --auto insteadGravatar Joey Hess2011-09-15
| | | | | | | | | | | | | | | | | | get, drop: Added --auto option, which decides whether to get/drop content as needed to work toward the configured numcopies. The problem with bundling it up in optimize was that I then found I wanted to run an optmize that did not drop files, only got them. Considered adding a --only-get switch to it, but that seemed wrong. Instead, let's make existing subcommands optionally smarter. Note that the only actual difference between drop and drop --auto is that the latter does not even try to drop a file if it knows of not enough copies, and does not print any error messages about files it was unable to drop. It might be nice to make get avoid asking git for attributes when not in auto mode. For now it always asks for attributes.
* basic json supportGravatar Joey Hess2011-09-01
| | | | | | | | | | | | | | | | | | This includes a generic JSONStream library built on top of Text.JSON (somewhat hackishly). It would be possible to stream out a single json document describing all actions, but it's probably better for consumers if they can expect one json document per line, so I did it that way instead. Output from external programs used for transferring files is not currently hidden when outputting json, which probably makes it not very useful there. This may be dealt with if there is demand for json output for --get or --move to be parsable. The version, status, and find subcommands have hand-crafted output and don't do json. The whereis subcommand needs to be modified to produce useful json.
* generalize quiet flag to output typeGravatar Joey Hess2011-09-01
| | | | This will allow adding other styles of output.
* code simplification thanks to applicative functorsGravatar Joey Hess2011-08-25
|
* avoid the functorGravatar Joey Hess2011-08-21
| | | | fmap = liftM
* drop an unnecessart liftIOGravatar Joey Hess2011-08-19
| | | | the liftM on its own can lift all the way into IO.
* make Annex an opaque data typeGravatar Joey Hess2011-08-19
| | | | | | | | | Was a type alias; using newtype has the benefit that type errors will show "Annex foo" rather than two lines of internal type nonsense. Yay! There should be no other effects to size or runtime. I've tried to do this at least twice before (each time I read RWH chapter 10); finally understood how to this time.. sorta.
* remove unused backend machineryGravatar Joey Hess2011-07-05
| | | | | | | | | | | | | The only remaining vestiage of backends is different types of keys. These are still called "backends", mostly to avoid needing to change user interface and configuration. But everything to do with storing keys in different backends was gone; instead different types of remotes are used. In the refactoring, lots of code was moved out of odd corners like Backend.File, to closer to where it's used, like Command.Drop and Command.Fsck. Quite a lot of dead code was removed. Several data structures became simpler, which may result in better runtime efficiency. There should be no user-visible changes.
* rename GitQueue to Git.QueueGravatar Joey Hess2011-06-30
|
* renamed GitRepo to GitGravatar Joey Hess2011-06-30
| | | | It was always imported qualified as Git anyway
* cache the trustmapGravatar Joey Hess2011-06-23
| | | | Doubles the speed of fsck, and speeds up drop as well.
* Branch handling improvementsGravatar Joey Hess2011-06-22
| | | | | | | | Support creating the branch. Unified branch state into a single data type. Only commit changes when the index has been changed.
* add a small cache of the most recently accessed item from the git-annex branchGravatar Joey Hess2011-06-22
| | | | | | | | | | | This will speed up typical cases like git-annex get, which currently has to read the location log once, then read it a second time in order to add a line to it. Since these reads now involve more than just reading in a file, it seemed good to add a cache layer. Only the most recent thing needs to be cached, because git-annex has good locality; it operates on one file at a time, and only cares about one item from the branch per file.
* code to update a git-annex branchGravatar Joey Hess2011-06-21
| | | | | | | | | | | | | | | There is no suitable git hook to run code when pulling changes that might need to be merged into the git-annex branch. The post-merge hook is only run when changes are merged into HEAD, and it's possible, and indeed likely that many pulls will only have changes in git-annex, but not in HEAD, and not trigger it. So, git-annex will have to take care to update the branch before reading from it, to make sure it has merged in current info from remotes. Happily, this can be done quite inexpensively, just a git-show-ref to list branches, and a minimalized git-log to see if there are unmerged changes on the branches. To further speed up, it will be done only once per git-annex run, max.
* pointless golfingGravatar Joey Hess2011-06-20
|
* rename modules for data types into Types/ directoryGravatar Joey Hess2011-06-01
|
* better types allowed breaking module dep loopGravatar Joey Hess2011-06-01
|
* Add --trust, --untrust, and --semitrust options.Gravatar Joey Hess2011-06-01
|
* Add --numcopies option.Gravatar Joey Hess2011-06-01
|
* --backend now overrides any backend configured in .gitattributes files.Gravatar Joey Hess2011-05-18
|
* more monadic operator useGravatar Joey Hess2011-05-15
|
* Control.Monad.State import fix for debian stableGravatar Joey Hess2011-04-26
| | | | | It doesn't export `state` there, so hiding it fails. Just list explicitly what we use.
* ghc7Gravatar Joey Hess2011-04-21
| | | | | | | | | * Update Debian build dependencies for ghc 7. * Debian package is now built with S3 support. Thanks Joachim Breitner for making this possible, also thanks Greg Heartsfield for working to improve the hS3 library for git-annex. Also hid a conflicting new symbol from Control.Monad.State
* add cipher field to AnnexStateGravatar Joey Hess2011-04-16
|
* Periodically flush git command queue, to avoid boating memory usage too much.Gravatar Joey Hess2011-04-07
| | | | | | | Since the queue is flushed in between subcommand actions being run, there should be no issues with actions that expect to queue up some stuff and have it run after they do other stuff. So I didn't have to audit for such assumptions.
* some reorg and further remote generalizationGravatar Joey Hess2011-03-27
|
* add remotes slot to AnnexGravatar Joey Hess2011-03-27
| | | | This required parameterizing the type for Remote, to avoid a cycle.
* fast modeGravatar Joey Hess2011-03-22
| | | | | | | | | | Add --fast flag, that can enable less expensive, but also less thurough versions of some commands. * Add --fast flag, that can enable less expensive, but also less thurough versions of some commands. * fsck: In fast mode, avoid checking checksums. * unused: In fast mode, just show all existing temp files as unused, and avoid expensive scan for other unused content.
* use queue when upgrading, flushing every so oftenGravatar Joey Hess2011-03-16
| | | | | | | | | | | | | | | | | Added a cheap way to query the size of a queue. runQueueAt is not the default yet only because there may be some code that expects to be able to queue some suff, do something else, and run the whole queue at the end. 10240 is an arbitrary size for the queue. If we assume annexed filenames are between 10 and 255 characters long, then the queue will build up between 100kb and 2550kb long commands. The max command line length on linux is somewhere above 20k, so this is a fairly good balance -- the queue will buffer only a few megabytes of stuff and a minimal number of commands will be run by xargs. Also, insert queue items strictly, this should save memory.
* rename fileGravatar Joey Hess2011-03-15
|
* move repoConfig out of RemotesGravatar Joey Hess2011-03-05
|
* renameGravatar Joey Hess2011-02-28
|
* use ShellParam typeGravatar Joey Hess2011-02-28
| | | | | So, I have a type checked safe handling of filenames starting with dashes, throughout the code.
* hello, liftMGravatar Joey Hess2011-02-19
|
* rename TypeInternals to BackendTypesGravatar Joey Hess2011-01-26
| | | | Now that it only contains types used by the backends
* rework config storageGravatar Joey Hess2011-01-26
| | | | | | | Moved away from a map of flags to storing config directly in the AnnexState structure. Got rid of most accessor functions in Annex. This allowed supporting multiple --exclude flags.
* successfully split Annex and AnnexState out of TypeInternalsGravatar Joey Hess2011-01-25
|
* parameterize Backend typeGravatar Joey Hess2011-01-25
| | | | | This allows the Backend type to not depend on the Annex type, and so the Annex type can later be moved out of TypeInternals.
* better typesGravatar Joey Hess2011-01-11
|
* use git-annex-shell configlistGravatar Joey Hess2010-12-31
|
* rename some stuff and prepare to break out more into Command/*Gravatar Joey Hess2010-12-30
|
* add queueRunGravatar Joey Hess2010-11-08
|
* Add annex.version, which will be used to automate upgrades.Gravatar Joey Hess2010-11-08
|
* hlinted a few filesGravatar Joey Hess2010-11-06
|
* finished adding support for annex.ssh-optionsGravatar Joey Hess2010-11-01
|
* simplify evalsGravatar Joey Hess2010-10-31
|