summaryrefslogtreecommitdiff
path: root/Command/Move.hs
Commit message (Collapse)AuthorAge
* hlintGravatar Joey Hess2012-06-12
|
* added ifM and nuked 11 lines of codeGravatar Joey Hess2012-03-14
| | | | no behavior changes
* move --from, copy --from: 10 times faster scanning remote on local diskGravatar Joey Hess2012-02-26
| | | | | | | | | | | | | | | | | | | Rather than go through the location log to see which files are present on the remote, it simply looks at the disk contents directly. I benchmarked this speeding up scanning 834 files, from an annex on my phone's SSD, from 11.39 seconds to 1.31 seconds. (No files actually moved.) Also benchmarked 8139 files, from an annex on spinning storage, speeding up from 103.17 to 13.39 seconds. Note that benchmarking with an encrypted annex on flash actually showed a minor slowdown with this optimisation -- from 13.93 to 14.50 seconds. Seems the overhead of doing the crypto needed to get the filenames to directly check can be higher than the overhead of looking up data in the location log. (Which says good things about how well the location log and git have been optimised!) It *may* make sense to make encrypted local remotes not have hasKeyCheap set; further benchmarking is called for.
* fsck --from remote --fastGravatar Joey Hess2012-01-20
| | | | | | | Avoids expensive file transfers, at the expense of checking file size and/or contents. Required some reworking of the remote code.
* add tmp flag parameter to retrieveKeyFileGravatar Joey Hess2012-01-19
|
* 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
|
* inverted logicGravatar Joey Hess2011-12-09
|
* factor out a stopUnlessGravatar Joey Hess2011-12-09
| | | | code melt for lunch
* comment updateGravatar Joey Hess2011-11-20
|
* avoid error message when doing get --from on file not present on remoteGravatar Joey Hess2011-11-18
|
* lintGravatar Joey Hess2011-11-11
|
* 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.
* tweakGravatar Joey Hess2011-11-10
|
* Optimized copy --from and get --from to avoid checking the location log for ↵Gravatar Joey Hess2011-11-10
| | | | | | | files that are already present. This can be a significant speedup when running in large trees that are only missing a few files; it makes copy --from just as fast as get.
* 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
|
* refactored and generalized pre-command sanity checkingGravatar Joey Hess2011-10-27
|
* break out non-log stuff to separate moduleGravatar Joey Hess2011-10-15
|
* reorganize log modulesGravatar Joey Hess2011-10-15
| | | | no code changes
* minor syntax changesGravatar Joey Hess2011-10-11
|
* renameGravatar Joey Hess2011-10-05
|
* renameGravatar Joey Hess2011-10-04
|
* factor out common importsGravatar Joey Hess2011-10-03
| | | | no code changes
* remove command type definitionsGravatar Joey Hess2011-09-15
| | | | | | | These were a mistake, they make the type signatures harder to read and less flexible. The CommandSeek, CommandStart, CommandPerform, and CommandCleanup types were a good idea, but composing them with the parameters expected is going too far.
* add error for move --autoGravatar Joey Hess2011-09-15
| | | | | | | | | | | | | | | It probably does not make sense to enable auto mode for move. I cannot think of a situation where it would make sense to try to use it. A hypothetical auto mode for move would only differ from a normal move in one case -- when both repositories have a file, move deletes it from one, and this reduces the number of copies. So an auto mode would either only let move work in that situation, or avoid removing the file in that situation, depending on the number of copies. This would be complex to implement, and is perhaps not a very obvious behavior. The error is a good thing to have, so users don't expect it to do something it does not.
* clean up params in usage displayGravatar Joey Hess2011-09-15
|
* unify elipsis handlingGravatar Joey Hess2011-07-19
| | | | | And add a simple dots-based progress display, currently only used in v2 upgrade.
* finished hlint passGravatar Joey Hess2011-07-15
|
* 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.
* avoid unnecessary read of trust.logGravatar Joey Hess2011-06-23
|
* improve bare repo handingGravatar Joey Hess2011-06-22
| | | | | Many more commands can work in bare repos now, thanks to the git-annex branch.
* better types allowed breaking module dep loopGravatar Joey Hess2011-06-01
|
* Add --trust, --untrust, and --semitrust options.Gravatar Joey Hess2011-06-01
|
* add a message in potenatially confusing copy --fast failure situationGravatar Joey Hess2011-05-16
|
* refactor some boilerplateGravatar Joey Hess2011-05-15
|
* Avoid using absolute paths when staging location log, as that can confuse ↵Gravatar Joey Hess2011-04-25
| | | | | | | | | | | git when a remote's path contains a symlink. Closes: #621386 This was a real PITA to fix, since location logs can be staged in both the current repo, as well as in local remote's repos, in which case the cwd will not be in the repo. And git add needs different params in both cases, when absolute paths are not used. In passing, git annex fsck now stages location log fixes.
* 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.
* Bugfix: copy --to --fast never really copied, fixed.Gravatar Joey Hess2011-04-01
|
* Provide a less expensive version of `git annex copy --to`, enabled via ↵Gravatar Joey Hess2011-03-27
| | | | --fast. This assumes that location tracking information is correct, rather than contacting the remote for every file.
* converted move to use RemoteGravatar Joey Hess2011-03-27
| | | | Drop old Remotes.hs, now unused!
* 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.
* test suite passes againGravatar Joey Hess2011-03-15
| | | | doesn't test remote functionality.. but that may be working too now
* first pass at using new keysGravatar Joey Hess2011-03-15
| | | | | | | It compiles. It sorta works. Several subcommands are FIXME marked and broken, because things that used to accept separate --backend and --key params need to be changed to accept just a --key that encodes all the key info, now that there is metadata in keys.
* avoid logging to location log when in a bare repoGravatar Joey Hess2011-03-03
| | | | | | | | | | | | | | This assumes that changes to content in bare repos are made from some non-bare repo, and that the location log is updated on that side. That's true for move --from and move --to. It's *not* true for dropkey and setkey and recvkey. But those are plumbing level commands, so I guess it's ok to assume that someone running those in a bare repo knows what they're doing. And git-annex-shell is used to run those, and if the bare repo is non-local, it needs to be able to use them even though they cannot update the location log. So this seems unavoidable.