aboutsummaryrefslogtreecommitdiff
path: root/Annex
Commit message (Collapse)AuthorAge
* memoize construction of the Request -> Request function to apply the UrlOptionsGravatar Joey Hess2014-08-15
|
* git-annex-shell sendkey: Don't fail if a remote asks for a key to be sent ↵Gravatar Joey Hess2014-08-15
| | | | that already has a transfer lock file indicating it's being sent to that remote. The remote may have moved between networks, or reconnected.
* direct: Avoid leaving file content in misctemp if interrupted.Gravatar Joey Hess2014-08-15
|
* direct: Fix ugly warning messages.Gravatar Joey Hess2014-08-12
| | | | | | | | | | | | | replaceFileOr was broken and ran the rollback action always. Luckily, for replaceFile, the rollback action was safe to run, since it just nuked a temp file that had already been moved into place. However, when `git annex direct` used replaeFileOr, its rollback printed a scary message: /home/joey/tmp/rrrr/.git/annex/misctmp/tmp32268: rename: does not exist (No such file or directory) There was actually no bad result though.
* 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.
* Merge branch 'newchunks'Gravatar Joey Hess2014-08-01
|\ | | | | | | I am happy enough with this to make it live!
* | Display exception message when a transfer fails due to an exception.Gravatar Joey Hess2014-07-30
| | | | | | | | | | | | For example, I had a copy to a remote that was failing for an unknown reason. This let me see the exception was createDirectory: permission denied; the underlying problem being a permissions issue.
* | add missing Ord constraint (fixes android build)Gravatar Joey Hess2014-07-30
| | | | | | | | | | Probably the new ghc used on android is the root cause of needing this constraint.
| * better type for RetrieverGravatar Joey Hess2014-07-29
| | | | | | | | | | | | | | | | Putting a callback in the Retriever type allows for the callback to remove the retrieved file when it's done with it. I did not really want to make Retriever be fixed to Annex Bool, but when I tried to use Annex a, I got into some type of type mess.
| * allow Retriever action to update the progress meterGravatar Joey Hess2014-07-29
| | | | | | | | | | | | | | | | Needed for eg, Remote.External. Generally, any Retriever that stores content in a file is responsible for updating the meter, while ones that procude a lazy bytestring cannot update the meter, so are not asked to.
| * add some more exception handling primitivesGravatar Joey Hess2014-07-26
|/
* implement chunk logsGravatar Joey Hess2014-07-24
| | | | | | | Slightly tricky as they are not normal UUIDBased logs, but are instead maps from (uuid, chunksize) to chunkcount. This commit was sponsored by Frank Thomas.
* fix windows buildGravatar Joey Hess2014-07-14
|
* resolvemerge: finish up by committingGravatar Joey Hess2014-07-11
|
* Deal with change in git 2.0 that made indirect mode merge conflict ↵Gravatar Joey Hess2014-07-11
| | | | | | | | | | resolution leave behind old files. I think this is a git behavior change, but have not checked to be sure. Conflict cruft used to look like $foo~HEAD, but now just $foo is left behind as conflict cruft. With test case.
* resolvemerge: New plumbing command that runs the automatic merge conflict ↵Gravatar Joey Hess2014-07-11
| | | | resolver.
* direct: Fix handling of case where a work tree subdirectory cannot be ↵Gravatar Joey Hess2014-07-10
| | | | | | | | | written to due to permissions. Running `git annex direct` would cause loss of data, because the object was moved to a temp file, which it then tried to replace the work tree file with, and on failure, the temp file got deleted. Now it's instead moved back into the annex object location.
* refactor lockingGravatar Joey Hess2014-07-10
|
* refactorGravatar Joey Hess2014-07-10
|
* Fix minor FD leak in journal code.Gravatar Joey Hess2014-07-09
| | | | | | | | | | | | | | | | | | | | | | | | Minor because normally only 1 FD is leaked per git-annex run. However, the test suite leaks a few hundred FDs, and this broke it on the Debian autobuilders, which seem to have a tigher than usual ulimit. The leak was introduced by the lazy getDirectoryContents' that was introduced in b54de1dad4874b7561d2c5a345954b6b5c594078 in order to scale to millions of journal files -- if the lazy list was never fully consumed, the directory handle did not get closed. Instead, pull in openDirectory/readDirectory/closeDirectory code that I already developed and submitted in a patch to the haskell directory library earlier. Using this in journalDirty avoids the place that the lazy list caused a problem. And using it in stageJournal eliminates the need for getDirectoryContents'. The getJournalFiles* functions are switched back to using the regular strict getDirectoryContents. I'm not sure if those always consume the whole list, so this avoids any leak. And the things that call those are things like git annex unused, which also look at every file committed to the git-annex branch, so would need more work to scale to insane numbers of files anyway.
* fix build warning5.20140709Gravatar Joey Hess2014-07-09
|
* fix windows buildGravatar Joey Hess2014-07-09
|
* prospective fix for bad_merge_commit_deleting_all_filesGravatar Joey Hess2014-07-09
| | | | | Assuming my analysis of a race is correct. In any case, this certianly closes a race..
* Fix bug in automatic merge conflict resolutionGravatar Joey Hess2014-07-08
| | | | | | | | | | | | | | | | When one side is an annexed symlink, and the other side is a non-annexed symlink. In this case, git-merge does not replace the annexed symlink in the work tree with the non-annexed symlink, which is different from it's handling of conflicts between annexed symlinks and regular files or directories. So, while git-annex generated the correct merge commit, the work tree didn't get updated to reflect it. See comments on bug for additional analysis. Did not add this to the test suite yet; just unloaded a truckload of firewood and am feeling lazy. This commit was sponsored by Adam Spiers.
* assistant: Fix bug, introduced in last release, that caused the assistant to ↵Gravatar Joey Hess2014-07-05
| | | | make many unncessary empty merge commits.
* work around getDirectoryContents not streaming lazilyGravatar Joey Hess2014-07-04
|
* Fix memory leak when committing millions of changes to the git-annex branchGravatar Joey Hess2014-07-04
| | | | | | | | | Eg after git-annex add has run on 2 million files in one go. Slightly unhappy with the neeed to use a temp file here, but I cannot see any other alternative (see comments on the bug report). This commit was sponsored by Hamish Coleman.
* support commit.gpgsignGravatar Joey Hess2014-07-04
| | | | | | | | | | | | | | | | | | | | | Support users who have set commit.gpgsign, by disabling gpg signatures for git-annex branch commits and commits made by the assistant. The thinking here is that a user sets commit.gpgsign intending the commits that they manually initiate to be gpg signed. But not commits made in the background, whether by a deamon or implicitly to the git-annex branch. gpg signing those would be at best a waste of CPU and at worst would fail, or flood the user with gpg passphrase prompts, or put their signature on changes they did not directly do. See Debian bug #753720. Also makes all commits done by git-annex go through a few central control points, to make such changes easier in future. Also disables commit.gpgsign in the test suite. This commit was sponsored by Antoine Boegli.
* really add non-date metadata tooGravatar Joey Hess2014-07-03
|
* import metadata from feedsGravatar Joey Hess2014-07-03
| | | | | | | | | | | | | | | | | | | | | | When annex.genmetadata is set, metadata from the feed is added to files that are imported from it. Reused the same feedtitle and itemtitle, feedauthor, itemauthor, etc names that are used in --template. Also added title and author, which are the item title/author if available, falling back to the feed title/author. These are more likely to be common metadata fields. (There is a small bit of dupication here, but once git gets around to packing the object, it will compress it away.) The itempubdate field is not included in the metadata as a string; instead it is used to generate year and month fields, same as is done when adding files with annex.genmetadata set. This commit was sponsored by Amitai Schlair, who cooincidentially is responsible for ikiwiki generating nice feed metadata!
* refactorGravatar Joey Hess2014-06-16
|
* work around a bug in gitGravatar Joey Hess2014-06-12
| | | | | | | | | | | http://marc.info/?l=git&m=140262402204212&w=2 This git bug manifested on FAT and Windows as the test suite failing in 3 places. All involved merge conflict resolution. It turned out that the associated file mappings were getting messed up, and that happened because this git bug lost track of what files were supposed to be symlinks. This commit was sponsored by Eric Kidd.
* finish fixing windows timezone madnessGravatar Joey Hess2014-06-12
| | | | | | | | | | | | | | | | | | | | | Rather than calculating the TSDelta once, and caching it, this now reads the inode sential file's InodeCache file once, and then each time a new InodeCache is generated, looks at the sentinal file to get the current delta. This way, if the time zone changes while git-annex is running, it will adapt. This adds some inneffiency, but only on Windows, and only 1 stat per new file added. The worst innefficiency is that `git annex status` and `git annex sync` will now (on Windows) stat the inode sentinal file once per file in the repo. It would be more efficient to use getCurrentTimeZone, rather than needing to stat the sentinal file. This should be easy to do, once the time package gets my bugfix patch. This commit was sponsored by Jürgen Lüters.
* fix for Windows file timestamp timezone madnessGravatar Joey Hess2014-06-12
| | | | | | | | | | | | | | | | | | | | | | On Windows, changing the time zone causes the apparent mtime of files to change. This confuses git-annex, which natually thinks this means the files have actually been modified (since THAT'S WHAT A MTIME IS FOR, BILL <sheesh>). Work around this stupidity, by using the inode sentinal file to detect if the timezone has changed, and calculate a TSDelta, which will be applied when generating InodeCaches. This should add no overhead at all on unix. Indeed, I sped up a few things slightly in the refactoring. Seems to basically work! But it has a big known problem: If the timezone changes while the assistant (or a long-running command) runs, it won't notice, since it only checks the inode cache once, and so will use the old delta for all new inode caches it generates for new files it's added. Which will result in them seeming changed the next time it runs. This commit was sponsored by Vincent Demeester.
* export CreateProcess fields from Utility.ProcessGravatar Joey Hess2014-06-10
| | | | update code to avoid cwd and env redefinition warnings
* simplifyGravatar Joey Hess2014-06-09
|
* avoid fast-forwarding when a merge conflict was auto-resolvedGravatar Joey Hess2014-06-09
|
* avoid bad commits after interrupted direct mode sync (or merge)Gravatar Joey Hess2014-06-09
| | | | | | | | | | | | | | | It was possible for a interrupted sync or merge in direct mode to leave the work tree out of sync with the last recorded commit. This would result in the next commit seeing files missing from the work tree, and committing their removal. Now, a direct mode merge happens not only in a throwaway work tree, but using a temporary index file, and without any commits or index changes being made until the real work tree has been updated. If the merge is interrupted, the work tree may have some updated files, but worst case a commit will redundantly commit changes that come from the merge. This commit was sponsored by Tony Cantor.
* fixed getting files from bare repos on windowsGravatar Joey Hess2014-06-05
|
* wipGravatar Joey Hess2014-06-05
|
* Windows: Fix bug introduced in last release that caused files in the ↵Gravatar Joey Hess2014-06-05
| | | | git-annex branch to have lines teminated with \r.
* webapp: When adding a new local repository, fix bug that caused its group ↵Gravatar Joey Hess2014-05-29
| | | | | | | | | and preferred content to be set in the current repository, even when not combining. There was a tricky bit here, when it does combine, the edit form is shown, and so the info needs to be committed to the new repository, but then pulled into the current one. And caches need to be invalidated for it to be visible in the edit form.
* Use exceptions in place of deprecated MonadCatchIO-transformersGravatar Ben Gamari2014-05-28
|
* Fix encoding of data written to git-annex branch. Avoid truncating unicode ↵Gravatar Joey Hess2014-05-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | characters to 8 bits. Allow any encoding to be used, as with filenames (but utf8 is the sane choice). Affects metadata and repository descriptions, and preferred content expressions. The question of what's the right encoding for the git-annex branch is a vexing one. utf-8 would be a nice choice, but this leaves the possibility of bad data getting into a git-annex branch somehow, and this resulting in git-annex crashing with encoding errors, which is a failure mode I want to avoid. (Also, preferred content expressions can refer to filenames, and filenames can have any encoding, so limiting to utf-8 would not be ideal.) The union merge code already took care to not assume any encoding for a file. Except it assumes that any \n is a literal newline, and not part of some encoding of a character that happens to contain a newline. (At least utf-8 avoids using newline for anything except liternal newlines.) Adapted the git-annex branch code to use this same approach. Note that there is a potential interop problem with Windows, since FileSystemEncoding doesn't work there, and instead things are always decoded as utf-8. If someone uses non-utf8 encoding for data on the git-annex branch, this can lead to an encoding error on windows. However, this commit doesn't actually make that any worse, because the union merge code would similarly fail with an encoding error on windows in that situation. This commit was sponsored by Kyle Meyer.
* support being run by ssh as ssh-askpass replacementGravatar Joey Hess2014-04-29
| | | | | | | | | To use, set GIT_ANNEX_SSHASKPASS to point to a fifo or regular file (FIFO is better, avoids touching disk or multiple readers) that contains the password. Then set SSH_ASKPASS=git-annex, and when ssh runs it, it will tell ssh the password. This is not yet used..
* use a subdir of GIT_ANNEX_TMP for ssh connection caching socketsGravatar Joey Hess2014-04-20
| | | | | To prevent any possible collisions with other, non-socket files, like the xmppgit directory.
* When init detects that git is not configured to commit, and sets user.email ↵Gravatar Joey Hess2014-04-20
| | | | | | | to work around the problem, also make it set user.name. I was able to reproduce git failing to commit despite user.email being set, in a test account on my laptop. The account had no GECOS information.
* 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.
* reinit: New command that can initialize a new reposotory using the ↵Gravatar Joey Hess2014-04-15
| | | | configuration of a previously known repository. Useful if a repository got deleted and you want to clone it back the way it was.
* Merge branch 'master' into remotecontrolGravatar Joey Hess2014-04-14
|\ | | | | | | | | Conflicts: doc/devblog/day_152__more_ssh_connection_caching.mdwn