aboutsummaryrefslogtreecommitdiff
path: root/Test.hs
Commit message (Collapse)AuthorAge
* improve git-annex-shell exit status propigationGravatar Joey Hess2017-03-20
|
* test move with ssh remoteGravatar Joey Hess2017-03-17
|
* test suite infra for testing mocked ssh remotesGravatar Joey Hess2017-03-17
| | | | This commit was supported by the NSF-funded DataLad project.
* add KeyVariety typeGravatar Joey Hess2017-02-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Where before the "name" of a key and a backend was a string, this makes it a concrete data type. This is groundwork for allowing some varieties of keys to be disabled in file2key, so git-annex won't use them at all. Benchmarks ran in my big repo: old git-annex info: real 0m3.338s user 0m3.124s sys 0m0.244s new git-annex info: real 0m3.216s user 0m3.024s sys 0m0.220s new git-annex find: real 0m7.138s user 0m6.924s sys 0m0.252s old git-annex find: real 0m7.433s user 0m7.240s sys 0m0.232s Surprising result; I'd have expected it to be slower since it now parses all the key varieties. But, the parser is very simple and perhaps sharing KeyVarieties uses less memory or something like that. This commit was supported by the NSF-funded DataLad project.
* factor non-type stuff out of KeyGravatar Joey Hess2017-02-24
|
* correct spelling mistakesGravatar Edward Betts2017-02-12
|
* import: Changed how --deduplicate, --skip-duplicates, and --clean-duplicates ↵Gravatar Joey Hess2017-02-07
| | | | | | | | | | | | | | | | | | | | | determine if a file is a duplicate Before, only content known to be present somewhere was considered a duplicate. Now, any content that has been annexed before will be considered a duplicate, even if all annexed copies of the data have been lost. Note that --clean-duplicates and --deduplicate still check numcopies, so won't delete duplicate files unless there's an annexed copy. This makes import use the same method as reinject --known. The man page already said that duplicate meant "its content is either present in the local repository already, or git-annex knows of another repository that contains it, or it was present in the annex before but has been removed now". So, this is really only bringing the implementation into line with the man page. This commit was sponsored by Jochen Bartl on Patreon.
* Always use filesystem encoding for all file and handle reads and writes.Gravatar Joey Hess2016-12-24
| | | | | This is a big scary change. I have convinced myself it should be safe. I hope!
* 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.
* add test case for sync_in_adjusted_branch_deleted_recently_added_filesGravatar Joey Hess2016-10-11
| | | | This commit was sponsored by Denis Dzyubenko on Patreon.
* squelch build warning on windowsGravatar Joey Hess2016-09-06
|
* 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.
* 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.
* add test case for ↵Gravatar Joey Hess2016-06-13
| | | | http://git-annex.branchable.com/bugs/Assistant_keeps_deleting_all_the_files_in_my_repo/
* reproducedGravatar Joey Hess2016-06-13
|
* update test suite for lock/unlock with missing file content change in v6Gravatar Joey Hess2016-06-09
|
* better failure diagnosisGravatar Joey Hess2016-06-03
|
* plumb RemoteGitConfig through to decryptCipherGravatar Joey Hess2016-05-23
|
* fix recent test suite reversionGravatar Joey Hess2016-05-23
| | | | | | git annex adjust --force will overwrite any current adjusted branch. I didn't document this because for the user, deleting the branch is just as good.
* fix test suite breakageGravatar Joey Hess2016-05-23
|
* adjusted branches need git 2.2.0 or newerGravatar Joey Hess2016-04-22
| | | | | | When git-annex is used with a git version older than 2.2.0, disable support for adjusted branches, since GIT_COMMON_DIR is needed to update them and was first added in that version of git.
* use a separate tmp dir for the test homeGravatar Joey Hess2016-04-20
|
* a couple of tests chdir in ways that need an absolute path in the overridden ↵Gravatar Joey Hess2016-04-20
| | | | HOME
* Isolate test suite from global git config settings.Gravatar Joey Hess2016-04-20
|
* add simple test for conflict resolution in adjusted branchGravatar Joey Hess2016-04-12
| | | | This is not really extensive enough, but a start..
* don't assume git-annex is in path when calling itself from test suiteGravatar Joey Hess2016-02-16
|
* 100% pass on FATGravatar Joey Hess2016-02-16
|
* fix numerous problem with test suite on crippled filesystems etcGravatar Joey Hess2016-02-16
|
* avoid fromkey test when on crippled fsGravatar Joey Hess2016-02-15
|
* skip v6 locked tests on windows, not supportedGravatar Joey Hess2016-02-15
|
* test case for recent sync --content reversionGravatar Joey Hess2016-01-26
|
* remove 163 lines of code without changing anything except importsGravatar Joey Hess2016-01-20
|
* defer deletion of test repos until end, fixes sqlite crashGravatar Joey Hess2016-01-08
| | | | | | | | The crash turned out to be caused by the sqlite database being deleted out from under sqlite before it was done with it. Since multiple git_annex calls are done in the same process while running the test suite, the DbHandle could linger until GCed, and the test repo, and thus sqlite database be deleted before the workerThread was done.
* view: Avoid using cute unicode homomorphs for '/' and '\' and instead use ↵Gravatar Joey Hess2016-01-08
| | | | ugly escaping, as the unicode method doesn't work on non-unicode supporting systems.
* fix broken testGravatar Joey Hess2016-01-07
|
* unused: deal with v6 unlocked file that is implicitly ingested by git diff etcGravatar Joey Hess2016-01-06
|
* unused: Bug fix when a new file was added to the annex, and then removed ↵Gravatar Joey Hess2016-01-06
| | | | | | | | (but not git rmed). git still has the add staged in this case, so the content should not be unused and was wrongly treated as such. So, we need to look at both the file on disk to see if it's a annex link, and the file in the index too. lookupFile doesn't look in the index if the file is not present on disk.
* skip fix test in unlocked v6 passGravatar Joey Hess2016-01-06
| | | | fix is not relevant for unlocked files
* fix testGravatar Joey Hess2016-01-06
| | | | | | | have to change the content of unlocked file before committing otherwise git commit will fail in v6 mode when the file was already unlocked, because no changes have been made
* fix testGravatar Joey Hess2016-01-06
| | | | file is locked here, so use right test.
* fix test failure locking an unlocked not present fileGravatar Joey Hess2016-01-06
| | | | | | | | In v5, that was not possible, but it is in v6, and so the test was failing. Investigating, it turns out that locking was copying the pointer file content to the annex object despite the content not being present. So, add a check to prevent that.
* test: Added --keep-failures option.Gravatar Joey Hess2016-01-06
|
* fix some tests of v6 unlocked filesGravatar Joey Hess2016-01-05
|
* remporarily disable v6 unlocked test pass while it's failingGravatar Joey Hess2016-01-01
|
* scan for unlocked files on init/upgrade of v6 repoGravatar Joey Hess2016-01-01
|
* started working on testing v6 unlocked filesGravatar Joey Hess2016-01-01
| | | | Many failures.
* add test: conflict resolution (mixed locked and unlocked file)Gravatar Joey Hess2015-12-30
|
* test suite 100% pass in v6, finally!Gravatar Joey Hess2015-12-30
| | | | | Set annex.largefiles when adding the conflicting non-annexed file, otherwise it would be added as an annexed file.
* fix failing git-annex unused test case in v6Gravatar Joey Hess2015-12-30
| | | | | | | | | | | | | WorkTree.lookupFile was finding a key for a file that's deleted from the work tree, which is different than the v5 behavior (though perhaps the same as the direct mode behavior). Fix by checking that the work tree file exists before catting its key. Hopefully this won't slow down much, probably the catKey is much more expensive. I can't see any way to optimise this, except perhaps to make Command.Unused check if work tree files exist before/after calling lookupFile. But, it seems better to make lookupFile really only find keys for worktree files; that's what it's intended to do.
* set annex.largefiles earlier in test suiteGravatar Joey Hess2015-12-30
| | | | The ingitfile was having git run it through the clean filter in some cases.