summaryrefslogtreecommitdiff
path: root/Command
Commit message (Collapse)AuthorAge
* improve commentGravatar Joey Hess2016-11-16
|
* fsck --all --from was checking the content of files in the local repository, ↵Gravatar Joey Hess2016-11-16
| | | | | | | | rather than on the special remote. Straight up forgot to handle this case! This commit was sponsored by Fernando Jimenez on Patreon.
* Avoid backtraces on expected failures when built with ghc 8; only use ↵Gravatar Joey Hess2016-11-15
| | | | | | | | | | | | | backtraces for unexpected errors. ghc 8 added backtraces on uncaught errors. This is great, but git-annex was using error in many places for a error message targeted at the user, in some known problem case. A backtrace only confuses such a message, so omit it. Notably, commands like git annex drop that failed due to eg, numcopies, used to use error, so had a backtrace. This commit was sponsored by Ethan Aubin.
* sync: Pass --allow-unrelated-histories to git merge when used with git git ↵Gravatar Joey Hess2016-11-15
| | | | | | | | | | | | 2.9.0 or newer. This makes merging a remote into a freshly created direct mode repository work the same as it works in indirect mode. The git-annex branches would get merged in any case by a sync, since that doesn't use git merge. This might need to be revisited later to better mirror git's behavior.
* reinject --known: Avoid second, unncessary checksum of file.Gravatar Joey Hess2016-11-07
|
* enable forwardRetry for command-line transfersGravatar Joey Hess2016-10-26
| | | | | | | | | | | | | | | | | If a transfer fails for some reason, but some data managed to be sent, the transfer will be retried. (The assistant already did this.) Possible impacts: * More ssh prompts if ssh needs to prompt for a password to connect to a host, or is prompting about some other problem like a ssh key mismatch. * More data transfer due to retrying, epecially when a remote does not support resuming a transfer. In the worst case, a lot of data will be transferred but it fails before the end, and then all that data gets transferred again plus one byte more; repeat until it manages to get the whole file.
* importfeed: Drop URL parameters from file extension.Gravatar Joey Hess2016-10-17
| | | | Thanks, James MacMahon.
* upgrade: Handle upgrade to v6 when the repository already contains v6 ↵Gravatar Joey Hess2016-10-17
| | | | | | | | | | | | | unlocked files whose content is already present. Closes https://github.com/datalad/datalad/issues/1020 The use of runWriter in scanUnlockedFiles broke due to this change; it failed with blocked indefinitely in mvar, because the database write handle was taken while linkFromAnnex needed to also write to it (to update the inode cache). So, switched to using a separate runWriter for each call to addAssociatedFileFast. A little less efficient, but not greatly; the writes should all still be cached.
* lock: Fix edge cases where data loss could occur in v6 mode.Gravatar Joey Hess2016-10-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the case where the pointer file is in place, and not the content of the object, lock's performNew was called with filemodified=True, which caused it to try to repopulate the object from an unmodified associated file, of which there were none. So, the content of the object got thrown away incorrectly. This was the cause (although not the root cause) of data loss in https://github.com/datalad/datalad/issues/1020 The same problem could also occur when the work tree file is modified, but the object is not, and lock is called with --force. Added a test case for this, since it's excercising the same code path and is easier to set up than the problem above. Note that this only occurred when the keys database did not have an inode cache recorded for the annex object. Normally, the annex object would be in there, but there are of course circumstances where the inode cache is out of sync with reality, since it's only a cache. Fixed by checking if the object is unmodified; if so we don't need to try to repopulate it. This does add an additional checksum to the unlock path, but it's already checksumming the worktree file in another case, so it doesn't slow it down overall. Further investigation found a similar problem occurred when smudge --clean is called on a file and the inode cache is not populated. cleanOldKeys deleted the unmodified old object file in this case. This was also fixed by checking if the object is unmodified. In general, use of getInodeCaches and sameInodeCache is potentially dangerous if the inode cache has not gotten populated for some reason. Better to use isUnmodified. I breifly auited other places that check the inode cache, and did not see any immediate problems, but it would be easy to miss this kind of problem.
* When auto-upgrading a v3 remote, avoid upgrading to version 6, instead keep ↵Gravatar Joey Hess2016-10-05
| | | | | | | | | | it at version 5. Fixes a bug introduced with v6 mode that I didn't notice until now. Probably not many v3 repos left out there, and upgrading them to v6 mode is not disastrous, only a little premature. This commit was sponsored by Riku Voipio
* convert TMVars that are never left empty into TVarsGravatar Joey Hess2016-09-30
| | | | | This is probably more efficient, and it avoids mistakenly leaving them empty.
* addurl, importfeed: Improve behavior when file being added is gitignored.Gravatar Joey Hess2016-09-21
|
* fix bugs in handing of deep branches with sync and adjusted branchesGravatar Joey Hess2016-09-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * sync: Previously, when run in a branch with a slash in its name, such as "foo/bar", the sync branch was "synced/bar". That conflicted with the sync branch used for branch "bar", so has been changed to "synced/foo/bar". * adjust: Previously, when adjusting a branch with a slash in its name, such as "foo/bar", the adjusted branch was "adjusted/bar(unlocked)". That conflicted with the adjusted branch used for branch "bar", so has been changed to "adjusted/foo/bar(unlocked)" * Also, running sync in an adjusted branch did not correctly sync changes back to the parent branch when it had a slash in its name. This bug has been fixed. Eliminate use of Git.Ref.under and Git.Ref.basename; using Git.Ref.underBase and Git.Ref.base make everything handle deep branches correctly. Probably noone was adjusting deep branches, and v6 is still experimental anyway, so I'm not going to worry about the mess that was left by that bug. In the case of git-annex sync, using a fixed git-annex with an old unfixed one will mean they use different sync branches for a deep branch, and so they may stop syncing until the old one is upgraded. However, that's only a problem when syncing between repositories without going via a central bare repository. Added a warning about this to the CHANGELOG, but it's probably not going to affect many people at all. This commit was sponsored by Riku Voipio.
* 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.
* copy, move, mirror: Support --json and --json-progress.Gravatar Joey Hess2016-09-09
|
* better locking for json with -JGravatar Joey Hess2016-09-09
| | | | | | | Avoid threads emitting json at the same time and scrambling, which was still possible even with the buffering, just less likely. Converted json IO actions to JSONChunk data too.
* addurl, get: Added --json-progress option, which adds progress objects to ↵Gravatar Joey Hess2016-09-09
| | | | | | | the json output. This doesn't work right when used with -J yet, and there is some really ugly hand-crafting of part of the json output.
* disentangle concurrency and message typeGravatar Joey Hess2016-09-09
| | | | | | | | This makes -Jn work with --json and --quiet, where before setting -Jn disabled those options. Concurrent json output is currently a mess though since threads output chunks over top of one-another.
* get -J: Download different files from different remotes when the remotes ↵Gravatar Joey Hess2016-09-06
| | | | | | | | | | | | | | | | | have the same costs. Only done in -J mode because only if there's concurrency can downloading from two remotes be faster. Without concurrency, it's likely the case that sequential downloads from the same remote are faster than switching back and forth between two remotes. There is some hairy MVar code here, but basically it just keeps the activeremotes MVar full except when deciding which remote to assign to a thread. Also affects gets by sync --content -J This commit was sponsored by Jochen Bartl.
* use keyLocations not loggedLocationsGravatar Joey Hess2016-09-06
| | | | Skip dead remotes.
* examimekey: Allow being run in a git repo that is not initialized by ↵Gravatar Joey Hess2016-09-05
| | | | | | | git-annex yet. No reason not to; indeed there's no real reason to need a git repository at all except the implementation uses the Annex monad.
* remove TransferObserverGravatar Joey Hess2016-08-03
| | | | unused after last commit
* Re-enable accumulating transfer failure log files for command-line actionsGravatar Joey Hess2016-08-03
| | | | | | | | | | | | | | | | | This was disabled in commit 7ca8bf3321d1b62ea4e817e28914ed2fa56afe30, because only the assistant used them, and they were clutter. But, now --failed also uses them. Remove the failure log files after successful transfers. Should avoid most of the clutter problems. Commit 7ca8bf3321d1b62ea4e817e28914ed2fa56afe30 mentions a subtle behavior change, which has now been reverted: There is one behavior change from this. If glacier is being used, and a manual git annex get --from glacier fails because the file isn't available yet, the assistant will no longer later see that failed transfer file and retry the get.
* 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.
* Added metadata --batch option, which allows getting, setting, deleting, and ↵Gravatar Joey Hess2016-07-27
| | | | modifying metadata for multiple files/keys.
* improved use of Aeson for JSONActionItemGravatar Joey Hess2016-07-26
|
* 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.
* saner format for metadata --jsonGravatar Joey Hess2016-07-26
| | | | | | | | | | | | | metadata --json output format has changed, adding a inner json object named "fields" which contains only the fields and their values. This should be easier to parse than the old format, which mixed up metadata fields with other keys in the json object. Any consumers of the old format will need to be updated. This adds a dependency on unordered-containers for parsing MetaData from JSON, but it's a free dependency; aeson pulls in that library.
* 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.
* --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.
* more generic showStart'Gravatar Joey Hess2016-07-20
|
* --branch, stage 1Gravatar Joey Hess2016-07-20
| | | | | | | | | | | | | | | | Added --branch option to copy, drop, fsck, get, metadata, mirror, move, and whereis commands. This option makes git-annex operate on files that are included in a specified branch (or other treeish). The names of the files from the branch that are being operated on are not displayed yet; only the keys. Displaying the filenames will need changes to every affected command. Also, note that --branch can be specified repeatedly. This is not really documented, but seemed worth supporting, especially since we may later want the ability to operate on all branches matching a refspec. However, when operating on two branches that contain the same key, that key will be operated on twice.
* log: Added --all option.Gravatar Joey Hess2016-07-17
|
* uninit: Fix crash due to trying to write to deleted keys db.Gravatar Joey Hess2016-07-12
| | | | | | Reversion introduced by v6 mode support, affects v5 too. Also fix a similar crash when the webapp is used to delete a repository.
* fsck: Fix a reversion in direct mode fsck of a file that is present when the ↵Gravatar Joey Hess2016-07-12
| | | | location log thinks it is not. Reversion introduced in version 5.20151208.
* drop: Add --batch and --json options.Gravatar Joey Hess2016-07-06
|
* get: Add --batch and --json options.Gravatar Joey Hess2016-07-05
|
* Make git clean filter preserve the backend that was used for a file.Gravatar Joey Hess2016-06-09
|
* Fix update of associated files db when unlocking a file in a v6 repo.Gravatar Joey Hess2016-06-09
|
* Make lock and unlock work in v6 repos on files whose content is not present.Gravatar Joey Hess2016-06-09
|
* move --to: Better behavior when system is completely out of disk space; drop ↵Gravatar Joey Hess2016-06-05
| | | | | | | | content from disk before writing location log. I noticed move --to failing when there was no disk space. The file was sent to the remote, but it crashed before it could be dropped locally. This could fix that.
* list: Do not include dead repositories.Gravatar Joey Hess2016-06-04
|
* refactor isBareRepoGravatar Joey Hess2016-06-02
|
* sync --content: Fix bug that caused transfers of files to be made to a git ↵Gravatar Joey Hess2016-06-02
| | | | | | | | | | | remote that does not have a UUID. This particularly impacted clones from gcrypt repositories. Added guard in Annex.Transfer to prevent this problem at a deeper level. I'm unhappy ith NoUUID, but having Maybe UUID instead wouldn't help either if nothing checked that there was a UUID. Since there legitimately need to be Remotes that do not have a UUID, I can't see a way to fix it at the type level, short making there be two separate types of Remotes.
* enableremote: Remove annex-ignore configuration from a remote.Gravatar Joey Hess2016-05-24
|
* enableremote: Can now be used to explicitly enable git-annex to use git ↵Gravatar Joey Hess2016-05-24
| | | | remotes. Using the command this way prevents other git-annex commands from probing new git remotes to auto-enable them.
* Pass the various gnupg-options configs to gpg in several cases where they ↵Gravatar Joey Hess2016-05-23
| | | | | | | | | | | | were not before. Removed the instance LensGpgEncParams RemoteConfig because it encouraged code that does not take the RemoteGitConfig into account. RemoteType's setup was changed to take a RemoteGitConfig, although the only place that is able to provide a non-empty one is enableremote, when it's changing an existing remote. This led to several folow-on changes, and got RemoteGitConfig plumbed through.
* remove unusedGravatar Joey Hess2016-05-23
|
* adjust: Add --fix adjustment, which is useful when the git directory is in a ↵Gravatar Joey Hess2016-05-16
| | | | nonstandard place.