diff options
author | Joey Hess <joeyh@joeyh.name> | 2015-12-15 15:56:37 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2015-12-15 16:00:26 -0400 |
commit | e3f058b6a8aa2548c8207bf9f5e74a49cfe87273 (patch) | |
tree | 46ea74f45a03b8bc432a71fd71d8b565b92a64d2 /Annex/Content.hs | |
parent | 59654d08a2335bf716f38b76095121c6e4c62535 (diff) |
implemented upgrade of direct mode repo to v6
Diffstat (limited to 'Annex/Content.hs')
-rw-r--r-- | Annex/Content.hs | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/Annex/Content.hs b/Annex/Content.hs index e99dfb1dd..4cd2b0259 100644 --- a/Annex/Content.hs +++ b/Annex/Content.hs @@ -753,13 +753,14 @@ moveBad key = do logStatus key InfoMissing return dest -data KeyLocation = InAnnex | InRepository +data KeyLocation = InAnnex | InRepository | InAnywhere {- List of keys whose content exists in the specified location. - InAnnex only lists keys with content in .git/annex/objects, - while InRepository, in direct mode, also finds keys with content - - in the work tree. + - in the work tree. InAnywhere lists all keys that have directories + - in .git/annex/objects, whether or not the content is present. - - Note that InRepository has to check whether direct mode files - have goodContent. @@ -788,6 +789,11 @@ getKeysPresent keyloc = do morekeys <- unsafeInterleaveIO a continue (morekeys++keys) as + inanywhere = case keyloc of + InAnywhere -> True + _ -> False + + present _ _ _ | inanywhere = pure True present _ False d = presentInAnnex d present s True d = presentDirect s d <||> presentInAnnex d @@ -800,6 +806,7 @@ getKeysPresent keyloc = do Nothing -> return False Just k -> Annex.eval s $ anyM (Direct.goodContent k) =<< Direct.associatedFiles k + InAnywhere -> return True {- In order to run Annex monad actions within unsafeInterleaveIO, - the current state is taken and reused. No changes made to this |