diff options
author | Joey Hess <joeyh@joeyh.name> | 2015-12-09 19:43:15 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2015-12-09 19:43:15 -0400 |
commit | 66ea81055c2773b9fe0c67db0122784ab6db4913 (patch) | |
tree | 4c954c1a50f7cf4ca8b56ea26757cb53fab92a78 | |
parent | 960a2951476f463da3163c6bb3d18949c0b3f084 (diff) |
make clear when code is using deprecated direct mode files
-rw-r--r-- | Annex/Content.hs | 28 | ||||
-rw-r--r-- | debian/changelog | 3 |
2 files changed, 17 insertions, 14 deletions
diff --git a/Annex/Content.hs b/Annex/Content.hs index d73132a0e..12859c856 100644 --- a/Annex/Content.hs +++ b/Annex/Content.hs @@ -63,7 +63,7 @@ import Config 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 @@ -100,7 +100,7 @@ inAnnex' isgood bad check key = withObjectLoc key checkindirect checkdirect 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 ) @@ -471,12 +471,12 @@ moveAnnex key src = withObjectLoc key storeobject storedirect 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 ) @@ -551,10 +551,10 @@ prepSendAnnex key = withObjectLoc key indirect direct 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 ) @@ -566,7 +566,7 @@ prepSendAnnex key = withObjectLoc key indirect direct 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 @@ -605,12 +605,12 @@ removeAnnex (ContentRemovalLock key) = withObjectLoc key remove removedirect 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 @@ -713,7 +713,7 @@ getKeysPresent keyloc = do 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 diff --git a/debian/changelog b/debian/changelog index 97dc5fab9..ed1e32b73 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,4 @@ +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 @@ -8,6 +9,8 @@ * 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 |