move old direct mode stuff out of Annex.Locations
This commit is contained in:
parent
d7da4ee00a
commit
b1eb47599a
2 changed files with 15 additions and 27 deletions
|
@ -20,8 +20,6 @@ module Annex.Locations (
|
|||
gitAnnexLink,
|
||||
gitAnnexLinkCanonical,
|
||||
gitAnnexContentLock,
|
||||
gitAnnexMapping,
|
||||
gitAnnexInodeCache,
|
||||
gitAnnexInodeSentinal,
|
||||
gitAnnexInodeSentinalCache,
|
||||
annexLocations,
|
||||
|
@ -68,7 +66,6 @@ module Annex.Locations (
|
|||
gitAnnexJournalDir',
|
||||
gitAnnexJournalLock,
|
||||
gitAnnexGitQueueLock,
|
||||
gitAnnexMergeLock,
|
||||
gitAnnexIndex,
|
||||
gitAnnexIndexStatus,
|
||||
gitAnnexViewIndex,
|
||||
|
@ -161,9 +158,6 @@ gitAnnexLocationDepth config = hashlevels + 1
|
|||
-
|
||||
- When the file is not present, returns the location where the file should
|
||||
- be stored.
|
||||
-
|
||||
- This does not take direct mode into account, so in direct mode it is not
|
||||
- the actual location of the file's content.
|
||||
-}
|
||||
gitAnnexLocation :: Key -> Git.Repo -> GitConfig -> IO RawFilePath
|
||||
gitAnnexLocation key r config = gitAnnexLocation' key r config
|
||||
|
@ -237,21 +231,6 @@ gitAnnexContentLock key r config = do
|
|||
loc <- gitAnnexLocation key r config
|
||||
return $ loc <> ".lck"
|
||||
|
||||
{- File that maps from a key to the file(s) in the git repository.
|
||||
- Used in direct mode. -}
|
||||
gitAnnexMapping :: Key -> Git.Repo -> GitConfig -> IO RawFilePath
|
||||
gitAnnexMapping key r config = do
|
||||
loc <- gitAnnexLocation key r config
|
||||
return $ loc <> ".map"
|
||||
|
||||
{- File that caches information about a key's content, used to determine
|
||||
- if a file has changed.
|
||||
- Used in direct mode. -}
|
||||
gitAnnexInodeCache :: Key -> Git.Repo -> GitConfig -> IO RawFilePath
|
||||
gitAnnexInodeCache key r config = do
|
||||
loc <- gitAnnexLocation key r config
|
||||
return $ loc <> ".cache"
|
||||
|
||||
gitAnnexInodeSentinal :: Git.Repo -> RawFilePath
|
||||
gitAnnexInodeSentinal r = gitAnnexDir r P.</> "sentinal"
|
||||
|
||||
|
@ -435,8 +414,8 @@ gitAnnexFeedStateDir r = P.addTrailingPathSeparator $
|
|||
gitAnnexFeedState :: Key -> Git.Repo -> RawFilePath
|
||||
gitAnnexFeedState k r = gitAnnexFeedStateDir r P.</> keyFile k
|
||||
|
||||
{- .git/annex/merge/ is used as a empty work tree for direct mode merges and
|
||||
- merges in adjusted branches. -}
|
||||
{- .git/annex/merge/ is used as a empty work tree for merges in
|
||||
- adjusted branches. -}
|
||||
gitAnnexMergeDir :: Git.Repo -> FilePath
|
||||
gitAnnexMergeDir r = fromRawFilePath $
|
||||
P.addTrailingPathSeparator $ gitAnnexDir r P.</> "merge"
|
||||
|
@ -466,10 +445,6 @@ gitAnnexJournalLock r = gitAnnexDir r P.</> "journal.lck"
|
|||
gitAnnexGitQueueLock :: Git.Repo -> RawFilePath
|
||||
gitAnnexGitQueueLock r = gitAnnexDir r P.</> "gitqueue.lck"
|
||||
|
||||
{- Lock file for direct mode merge. -}
|
||||
gitAnnexMergeLock :: Git.Repo -> FilePath
|
||||
gitAnnexMergeLock r = fromRawFilePath $ gitAnnexDir r P.</> "merge.lck"
|
||||
|
||||
{- .git/annex/index is used to stage changes to the git-annex branch -}
|
||||
gitAnnexIndex :: Git.Repo -> RawFilePath
|
||||
gitAnnexIndex r = gitAnnexDir r P.</> "index"
|
||||
|
|
|
@ -128,3 +128,16 @@ removeInodeCache key = withInodeCacheFile key $ \f ->
|
|||
|
||||
withInodeCacheFile :: Key -> (RawFilePath -> Annex a) -> Annex a
|
||||
withInodeCacheFile key a = a =<< calcRepo (gitAnnexInodeCache key)
|
||||
|
||||
{- File that maps from a key to the file(s) in the git repository. -}
|
||||
gitAnnexMapping :: Key -> Git.Repo -> GitConfig -> IO RawFilePath
|
||||
gitAnnexMapping key r c = do
|
||||
loc <- gitAnnexLocation key r c
|
||||
return $ loc <> ".map"
|
||||
|
||||
{- File that caches information about a key's content, used to determine
|
||||
- if a file has changed. -}
|
||||
gitAnnexInodeCache :: Key -> Git.Repo -> GitConfig -> IO RawFilePath
|
||||
gitAnnexInodeCache key r c = do
|
||||
loc <- gitAnnexLocation key r c
|
||||
return $ loc <> ".cache"
|
||||
|
|
Loading…
Add table
Reference in a new issue