summaryrefslogtreecommitdiff
path: root/Remote/Git.hs
Commit message (Collapse)AuthorAge
...
* Do verification of checksums of annex objects downloaded from remotes.Gravatar Joey Hess2015-10-01
| | | | | | | | | | | | | | | | * When annex objects are received into git repositories, their checksums are verified then too. * To get the old, faster, behavior of not verifying checksums, set annex.verify=false, or remote.<name>.annex-verify=false. * setkey, rekey: These commands also now verify that the provided file matches the key, unless annex.verify=false. * reinject: Already verified content; this can now be disabled by setting annex.verify=false. recvkey and reinject already did verification, so removed now duplicate code from them. fsck still does its own verification, which is ok since it does not use getViaTmp, so verification doesn't happen twice when using fsck --from.
* refactorGravatar Joey Hess2015-10-01
|
* annex.hardlink extended to also try to use hard links when copying from the ↵Gravatar Joey Hess2015-09-14
| | | | | | | repository to a remote. Also, it used to only check that one of the repos was not in direct mode; now when either repo is direct mode, annex.hardlink won't have an effect.
* add some debugs to get timingsGravatar Joey Hess2015-08-13
| | | | | | | Note that I had one in Annex.Action.startup too, but it resulted in a weird message printed by ssh, "channel 2: bad ext data". I don't know why, but it only happened when transferinfo was run, so I wonder if 1d71ad072e13c8ed1cb8b34367b57d59e651f0a9 introduced a fragility somehow.
* Sped up downloads of files from ssh remotes, reducing the non-data-transfer ↵Gravatar Joey Hess2015-08-13
| | | | overhead 6x.
* remove debug printGravatar Joey Hess2015-08-13
|
* Simplify setup process for a ssh remote.Gravatar Joey Hess2015-08-05
| | | | | | | | | | | | | | | | | | | | | | Now it suffices to run git remote add, followed by git-annex sync. Now the remote is automatically initialized for use by git-annex, where before the git-annex branch had to manually be pushed before using git-annex sync. Note that this involved changes to git-annex-shell, so if the remote is using an old version, the manual push is still needed. Implementation required git-annex-shell be changed, so configlist can autoinit a repository even when no git-annex branch has been pushed yet. Unfortunate because we'll have to wait for it to get deployed to servers before being able to rely on this change in the documentation. Did consider making git-annex sync push the git-annex branch to repos that didn't have a uuid, but this seemed difficult to do without complicating it in messy ways. It would be cleaner to split a command out from configlist to handle the initialization. But this is difficult without sacrificing backwards compatability, for users of old git-annex versions which would not use the new command.
* Avoid accumulating transfer failure log files unless the assistant is being ↵Gravatar Joey Hess2015-05-12
| | | | | | | | | | | | used. Only the assistant uses these, and only the assistant cleans them up, so make only git annex transferkeys write them, 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. Hope no-one depended on that old behavior.
* Merge branch 'master' into concurrentprogressGravatar Joey Hess2015-05-12
|\ | | | | | | | | | | | | | | | | | | | | | | Conflicts: Command/Fsck.hs Messages.hs Remote/Directory.hs Remote/Git.hs Remote/Helper/Special.hs Types/Remote.hs debian/changelog git-annex.cabal
| * removed all uses of undefined from code baseGravatar Joey Hess2015-04-19
| | | | | | | | It's a code smell, can lead to hard to diagnose error messages.
| * Fix fsck --from a git remote in a local directory, and from a directory ↵Gravatar Joey Hess2015-04-18
| | | | | | | | | | | | | | | | | | | | | | special remote. This was a reversion caused by the relative path changes in 5.20150113. The directory special remote was not affected in its normal configuration, since annex-directory is an absolute path normally. But it could fail when a relative path was used. The git remote was affected even when an absolute path to it was used in .git/config, since git-annex now converts all such paths to relative.
* | add filename to progress bar, and display ok/failed at endGravatar Joey Hess2015-04-14
| | | | | | | | This needed plumbing an AssociatedFile through retrieveKeyFileCheap.
* | add missing progress barGravatar Joey Hess2015-04-14
| |
* | only display built-in meters in parallel modeGravatar Joey Hess2015-04-10
| |
* | use built-in progress meters for git when in parallel modeGravatar Joey Hess2015-04-10
|/
* propigate outer output state into inner state when running onLocalGravatar Joey Hess2015-04-03
| | | | | Otherwise, progress displays would not be suppressed here when running with --quiet. Interesting wrinkle!
* When re-execing git-annex, use current program location, rather than ↵Gravatar Joey Hess2015-02-28
| | | | | | | | | | | | | | | | | | ~/.config/git-annex/program, when possible. Most of the time, there will be no discreprancy between programPath and readProgramFile. But, the programFile might have been written by an old version of git-annex that is still installed, while a newer one is currently running. In this case, we want to run the same one that's currently running. This is especially important for things like the GIT_SSH=git-annex used for ssh connection caching. The only code that still uses readProgramFile directly is the upgrade code, which needs to know where the standalone git-annex was installed, in order to upgrade it.
* commentGravatar Joey Hess2015-02-09
|
* implement annex.tune.objecthashlowerGravatar Joey Hess2015-01-28
| | | | Split out Annex.DirHashes which never really belonged in Locations.
* update my email address and homepage urlGravatar Joey Hess2015-01-21
|
* add getFileSize, which can get the real size of a large file on WindowsGravatar Joey Hess2015-01-20
| | | | | | | | | | | | | | Avoid using fileSize which maxes out at just 2 gb on Windows. Instead, use hFileSize, which doesn't have a bounded size. Fixes support for files > 2 gb on Windows. Note that the InodeCache code only needs to compare a file size, so it doesn't matter it the file size wraps. So it has been left as-is. This was necessary both to avoid invalidating existing inode caches, and because the code passed FileStatus around and would have become more expensive if it called getFileSize. This commit was sponsored by Christian Dietrich.
* implemented old Richih wishlist about remote/uuid infoGravatar Joey Hess2015-01-13
| | | | | | | | * info: Can now display info about a given uuid. * Added to remote/uuid info: Count of the number of keys present on the remote, and their size. This is rather expensive to calculate, so comes last and --fast will disable it. * Git remote info now includes the date of the last sync with the remote.
* revert parentDir changeGravatar Joey Hess2015-01-09
| | | | | | | | Reverts 2bba5bc22d049272d3328bfa6c452d3e2e50e86c Unfortunately, this caused breakage on Windows, and possibly elsewhere, because parentDir and takeDirectory do not behave the same when there is a trailing directory separator.
* made parentDir return a Maybe FilePath; removed most uses of itGravatar Joey Hess2015-01-06
| | | | | | | | parentDir is less safe than takeDirectory, especially when working with relative FilePaths. It's really only useful in loops that want to terminate at / This commit was sponsored by Audric SCHILTKNECHT.
* fixed all remaining build warnings on WindowsGravatar Joey Hess2014-12-29
|
* Expand checkurl to support recommended filename, and multi-file-urlsGravatar Joey Hess2014-12-11
| | | | This commit was sponsored by an anonymous bitcoiner.
* Urls can now be claimed by remotes. This will allow creating, for example, a ↵Gravatar Joey Hess2014-12-08
| | | | external special remote that handles magnet: and *.torrent urls.
* add stub claimUrlGravatar Joey Hess2014-12-08
|
* add per-remote-type infoGravatar Joey Hess2014-10-21
| | | | | | | | | | Now `git annex info $remote` shows info specific to the type of the remote, for example, it shows the rsync url. Remote types that support encryption or chunking also include that in their info. This commit was sponsored by Ævar Arnfjörð Bjarmason.
* fix some mixed space+tab indentationGravatar Joey Hess2014-10-09
| | | | | | | | | This fixes all instances of " \t" in the code base. Most common case seems to be after a "where" line; probably vim copied the two space layout of that line. Done as a background task while listening to episode 2 of the Type Theory podcast.
* New annex.hardlink setting. Closes: #758593Gravatar Joey Hess2014-09-05
| | | | | | | | | | * New annex.hardlink setting. Closes: #758593 * init: Automatically detect when a repository was cloned with --shared, and set annex.hardlink=true, as well as marking the repository as untrusted. Had to reorganize Logs.Trust a bit to avoid a cycle between it and Annex.Init.
* Do not preserve permissions and acls when copying files from one local git ↵Gravatar Joey Hess2014-08-26
| | | | | | | | | | | | | | | | | repository to another. Timestamps are still preserved as long as cp --preserve=timestamps is supported. This avoids cp -a overriding the default mode acls that the user might have set in a git repository. With GNU cp, this behavior change should not be a breaking change, because git-anex also uses rsync sometimes in the same situation, and has only ever preserved timestamps when using rsync. Systems without GNU cp will no longer use cp -a, but instead just cp. So, timestamps will no longer be preserved. Preserving timestamps when copying between repos is not guaranteed anyway. Closes: #729757
* 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.
* When accessing a local remote, shut down git-cat-file processes afterwards, ↵Gravatar Joey Hess2014-08-20
| | | | | | | | | | | | | | | to ensure that remotes on removable media can be unmounted. Closes: #758630 This does mean that eg, copying multiple files to a local remote will become slightly slower, since it now restarts git-cat-file after each copy. Should not be significant slowdown. The reason git-cat-file is run on the remote at all is to update its location log. In order to add an item to it, it needs to get the current content of the log. Finding a way to avoid needing to do that would be a good path to avoiding this slowdown if it does become a problem somehow. This commit was sponsored by Evan Deaubl.
* testremote: Add testing of behavior when remote is not availableGravatar Joey Hess2014-08-10
| | | | | | | | | | | | | | | | | | | | Added a mkUnavailable method, which a Remote can use to generate a version of itself that is not available. Implemented for several, but not yet all remotes. This allows testing that checkPresent properly throws an exceptions when it cannot check if a key is present or not. It also allows testing that the other methods don't throw exceptions in these circumstances. This immediately found several bugs, which this commit also fixes! * git remotes using ssh accidentially had checkPresent return an exception, rather than throwing it * The chunking code accidentially returned False rather than propigating an exception when there were no chunks and checkPresent threw an exception for the non-chunked key. This commit was sponsored by Carlo Matteo Capocasa.
* fix checkPresent error handling for non-present local git reposGravatar Joey Hess2014-08-08
| | | | guardUsable r (error "foo") *returned* an error, rather than throwing it
* unify exception handling into Utility.ExceptionGravatar Joey Hess2014-08-07
| | | | | | | | | | | | | | | | | | | | Removed old extensible-exceptions, only needed for very old ghc. Made webdav use Utility.Exception, to work after some changes in DAV's exception handling. Removed Annex.Exception. Mostly this was trivial, but note that tryAnnex is replaced with tryNonAsync and catchAnnex replaced with catchNonAsync. In theory that could be a behavior change, since the former caught all exceptions, and the latter don't catch async exceptions. However, in practice, nothing in the Annex monad uses async exceptions. Grepping for throwTo and killThread only find stuff in the assistant, which does not seem related. Command.Add.undo is changed to accept a SomeException, and things that use it for rollback now catch non-async exceptions, rather than only IOExceptions.
* pushed checkPresent exception handling out of Remote implementationsGravatar Joey Hess2014-08-06
| | | | | | | | | | | | | | | | I tend to prefer moving toward explicit exception handling, not away from it, but in this case, I think there are good reasons to let checkPresent throw exceptions: 1. They can all be caught in one place (Remote.hasKey), and we know every possible exception is caught there now, which we didn't before. 2. It simplified the code of the Remotes. I think it makes sense for Remotes to be able to be implemented without needing to worry about catching exceptions inside them. (Mostly.) 3. Types.StoreRetrieve.Preparer can only work on things that return a Bool, which all the other relevant remote methods already did. I do not see a good way to generalize that type; my previous attempts failed miserably.
* make testremote work with gcrypt reposGravatar Joey Hess2014-08-04
| | | | | | This involved making Remote.Gcrypt.gen expect a Repo with a regular, non-gcrypt path. Since tht is what's stored as the Remote's gitrepo, testremote can then modify it and feed it back into gen.
* finally properly fixed ssh zombie leakGravatar Joey Hess2014-08-03
| | | | | The leak was caused by the thread that sshd'd to send transferinfo not waiting on its ssh. Doh.
* optimise handling of unavailable reposGravatar Joey Hess2014-07-15
| | | | | The exception handling resulted in git config --list being run twice for unavailable repos. This dials it back down to running it only once.
* catch exception when repo is really not availableGravatar Joey Hess2014-07-15
|
* sync: Fix git sync with local git remotes even when they don't have an ↵Gravatar Joey Hess2014-07-15
| | | | | | | | | | | | | | | | | annex.uuid set. Catch an exception when ensureInitialized is run in a non-initted repository. In this case, just read the git config, so that the Git.Repo object is not LocalUnknown, which is what is used to represent remotes on eg, drives that are not connected. The assistant already got this right, and like with the assistant, this causes an implicit git-annex init of the local remote on the second sync, once the git-annex branch has been pushed to it. See this comment for more analysis: http://git-annex.branchable.com/todo/Recovering_from_a_bad_sync/#comment-64e469a2c1969829ee149cbb41b1c138 This commit was sponsored by jscit.
* export CreateProcess fields from Utility.ProcessGravatar Joey Hess2014-06-10
| | | | update code to avoid cwd and env redefinition warnings
* initremote/enableremote: Basic support for using with regular git remotesGravatar Joey Hess2014-05-22
| | | | | initremote stores the location of an already existing git remote, and enableremote setups up a remote using its stored location.
* factor out getRemoteGitConfigGravatar Joey Hess2014-05-16
|
* show a much longer message when annex-ignore is automatically set, to help ↵Gravatar Joey Hess2014-05-16
| | | | the user fix their problem
* Bring back rsync -p, but only when git-annex is running on a non-crippled ↵Gravatar Joey Hess2014-04-17
| | | | file system. This is a better approach to fix #700282 while not unncessarily losing file permissions on non-crippled systems.
* add desktop notificationsGravatar Joey Hess2014-03-22
| | | | | | | Motivation: Hook scripts for nautilus or other file managers need to provide the user with feedback that a file is being downloaded. This commit was sponsored by THM Schoemaker.
* clean up cleanup action enumerationGravatar Joey Hess2014-03-13
|