import Git.SharedRepository
import Annex.Perms
import Annex.Link
-import Annex.Content.Direct
+import qualified Annex.Content.Direct as Direct
import Annex.ReplaceFile
import Annex.LockPool
import Messages.Progress
checkdirect (loc:locs) = do
r <- check loc
if isgood r
- then ifM (goodContent key loc)
+ then ifM (Direct.goodContent key loc)
( return r
, checkdirect locs
)
v <- isAnnexLink f
if Just key == v
then do
- updateInodeCache key src
+ Direct.updateInodeCache key src
replaceFile f $ liftIO . moveFile src
chmodContent f
forM_ fs $
- addContentWhenNotPresent key f
- else ifM (goodContent key f)
+ Direct.addContentWhenNotPresent key f
+ else ifM (Direct.goodContent key f)
( storedirect' alreadyhave fs
, storedirect' fallback fs
)
indirect f = return $ Just (f, return True)
direct [] = return Nothing
direct (f:fs) = do
- cache <- recordedInodeCache key
+ cache <- Direct.recordedInodeCache key
-- check that we have a good file
- ifM (sameInodeCache f cache)
- ( return $ Just (f, sameInodeCache f cache)
+ ifM (Direct.sameInodeCache f cache)
+ ( return $ Just (f, Direct.sameInodeCache f cache)
, direct fs
)
withObjectLoc :: Key -> (FilePath -> Annex a) -> ([FilePath] -> Annex a) -> Annex a
withObjectLoc key indirect direct = ifM isDirect
( do
- fs <- associatedFiles key
+ fs <- Direct.associatedFiles key
if null fs
then goindirect
else direct fs
mapM_ (void . tryIO . resetPointerFile key)
=<< Database.Keys.getAssociatedFiles key
Database.Keys.removeInodeCaches key
- removeInodeCache key
+ Direct.removeInodeCache key
removedirect fs = do
- cache <- recordedInodeCache key
- removeInodeCache key
+ cache <- Direct.recordedInodeCache key
+ Direct.removeInodeCache key
mapM_ (resetfile cache) fs
- resetfile cache f = whenM (sameInodeCache f cache) $ do
+ resetfile cache f = whenM (Direct.sameInodeCache f cache) $ do
l <- calcRepo $ gitAnnexLink f key
secureErase f
replaceFile f $ makeAnnexLink l
InRepository -> case fileKey (takeFileName d) of
Nothing -> return False
Just k -> Annex.eval s $
- anyM (goodContent k) =<< associatedFiles k
+ anyM (Direct.goodContent k) =<< Direct.associatedFiles k
{- In order to run Annex monad actions within unsafeInterleaveIO,
- the current state is taken and reused. No changes made to this
+git-annex (6.20151225) unstable; urgency=medium
* annex.version increased to 6, but version 5 is also still supported.
* The upgrade to version 6 is not done fully automatically, because
* init: Configure .git/info/attributes to use git-annex as a smudge
filter. Note that this changes the default behavior of git add in a
newly initialized repository; it will add files to the annex.
+
+ -- Joey Hess <id@joeyh.name> Tue, 08 Dec 2015 11:14:03 -0400
git-annex (5.20151208) unstable; urgency=medium