summaryrefslogtreecommitdiff
path: root/Command/Drop.hs
Commit message (Collapse)AuthorAge
* hlintGravatar Joey Hess2012-02-16
|
* rework git check-attr interfaceGravatar Joey Hess2012-02-13
| | | | | | | | | | | | | | | Now gitattributes are looked up, efficiently, in only the places that really need them, using the same approach used for cat-file. The old CheckAttr code seemed very fragile, in the way it streamed files through git check-attr. I actually found that cad8824852aa0623dc41eac02a9e2bae47d88ec4 was still deadlocking with ghc 7.4, at the end of adding a lot of files. This should fix that problem, and avoid future ones. The best part is that this removes withAttrFilesInGit and withNumCopies, which were complicated Seek methods, as well as simplfying the types for several other Seek methods that had a Backend tupled in.
* fsck --fromGravatar Joey Hess2012-01-19
| | | | | | | | | | | | | | | | Fscking a remote is now supported. It's done by retrieving the contents of the specified files from the remote, and checking them, so can be an expensive operation. (Several optimisations are possible, to speed it up, of course.. This is the slow and stupid remote fsck to start with.) Still, if the remote is a special remote, or a git repository that you cannot run fsck in locally, it's nice to have the ability to fsck it. If you have any directory special remotes, now would be a good time to fsck them, in case you were hit by the data loss bug fixed in the previous release!
* tweakGravatar Joey Hess2012-01-06
|
* look up --to and --from remote names only onceGravatar Joey Hess2012-01-06
| | | | This will speed up commands like move and drop.
* more command-specific optionsGravatar Joey Hess2012-01-06
| | | | | | | | | | | | | | | | | | | | | Made --from and --to command-specific options. Added generic storage for values of command-specific options, which allows removing some of the special case fields in AnnexState. (Also added generic storage for command-specific flags, although there are not yet any.) Note that this storage uses a Map, so repeatedly looking up the same value is slightly more expensive than looking up an AnnexState field. But, the value can be looked up once in the seek stage, transformed as necessary, and passed in a closure to the start stage, and this avoids that overhead. Still, I'm hesitant to use this for things like force or fast flags. It's probably best to reserve it for flags that are only used by a few commands, or options like --from and --to that it's important only be allowed to be used with commands that implement them, to avoid user confusion.
* type alias cleanupGravatar Joey Hess2011-12-31
|
* factor out a stopUnlessGravatar Joey Hess2011-12-09
| | | | code melt for lunch
* better limiting of start actions to only run whenAnnexedGravatar Joey Hess2011-11-10
| | | | | Mostly only refactoring, but this does remove one redundant stat of the symlink by copy.
* safer inannex checkingGravatar Joey Hess2011-11-09
| | | | | | | | git-annex-shell inannex now returns always 0, 1, or 100 (the last when it's unclear if content is currently in the index due to it currently being moved or dropped). (Actual locking code still not yet written.)
* reorg to allow taking content lockGravatar Joey Hess2011-11-09
| | | | | | | The lock will only persist during the perform stage, so the content must be removed from the annex then, rather than in the cleanup stage. (No lock is actually taken yet.)
* clean up check selection codeGravatar Joey Hess2011-10-29
| | | | | | | | | This new approach allows filtering out checks from the default set that are not appropriate for a command, rather than having to list every check that is appropriate. It also reduces some boilerplate. Haskell does not define Eq for functions, so I had to go a long way around with each check having a unique id. Meh.
* drop --from is now supported to remove file content from a remote.Gravatar Joey Hess2011-10-28
|
* cleanupGravatar Joey Hess2011-10-27
|
* Fail if --from or --to is passed to commands that do not support them.Gravatar Joey Hess2011-10-27
|
* refactored and generalized pre-command sanity checkingGravatar Joey Hess2011-10-27
|
* reorganize log modulesGravatar Joey Hess2011-10-15
| | | | no code changes
* renameGravatar Joey Hess2011-10-05
|
* renameGravatar Joey Hess2011-10-04
|
* factor out common importsGravatar Joey Hess2011-10-03
| | | | no code changes
* move annex.numcopies parsing into withNumCopiesGravatar Joey Hess2011-09-15
|
* clean up params in usage displayGravatar Joey Hess2011-09-15
|
* 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.
* better var nameGravatar Joey Hess2011-09-15
|
* simplifyGravatar Joey Hess2011-09-14
|
* refactorGravatar Joey Hess2011-09-14
|
* split groups of related functions out of UtilityGravatar Joey Hess2011-08-22
|
* 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.
* add web special remoteGravatar Joey Hess2011-07-01
| | | | | Generalized LocationLog to PresenceLog, and use a presence log to record urls for the web special remote.
* add whenM and unlessMGravatar Joey Hess2011-05-17
| | | | | Just more golfing.. I am pretty sure something in a library somewhere can do this, but I have been unable to find it.
* refactor some boilerplateGravatar Joey Hess2011-05-15
|
* avoid version check before running version and upgrade commandsGravatar Joey Hess2011-03-19
| | | | | There are two types of commands; those that access the repository and those that don't. Sorted.
* 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.
* got rid of Core moduleGravatar Joey Hess2011-01-16
| | | | Most of it was to do with managing annexed Content, so put there
* refactor in preparation for adding a git-annex-shell commandGravatar Joey Hess2010-12-30
|
* rename some stuff and prepare to break out more into Command/*Gravatar Joey Hess2010-12-30
|
* change name of numcopies attributeGravatar Joey Hess2010-11-28
|
* In .gitattributes, the git-annex-numcopies attribute can be used to control ↵Gravatar Joey Hess2010-11-28
| | | | the number of copies to retain of different types of files.
* finished hlintingGravatar Joey Hess2010-11-22
|
* refactor param seekingGravatar Joey Hess2010-11-11
|
* Annexed file contents are now made unwritable and put in unwriteable ↵Gravatar Joey Hess2010-11-08
| | | | directories, to avoid them accidentially being removed or modified. (Thanks Josh Triplett for the idea.)
* refactoring, no code changes reallyGravatar Joey Hess2010-11-08
|
* broke subcommands out into separate modulesGravatar Joey Hess2010-11-02