aboutsummaryrefslogtreecommitdiff
path: root/Command
Commit message (Collapse)AuthorAge
* implemented git-annex-shell p2pstdioGravatar Joey Hess2018-03-07
| | | | | | | | | | | Not yet used by git-annex, but this will allow faster transfers etc than using individual ssh connections and rsync. Not called git-annex-shell p2p, because git-annex p2p does something else and I don't want two subcommands with the same name between the two for sanity reasons. This commit was sponsored by Øyvind Andersen Holm.
* make sure that lockContentShared is always paired with an inAnnex checkGravatar Joey Hess2018-03-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | lockContentShared had a screwy caveat that it didn't verify that the content was present when locking it, but in the most common case, eg indirect mode, it failed to lock when the content is not present. That led to a few callers forgetting to check inAnnex when using it, but the potential data loss was unlikely to be noticed because it only affected direct mode I think. Fix data loss bug when the local repository uses direct mode, and a locally modified file is dropped from a remote repsitory. The bug caused the modified file to be counted as a copy of the original file. (This is not a severe bug because in such a situation, dropping from the remote and then modifying the file is allowed and has the same end result.) And, in content locking over tor, when the remote repository is in direct mode, it neglected to check that the content was actually present when locking it. This could cause git annex drop to remove the only copy of a file when it thought the tor remote had a copy. So, make lockContentShared do its own inAnnex check. This could perhaps be optimised for direct mode, to avoid the check then, since locking the content necessarily verifies it exists there, but I have not bothered with that. This commit was sponsored by Jeff Goeke-Smith on Patreon.
* refactorGravatar Joey Hess2018-03-06
|
* fix sync bug in direct modeGravatar Joey Hess2018-02-26
| | | | | | | sync: Fix bug that prevented pulling changes into direct mode repositories that were committed to remotes using git commit rather than git-annex sync. This commit was supported by the NSF-funded DataLad project.
* importfeed: Fix a failure when downloading with youtube-dl and the ↵Gravatar Joey Hess2018-02-22
| | | | | | | | | | | | | | destination subdirectory does not exist yet. Noticed while running this (which a user posted in a comment they deleted for some reason): git-annex importfeed https://vimeo.com/logiingimars/videos/rss The filename that youtube-dl suggests included a subdirectory, which didn't exist, so renaming to it failed. This commit was sponsored by mo on Patreon.
* add --json-error-messages (not yet implemented)Gravatar Joey Hess2018-02-19
| | | | | | | | | | Added --json-error-messages option, which includes error messages in the json output, rather than outputting them to stderr. The actual rediretion of errors is not implemented yet, this is only the docs and option plumbing. This commit was supported by the NSF-funded DataLad project.
* optimise for case where there are no required contentsGravatar Joey Hess2018-02-08
| | | | Avoid reading location log in this case.
* fsck: Warn when required content is not present in the repository that ↵Gravatar Joey Hess2018-02-08
| | | | | | requires it. This commit was sponsored by Jack Hill on Patreon.
* inprogress: Avoid showing failures for files not in progress.Gravatar Joey Hess2018-01-24
|
* Improve startup time for commands that do not operate on remotesGravatar Joey Hess2018-01-09
| | | | | | | | | | | | | | And for tab completion, by not unnessessarily statting paths to remotes, which used to cause eg, spin-up of removable drives. Got rid of the remotes member of Git.Repo. This was a bit painful. Remote.Git modifies the list of remotes as it reads their configs, so still need a persistent list of remotes. So, put it in as Annex.gitremotes. It's only populated by getGitRemotes, so commands like examinekey that don't care about remotes won't do so. This commit was sponsored by Jake Vosloo on Patreon.
* Fix several places where files in .git/annex/ were written with modes that ↵Gravatar Joey Hess2018-01-02
| | | | | | | | | | did not take the core.sharedRepository config into account. git grep writeFile finds some more that might also be problems, but for now I've concentrated on .git/annex/ log files. There are certianly cases where writeFile is not a problem too. This commit was sponsored by mo on Patreon.
* split BuildInfo and BuildFlagsGravatar Joey Hess2018-01-02
| | | | | | The problem with combining these is that Build.Standalone etc need only the BuildInfo, and since not built with cabal, the BuildFlags ifdefs were causing bogus warnings.
* finally really add back custom-setup stanzaGravatar Joey Hess2017-12-31
| | | | | | | | | | | | Fourth or fifth try at this and finally found a way to make it work. Absurd amount of busy-work forced on me by change in cabal's behavior. Split up Utility modules that need posix stuff out of ones used by Setup. Various other hacks around inability for Setup to use anything that ifdefs a use of unix. Probably lost a full day of my life to this. This is how build systems make their users hate them. Just saying.
* fix buildGravatar Joey Hess2017-12-31
|
* repeated addurl behavior reversion fixGravatar Joey Hess2017-12-31
| | | | | | | | addurl: When the file youtube-dl will download is already an annexed file, don't download it again and fail to overwrite it, instead just do nothing, like it used to when quvi was used. This commit was sponsored by Anthony DeRobertis on Patreon.
* Added inprogress command for accessing files as they are being downloaded.Gravatar Joey Hess2017-12-28
| | | | | | | | Chose to make this only handle files actively being downloaded, not temp files for downloads that were interrupted or files that have been fully downloaded. This commit was sponsored by Ole-Morten Duesund on Patreon.
* fold Build/SysConfig.hs into BuildInfo via includeGravatar Joey Hess2017-12-14
| | | | | | | | | | | This avoids warnings from stack about the module not being listed in the cabal file. So, the generated file is also renamed to Build/SysConfig. Note that the setup program seems to be cached despite these changes; I had to cabal clean to get cabal to update it so that Build/SysConfig was written. This commit was sponsored by Jochen Bartl on Patreon.
* .noannex fileGravatar Joey Hess2017-12-13
| | | | | | | | | | | | | A top-level .noannex file will prevent git-annex init from being used in a repository. This is useful for repositories that have a policy reason not to use git-annex. The content of the file will be displayed to the user who tries to run git-annex init. This also affects git annex reinit and initialization via the webapp. It does not affect automatic inits, when there's a sibling git-annex branch already. This commit was supported by the NSF-funded DataLad project.
* fix recorded url when using --file with external special remoteGravatar Joey Hess2017-12-11
| | | | | | | The youtube changes accidentially caused the OtherDownloader url to not get used here, which broke datalad's test suite luckily. This commit was supported by the NSF-funded DataLad project.
* lookupkey absolute path supportGravatar Joey Hess2017-12-08
| | | | | | | lookupkey: Support being given an absolute filename to a file within the current git repository. This commit was supported by the NSF-funded DataLad project.
* more lambda-case conversionGravatar Joey Hess2017-12-05
|
* make --raw avoid ever running youtube-dlGravatar Joey Hess2017-11-30
| | | | | | | added DownloadOptions type to avoid needing two different Bool params for some functions. This commit was sponsored by Thom May on Patreon.
* display filename when file already has urlGravatar Joey Hess2017-11-30
| | | | Otherwise it's confusing what happened..
* improve error messageGravatar Joey Hess2017-11-30
| | | | | checkCanAdd can be called on annexed files too, when youtube-dl is in use.
* check youtube-dl for --fast and --relaxed when adding new fileGravatar Joey Hess2017-11-30
| | | | | | The filename comes from youtube-dl also. This commit was sponsored by Denis Dzyubenko on Patreon.
* rethought --relaxed changeGravatar Joey Hess2017-11-30
| | | | | | | | | Better to make it not be surprising and slow, than surprising and fast. --raw can be used when it needs to be really fast. Implemented adding a youtube-dl supported url to an existing file. This commit was sponsored by andrea rota.
* avoid warning when youtube-dl is not installedGravatar Joey Hess2017-11-30
| | | | | If a user does not have it installed, don't warn on every imported item about it.
* honor --file when downloading with youtube-dlGravatar Joey Hess2017-11-30
| | | | This used to be done with quvi, and got broken in the transition.
* convert importfeed to youtube-dlGravatar Joey Hess2017-11-29
| | | | | | | | | | | | | | | | | | | | | | | | Fully working, including --fast/--relaxed. Note that, while git-annex addurl --relaxed is not going to check youtube-dl, I kept git annex importfeed --relaxed checking it. Thinking is that, let's not break people's importfeed cron jobs, and importfeed does not typically have to check a large number of new items, so it's ok if it's a little bit slower when used with youtube playlist feeds. importfeed's behavior is also improved (?) when a feed has links in it to non-media files. Before, those were skipped. Now, the content of the link is downloaded. This had to be done, because trying to use youtube-dl is slow, and if those were skipped, it would have to check every time importfeed was run. While this behavior change may not be desirable for some feeds, that intersperse links to web pages with enclosures, it will be desirable for other feeds, that have non-enclosure directy links to media files. Remove old quvi modules. This commit was sponsored by Øyvind Andersen Holm.
* youtube-dl workingGravatar Joey Hess2017-11-29
| | | | | | | | | Including resuming and cleanup of incomplete downloads. Still todo: --fast, --relaxed, importfeed, disk reserve checking, quvi code cleanup. This commit was sponsored by Anthony DeRobertis on Patreon.
* add gitAnnexTmpWorkDir and withTmpWorkDirGravatar Joey Hess2017-11-29
| | | | | | | | | Needed to run youtube-dl in, but could also be useful for other stuff. The tricky part of this was making the workdir be cleaned up whenever the tmp object file is cleaned up. This commit was sponsored by Ole-Morten Duesund on Patreon.
* wipGravatar Joey Hess2017-11-28
|
* showStart variant for when there's no worktree fileGravatar Joey Hess2017-11-28
| | | | | | | | | | | | Clean up some uses of showStart with "" for the file, or in some cases, a non-filename description string. That would generate bad json, although none of the commands doing that supported --json. Using "" for the file resulted in output like "foo rest"; now the extra space is eliminated. This commit was sponsored by Fernando Jimenez on Patreon.
* Display progress meter when uploading a key without size informationGravatar Joey Hess2017-11-14
| | | | | | Getting the size by statting the content file. This commit was supported by the NSF-funded DataLad project.
* clean up build warnings on WindowsGravatar Joey Hess2017-11-14
|
* testremote: Test exporttree.Gravatar Joey Hess2017-11-08
| | | | | | | | | | As long as the class of remotes supports exporting, it's tested whether or not the remote is configured with exporttree=yes. Also, made testremote of a remote configured with exporttree=yes disable that configuration for testing non-export storage. This commit was supported by the NSF-funded DataLad project.
* unlock, lock: Support --json.Gravatar Joey Hess2017-10-30
|
* better dup key with -J fixGravatar Joey Hess2017-10-17
| | | | | | | | | | | | | | | This avoids all the complication about redundant work discussed in the previous try at fixing this. At the expense of needing each command that could have the problem to be patched to simply wrap the action in onlyActionOn once the key is known. But there do not seem to be many such commands. onlyActionOn' should not be used with a CommandStart (or CommandPerform), although the types do allow it. onlyActionOn handles running the whole CommandStart chain. I couldn't immediately see a way to avoid mistken use of onlyActionOn'. This commit was supported by the NSF-funded DataLad project.
* Improve behavior when -J transfers multiple files that point to the same keyGravatar Joey Hess2017-10-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After a false start, I found a fairly non-intrusive way to deal with it. Although it only handles transfers -- there may be issues with eg concurrent dropping of the same key, or other operations. There is no added overhead when -J is not used, other than an added inAnnex check. When -J is used, it has to maintain and check a small Set, which should be negligible overhead. It could output some message saying that the transfer is being done by another thread. Or it could even display the same progress info for both files that are being downloaded since they have the same content. But I opted to keep it simple, since this is rather an edge case, so it just doesn't say anything about the transfer of the file until the other thread finishes. Since the deferred transfer action still runs, actions that do more than transfer content will still get a chance to do their other work. (An example of something that needs to do such other work is P2P.Annex, where the download always needs to receive the content from the peer.) And, if the first thread fails to complete a transfer, the second thread can resume it. But, this unfortunately means that there's a risk of redundant work being done to transfer a key that just got transferred. That's not ideal, but should never cause breakage; the same thing can occur when running two separate git-annex processes. The get/move/copy/mirror --from commands had extra inAnnex checks added, inside the download actions. Without those checks, the first thread downloaded the content, and then the second thread woke up and downloaded the same content redundantly. move/copy/mirror --to is left doing redundant uploads for now. It would need a second checkPresent of the remote inside the upload to avoid them, which would be expensive. A better way to avoid redundant work needs to be found.. This commit was supported by the NSF-funded DataLad project.
* 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.
* avoid warningGravatar Joey Hess2017-10-16
|
* copy, move: Behave same with --fast when sending to remotes located on a ↵Gravatar Joey Hess2017-09-29
| | | | | | local disk as when sending to other remotes. Let --fast override use of hasKey even when hasKeyCheap.
* sync: Added --cleanup, which removes local and remote synced/ branches.Gravatar Joey Hess2017-09-28
| | | | | | | Also deletes any tagged pushes that the assistant might have done, since those would also prevent resetting a branch back. This commit was sponsored by andrea rota.
* metadata: Added --remove-all.Gravatar Joey Hess2017-09-28
| | | | | | | Motivation is to remove all metadata when it gets copied from a previous version of the file, and that is not deisrable. This commit was supported by the NSF-funded DataLad project.
* add exporter thread to assistantGravatar Joey Hess2017-09-20
| | | | | | | | | | | | | | | | | | | | | | | This is similar to the pusher thread, but a separate thread because git pushes can be done in parallel with exports, and updating a big export should not prevent other git pushes going out in the meantime. The exportThread only runs at most every 30 seconds, since updating an export is more expensive than pushing. This may need to be tuned. Added a separate channel for export commits; the committer records a commit in that channel. Also, reconnectRemotes records a dummy commit, to make the exporter thread wake up and make sure all exports are up-to-date. So, connecting a drive with a directory special remote export will immediately update it, and getting online will automatically update S3 and WebDAV exports. The transfer queue is not involved in exports. Instead, failed exports are retried much like failed pushes. This commit was sponsored by Ewen McNeill.
* update transfer info and notify when exportingGravatar Joey Hess2017-09-20
| | | | | | | Same as is done for all other transfers of content, so the webapp will display progress bars etc. This commit was sponsored by Anthony DeRobertis on Patreon.
* export --fast sets up but does not populate exportGravatar Joey Hess2017-09-19
| | | | sync --content finishes
* git annex sync --content to exportsGravatar Joey Hess2017-09-19
| | | | | | Assistant still todo. This commit was sponsored by Boyd Stephen Smith Jr. on Patreon
* configuration and docs for tracking exportsGravatar Joey Hess2017-09-19
| | | | | | Not yet handled by sync or assistant. This commit was sponsored by Nick Daly on Patreon.
* merge changes made on other repos into ExportTreeGravatar Joey Hess2017-09-18
| | | | | | | | | | | Now when one repository has exported a tree, another repository can get files from the export, after syncing. There's a bug: While the database update works, somehow the database on disk does not get updated, and so the database update is run the next time, etc. Wasn't able to figure out why yet. This commit was sponsored by Ole-Morten Duesund on Patreon.