summaryrefslogtreecommitdiff
path: root/Command/Drop.hs
Commit message (Collapse)AuthorAge
* Avoid repeated checking that files passed on the command line exist.Gravatar Joey Hess2017-10-16
| | | | | | | | | | | git annex add, git annex lock etc make multiple seek passes, and each seek pass checked that files existed. That was unncessary redundant work. Fixed by adding a new WorkTreeItem type, make seek actions use it, and check that the files exist when constructing it. This commit was supported by the NSF-funded DataLad project.
* support parsing options like --to=hereGravatar Joey Hess2017-05-31
| | | | | | | | Reworked remote name parsing to allow things like that. Command.Move uses it for --to=here, although there's not yet an implementation of that option. This commit was sponsored by Ignacio on Patreon.
* AssociatedFile newtypeGravatar Joey Hess2017-03-10
| | | | | | To prevent any further mistakes like 1a497cefb47557f0b4788c606f9071be422b2511 This commit was sponsored by Francois Marier on Patreon.
* 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/
* --branch, stage 2Gravatar Joey Hess2016-07-20
| | | | | | | | Show branch:file that is being operated on. I had to make ActionItem a type and not a type class because withKeyOptions' passed two different types of values when using the type class, and I could not get the type checker to accept that.
* drop: Add --batch and --json options.Gravatar Joey Hess2016-07-06
|
* remove 163 lines of code without changing anything except importsGravatar Joey Hess2016-01-20
|
* drop -JnGravatar Joey Hess2015-11-04
|
* also generate a drop safety proof for move --from remoteGravatar Joey Hess2015-10-09
|
* tests and verified that the bug is fixed, in all the cases I identifiedGravatar Joey Hess2015-10-09
|
* fix local dropping to not require extra locking of copies, but only that the ↵Gravatar Joey Hess2015-10-09
| | | | local copy be locked for removal
* verify local copy of content with lockingGravatar Joey Hess2015-10-09
|
* display drop safety proofs in debug modeGravatar Joey Hess2015-10-09
|
* improve drop proof codeGravatar Joey Hess2015-10-09
|
* support invalidating existing VerifiedCopysGravatar Joey Hess2015-10-08
|
* add VerifiedCopy data typeGravatar Joey Hess2015-10-08
| | | | | | | | | There should be no behavior changes in this commit, it just adds a more expressive data type and adjusts code that had been passing around a [UUID] or sometimes a Maybe Remote to instead use [VerifiedCopy]. Although, since some functions were taking two different [UUID] lists, there's some potential for me to have gotten it horribly wrong.
* add removeKey action to RemoteGravatar Joey Hess2015-10-08
| | | | | Not implemented for any remotes yet; probably the git remote is the only one that will ever implement it.
* add lockContentSharedGravatar Joey Hess2015-10-08
| | | | | | | | Also, rename lockContent to lockContentExclusive inAnnexSafe should perhaps be eliminated, and instead use `lockContentShared inAnnex`. However, I'm waiting on that, as there are only 2 call sites for inAnnexSafe and it's fiddly.
* Improve bash completion, so it completes names of remotes and backends in ↵Gravatar Joey Hess2015-09-14
| | | | | | | | | appropriate places. Not necessarily everywhere, but a lot of the most often used places. Re the use of .Internal, see https://github.com/pcapriotti/optparse-applicative/issues/155
* finished converting all the main optionsGravatar Joey Hess2015-07-10
|
* wipGravatar Joey Hess2015-07-09
| | | | | | | Current status: * building again, but several commands are commented out * still need to implement global options, file matching options, etc
* converted copy and moveGravatar Joey Hess2015-07-09
| | | | Got a little tricky..
* formattingGravatar Joey Hess2015-07-09
|
* finalOpt is the same as optionalGravatar Joey Hess2015-07-09
|
* wipGravatar Joey Hess2015-07-08
|
* convert all commands to work with optparse-applicativeGravatar Joey Hess2015-07-08
| | | | Still no options though.
* 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.
* drop: Now supports --all, --unused, and --key.Gravatar Joey Hess2015-05-12
|
* move nubbing into function whose algo needs a nubbed listGravatar Joey Hess2015-04-30
|
* refactorGravatar Joey Hess2015-04-30
|
* nub list after adding ocal uuid to itGravatar Joey Hess2015-04-30
| | | | | | This potentially fixes a numcopies counting bug when dropping --from a remote, and the local repository is trusted. The local repo would end up in the list twice, so it would verify one less copy than it was supposed to.
* --auto is no longer a global option; only get, drop, and copy accept it.Gravatar Joey Hess2015-03-25
| | | | Not a behavior change unless you were passing it to a command that ignored it.
* The file matching options are now only accepted by commands that can ↵Gravatar Joey Hess2015-02-06
| | | | actually use them.
* update my email address and homepage urlGravatar Joey Hess2015-01-21
|
* Fix wording of message displayed when unable to get a file that is available ↵Gravatar Joey Hess2015-01-16
| | | | in untrusted repositories.
* doh't use "def" for command definitions, it conflicts with Data.Default.defGravatar Joey Hess2014-10-14
|
* use types to enforce that removeAnnex can only be called inside lockContentGravatar Joey Hess2014-08-20
| | | | | | | | | | | This fixed one bug where it needed to be and wasn't (in Assistant.Unused). And also found one place where lockContent was used unnecessarily (by drop --from remote). A few other places like uninit probably don't really need to lockContent, but it doesn't hurt to do call it anyway. This commit was sponsored by David Wagner.
* replace (Key, Backend) with KeyGravatar Joey Hess2014-04-17
| | | | | | | | | | Only fsck and reinject and the test suite used the Backend, and they can look it up as needed from the Key. This simplifies the code and also speeds it up. There is a small behavior change here. Before, all commands would warn when acting on an annexed file with an unknown backend. Now, only fsck and reinject show that warning.
* drop --from: When local repository is untrusted, its copy of a file does not ↵Gravatar Joey Hess2014-04-17
| | | | count.
* 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.
* notifications on dropGravatar Joey Hess2014-03-22
|
* reorganize some files and importsGravatar Joey Hess2014-01-26
|
* refactorGravatar Joey Hess2014-01-26
|
* 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..
* reorgGravatar Joey Hess2014-01-21
|
* numcopies cleanup, part 2Gravatar Joey Hess2014-01-21
| | | | This includes several bug fixes.
* 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.
* global numcopies settingGravatar Joey Hess2014-01-20
| | | | | | | | | | | | | | | | | | | | | | | * numcopies: New command, sets global numcopies value that is seen by all clones of a repository. * The annex.numcopies git config setting is deprecated. Once the numcopies command is used to set the global number of copies, any annex.numcopies git configs will be ignored. * assistant: Make the prefs page set the global numcopies. This global numcopies setting is needed to let preferred content expressions operate on numcopies. It's also convenient, because typically if you want git-annex to preserve N copies of files in a repo, you want it to do that no matter which repo it's running in. Making it global avoids needing to warn the user about gotchas involving inconsistent annex.numcopies settings. (See changes to doc/numcopies.mdwn.) Added a new variety of git-annex branch log file, that holds only 1 value. Will probably be useful for other stuff later. This commit was sponsored by Nicolas Pouillard.
* fix inversion of control in CommandSeek (no behavior changes)Gravatar Joey Hess2014-01-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | I've been disliking how the command seek actions were written for some time, with their inversion of control and ugly workarounds. The last straw to fix it was sync --content, which didn't fit the Annex [CommandStart] interface well at all. I have not yet made it take advantage of the changed interface though. The crucial change, and probably why I didn't do it this way from the beginning, is to make each CommandStart action be run with exceptions caught, and if it fails, increment a failure counter in annex state. So I finally remove the very first code I wrote for git-annex, which was before I had exception handling in the Annex monad, and so ran outside that monad, passing state explicitly as it ran each CommandStart action. This was a real slog from 1 to 5 am. Test suite passes. Memory usage is lower than before, sometimes by a couple of megabytes, and remains constant, even when running in a large repo, and even when repeatedly failing and incrementing the error counter. So no accidental laziness space leaks. Wall clock speed is identical, even in large repos. This commit was sponsored by an anonymous bitcoiner.
* mirror: Support --all (and --unused).Gravatar Joey Hess2014-01-01
|