summaryrefslogtreecommitdiff
path: root/Annex
Commit message (Collapse)AuthorAge
* fsck: Don't claim to fix direct mode when run on a symlink whose content is ↵Gravatar Joey Hess2013-07-08
| | | | not present.
* detect system with no dot in FQDN, where git commit will fail, and workaroundGravatar Joey Hess2013-07-05
| | | | | Sigh, git is so *fragile*. Or rather, across the set of systems that use git-annex, where are no many horribly broken systems..
* moved AssociatedFile definitionGravatar Joey Hess2013-07-04
|
* avoid failure creating inode sentinal fileGravatar Joey Hess2013-06-18
| | | | | | Test suite on windows failed running git annex init in a bare clone of an annexed repo. The annex directory didn't exist when it tried to write the inode sentinal file.
* Revert "Windows: Ssh connection caching is now supported."Gravatar Joey Hess2013-06-17
| | | | | | Yeah, that didn't actually work. Got error messages like it couldn't read from the control socket, so probably ssh doesn't really support that on Windows, at least the cygwin ssh build I'm using.
* Windows: Ssh connection caching is now supported.Gravatar Joey Hess2013-06-17
| | | | Turns out the socket stuff just works on windows.
* avoid lazy read of file contentsGravatar Joey Hess2013-06-17
| | | | | | | On Windows, that means the file could still be open when later code wants to delete it, which fails. Since we're only reading 8k anyway, just read it, strictly. However, avoid reading the whole file strictly, so no getContentsStrict here.
* typo in commentGravatar Joey Hess2013-06-17
|
* assistant: In direct mode, objects are now only dropped when all associated ↵Gravatar Joey Hess2013-06-15
| | | | files are unwanted. This avoids a repreated drop/get loop of a file that has a copy in an archive directory, and a copy not in an archive directory. (Indirect mode still has some buggy behavior in this area, since it does not keep track of associated files.) Closes: #712060
* avoid warnings when built with ghc 7.6Gravatar Joey Hess2013-06-02
|
* remove debug printGravatar Joey Hess2013-05-27
|
* Merge branch 'robustness'Gravatar Joey Hess2013-05-25
|\
| * make direct mode merge cleanup more robustGravatar Joey Hess2013-05-25
| | | | | | | | | | | | | | | | If the cleanup of a single file fails for some reason, continue to clean up other files. This could happen because of a race. The merge pulls in a change to a file, which gets changed locally at the same time.
| * improve robustness of fromDirect and replaceFileGravatar Joey Hess2013-05-25
| | | | | | | | | | | | | | | | | | Made fromDirect check that a file in the tree has good content (and is not a broken symlink either) before copying it to another file that has the same key. Made replaceFile clean up the temp file if the action that creates it, or the file replacement action fails.
* | assistant: Work around git-cat-file's not reloading the index after files ↵Gravatar Joey Hess2013-05-25
| | | | | | | | | | | | are staged. Argh.
* | refactorGravatar Joey Hess2013-05-24
|/
* XMPP: Avoid redundant and unncessary pushes. Note that this breaks ↵Gravatar Joey Hess2013-05-21
| | | | compatibility with previous versions of git-annex, which will refuse to accept any XMPP pushes from this version.
* update inode cache after copying contentGravatar Joey Hess2013-05-20
| | | | | | | This was also tripped by the test suite's automatic conflict resolution test. Which also shows BTW that an unnecessary copy of content is done sometimes when merging in direct mode. Not going to try to speed that up now.
* didn't quite get removeDirect right before, this passes test suiteGravatar Joey Hess2013-05-20
|
* Fix a bug in the git-annex branch handling code that could cause info from a ↵Gravatar Joey Hess2013-05-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | remote to not be merged and take effect immediately. This bug was turned up by the test suite, running fsck in direct mode. A repository was cloned, was put into direct mode, was fscked, and fsck incorrectly said that no copy existed of a file, that was actually present in origin. This turned out to occur because fsck first did a Annex.Branch.change, recording that it did not locally have the file. That was recorded in the journal. Since neither the git annex direct not the fsck had yet needed to read any info from the branch, but had only made changes to it, the origin/git-annex branch was not yet merged in. So the journal got a location log entry written to it, but this did not include the location log info for the origin. When fsck then did a Annex.Branch.get, it trusted the journal was cosnsitent, and returned it, again w/o merging from origin/git-annex. This latter behavior is the actual bug. Refer to commit e9bfa8eaed3ff59a4c0bc8d4d677bc493177807c for the thinking behind it being ok to make a change to a file on the branch, without first merging the branch. That thinking still stands. However, it means that files in the journal cannot be trusted to be consistent if the branch has not been merged. So, to fix, just enure the branch gets merged, even when reading from the journal. In tests, this does not seem to cause any extra merging. Except, of course, in the one case described above. But git annex add, etc, are able to make changes w/o first merging the branch.
* minor optimisation and warning fixGravatar Joey Hess2013-05-20
|
* direct mode bug fix: After a conflicted merge was automatically resolved, ↵Gravatar Joey Hess2013-05-20
| | | | | | | | | | | | | | | | | the content of a file that was already present could incorrectly be replaced with a symlink. The bug was in movein, which just replaceFile'd the file with a symlink, even if it already had the desired content, before trying to pull the content out of the annex and replace the symlink with it. That was ok-ish for non conflicted merges, where if the file existed it would be an old version of the content. But for conflicted merges, the automatic merge resolver has already run, and will have already put the desired content into the file for the local variant. Also, made removeDirect not trust that the associated files map is correct. Only if it can verify that another file has the content will it not move it into .git/annex/objects.
* Switch to MonadCatchIO-transformers for better handling of state while ↵Gravatar Joey Hess2013-05-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | catching exceptions. As seen in this bug report, the lifted exception handling using the StateT monad throws away state changes when an action throws an exception. http://git-annex.branchable.com/bugs/git_annex_fork_bombs_on_gpg_file/ .. Which can result in cached values being redundantly calculated, or other possibly worse bugs when the annex state gets out of sync with reality. This switches from a StateT AnnexState to a ReaderT (MVar AnnexState). All changes to the state go via the MVar. So when an Annex action is running inside an exception handler, and it makes some changes, they immediately go into affect in the MVar. If it then throws an exception (or even crashes its thread!), the state changes are still in effect. The MonadCatchIO-transformers change is actually only incidental. I could have kept on using lifted-base for the exception handling. However, I'd have needed to write a new instance of MonadBaseControl for the new monad.. and I didn't write the old instance.. I begged Bas and he kindly sent it to me. Happily, MonadCatchIO-transformers is able to derive a MonadCatchIO instance for my monad. This is a deep level change. It passes the test suite! What could it break? Well.. The most likely breakage would be to code that runs an Annex action in an exception handler, and *wants* state changes to be thrown away. Perhaps the state changes leaves the state inconsistent, or wrong. Since there are relatively few places in git-annex that catch exceptions in the Annex monad, and the AnnexState is generally just used to cache calculated data, this is unlikely to be a problem. Oh yeah, this change also makes Assistant.Types.ThreadedMonad a bit redundant. It's now entirely possible to run concurrent Annex actions in different threads, all sharing access to the same state! The ThreadedMonad just adds some extra work on top of that, with its own MVar, and avoids such actions possibly stepping on one-another's toes. I have not gotten rid of it, but might try that later. Being able to run concurrent Annex actions would simplify parts of the Assistant code.
* warningGravatar Joey Hess2013-05-19
|
* improve handling of receiving object in direct mode when associated files ↵Gravatar Joey Hess2013-05-17
| | | | | | | | | | | | are modified Before, if a direct mode repo had one or more associated files that were modifed, moving the object into it would overwrite the associated files with the pristine object. Now, modified associated files are left unchanged. To ensure that, when an object is moved into a direct mode repo, it's not thrown away, it gets stored in indirect mode.
* store copy in inode cache tooGravatar Joey Hess2013-05-17
|
* test suite passes in direct modeGravatar Joey Hess2013-05-17
| | | | | | | | | | | This fixes a bug with git annex add in direct mode. If some files already existed in the tree pointing at the same key as a file that was just added, and their content was not present, add neglected to copy the content to those files. I also changed the behavior of moveAnnex slightly: When content is moved into the annex in direct mode, it does not overwrite any content already present in direct mode files. That content may be modified after all.
* fix android build, broken by changes for windows portGravatar Joey Hess2013-05-16
|
* Merge branch 'master' into windowsGravatar Joey Hess2013-05-15
|\
| * fix toDirectGen bug introduced in 7d345fcb307cfecb5fa834a0b17be01e4e6f5df8Gravatar Joey Hess2013-05-15
| |
| * start one git-cat-file per index fileGravatar Joey Hess2013-05-15
| | | | | | | | | | | | | | This reverts a5031031f0d596b2381a785925beb574d90a862e and properly fixes the issue discussed there. This makes git-annex behave much nicer in direct mode.
* | fix the day's Windows permissions damageGravatar Joey Hess2013-05-14
| |
* | convert from internal git path when checking symlink standin fileGravatar Joey Hess2013-05-14
| |
* | Merge remote-tracking branch 'gnu/windows' into windowsGravatar Joey Hess2013-05-14
|\ \
* | | fix importsGravatar Joey Hess2013-05-14
| | |
| * | always try to read symlink; only fall back to looking inside fileGravatar Joey Hess2013-05-14
|/ / | | | | | | | | | | On Windows with Cygwin, checking out a git-annex repo will create symlinks on disk, so we need to always try to read the symlink, even when core.symlinks says they're not supported.
* | fix importsGravatar Joey Hess2013-05-14
| |
* | Merge branch 'windows' of git://git-annex.branchable.com into windowsGravatar Joey Hess2013-05-13
|\ \
* | | read inode cache file strictly to avoid failure to drop on windowsGravatar Joey Hess2013-05-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | Seems that Windows doesn't allow deleting a file that the same process has open. Here the inode cache file was read and a the value from it gets used later. But due to laziness, the old file is still open when it gets deleted. Adding strictness avoids this problem. Of course, the file is small, so it's no problem to read it all strictly, so this is probably an improvement even outside of Windows.
| | * fix warningsGravatar Joey Hess2013-05-13
| | |
| * | rename moduleGravatar Joey Hess2013-05-12
| | |
| * | fix the day's windows permissions damageGravatar Joey Hess2013-05-12
|/ /
* | deal with git using / internally, even on DOSGravatar Joey Hess2013-05-12
| |
* | fixGravatar Joey Hess2013-05-12
| |
* | deal with dos path separatorsGravatar Joey Hess2013-05-12
| |
* | fix permission damage (thanks, Windows)Gravatar Joey Hess2013-05-11
| |
* | clean up from windows portingGravatar Joey Hess2013-05-11
| |
* | git-annex now builds on Windows (doesn't work)Gravatar Joey Hess2013-05-11
| |
* | fixup #if 0 stubs to use #ifndef mingw32_HOST_OSGravatar Joey Hess2013-05-10
| | | | | | | | | | | | That's needed in files used to build the configure program. For the other files, I'm keeping my __WINDOWS__ define, as I find that much easier to type. I may search and replace it to use the mingw32_HOST_OS thing later.
* | stub out POSIX stuffGravatar Joey Hess2013-05-10
|/