Bugfix: When fsck detected and moved away corrupt file content, it did not update the location log.
This commit is contained in:
parent
14e0d01b58
commit
bc2df77642
3 changed files with 5 additions and 1 deletions
|
@ -147,6 +147,7 @@ moveBad key = do
|
||||||
liftIO $ allowWrite (parentDir src)
|
liftIO $ allowWrite (parentDir src)
|
||||||
liftIO $ renameFile src dest
|
liftIO $ renameFile src dest
|
||||||
liftIO $ removeDirectory (parentDir src)
|
liftIO $ removeDirectory (parentDir src)
|
||||||
|
logStatus key ValueMissing
|
||||||
return dest
|
return dest
|
||||||
|
|
||||||
{- List of keys whose content exists in .git/annex/objects/ -}
|
{- List of keys whose content exists in .git/annex/objects/ -}
|
||||||
|
|
2
debian/changelog
vendored
2
debian/changelog
vendored
|
@ -19,6 +19,8 @@ git-annex (0.22) UNRELEASED; urgency=low
|
||||||
* Look for dir.git directories the same as git does.
|
* Look for dir.git directories the same as git does.
|
||||||
* Support remote urls specified as relative paths.
|
* Support remote urls specified as relative paths.
|
||||||
* Support non-ssh remote paths that contain tilde expansions.
|
* Support non-ssh remote paths that contain tilde expansions.
|
||||||
|
* Bugfix: When fsck detected and moved away corrupt file content, it did
|
||||||
|
not update the location log.
|
||||||
|
|
||||||
-- Joey Hess <joeyh@debian.org> Sun, 13 Feb 2011 00:48:02 -0400
|
-- Joey Hess <joeyh@debian.org> Sun, 13 Feb 2011 00:48:02 -0400
|
||||||
|
|
||||||
|
|
3
test.hs
3
test.hs
|
@ -367,13 +367,14 @@ test_fsck = "git-annex fsck" ~: TestList [basicfsck, withlocaluntrusted, withrem
|
||||||
git_annex "fsck" ["-q"] @? "fsck failed with numcopies=2 and 2 copies"
|
git_annex "fsck" ["-q"] @? "fsck failed with numcopies=2 and 2 copies"
|
||||||
git_annex "untrust" ["-q", "origin"] @? "untrust of origin failed"
|
git_annex "untrust" ["-q", "origin"] @? "untrust of origin failed"
|
||||||
fsck_should_fail "content not replicated to enough non-untrusted repositories"
|
fsck_should_fail "content not replicated to enough non-untrusted repositories"
|
||||||
|
|
||||||
corrupt f = do
|
corrupt f = do
|
||||||
git_annex "get" ["-q", f] @? "get of file failed"
|
git_annex "get" ["-q", f] @? "get of file failed"
|
||||||
Content.allowWrite f
|
Content.allowWrite f
|
||||||
writeFile f (changedcontent f)
|
writeFile f (changedcontent f)
|
||||||
r <- git_annex "fsck" ["-q"]
|
r <- git_annex "fsck" ["-q"]
|
||||||
not r @? "fsck failed to fail with corrupted file content"
|
not r @? "fsck failed to fail with corrupted file content"
|
||||||
git_annex "fsck" ["-q"] @? "fsck unexpectedly failed again; previous one did not fix problem"
|
git_annex "fsck" ["-q"] @? "fsck unexpectedly failed again; previous one did not fix problem with " ++ f
|
||||||
fsck_should_fail m = do
|
fsck_should_fail m = do
|
||||||
r <- git_annex "fsck" ["-q"]
|
r <- git_annex "fsck" ["-q"]
|
||||||
not r @? "fsck failed to fail with " ++ m
|
not r @? "fsck failed to fail with " ++ m
|
||||||
|
|
Loading…
Add table
Reference in a new issue