Merge branch 'bs' into sqlite-bs
This commit is contained in:
commit
d5628a16b8
137 changed files with 827 additions and 516 deletions
|
@ -84,7 +84,7 @@ updateSymlinks :: Annex ()
|
|||
updateSymlinks = do
|
||||
showAction "updating symlinks"
|
||||
top <- fromRepo Git.repoPath
|
||||
(files, cleanup) <- inRepo $ LsFiles.inRepo [toRawFilePath top]
|
||||
(files, cleanup) <- inRepo $ LsFiles.inRepo [top]
|
||||
forM_ files (fixlink . fromRawFilePath)
|
||||
void $ liftIO cleanup
|
||||
where
|
||||
|
@ -236,12 +236,13 @@ logFile1 repo key = Upgrade.V2.gitStateDir repo ++ keyFile1 key ++ ".log"
|
|||
logFile2 :: Key -> Git.Repo -> String
|
||||
logFile2 = logFile' (hashDirLower def)
|
||||
|
||||
logFile' :: (Key -> FilePath) -> Key -> Git.Repo -> String
|
||||
logFile' :: (Key -> RawFilePath) -> Key -> Git.Repo -> String
|
||||
logFile' hasher key repo =
|
||||
gitStateDir repo ++ hasher key ++ keyFile key ++ ".log"
|
||||
gitStateDir repo ++ fromRawFilePath (hasher key) ++ keyFile key ++ ".log"
|
||||
|
||||
stateDir :: FilePath
|
||||
stateDir = addTrailingPathSeparator ".git-annex"
|
||||
|
||||
gitStateDir :: Git.Repo -> FilePath
|
||||
gitStateDir repo = addTrailingPathSeparator $ Git.repoPath repo </> stateDir
|
||||
gitStateDir repo = addTrailingPathSeparator $
|
||||
fromRawFilePath (Git.repoPath repo) </> stateDir
|
||||
|
|
|
@ -139,5 +139,7 @@ gitAttributesUnWrite repo = do
|
|||
|
||||
stateDir :: FilePath
|
||||
stateDir = addTrailingPathSeparator ".git-annex"
|
||||
|
||||
gitStateDir :: Git.Repo -> FilePath
|
||||
gitStateDir repo = addTrailingPathSeparator $ Git.repoPath repo </> stateDir
|
||||
gitStateDir repo = addTrailingPathSeparator $
|
||||
fromRawFilePath (Git.repoPath repo) </> stateDir
|
||||
|
|
|
@ -108,7 +108,7 @@ convertDirect = do
|
|||
upgradeDirectWorkTree :: Annex ()
|
||||
upgradeDirectWorkTree = do
|
||||
top <- fromRepo Git.repoPath
|
||||
(l, clean) <- inRepo $ Git.LsFiles.stagedDetails [toRawFilePath top]
|
||||
(l, clean) <- inRepo $ Git.LsFiles.stagedDetails [top]
|
||||
forM_ l go
|
||||
void $ liftIO clean
|
||||
where
|
||||
|
@ -125,7 +125,7 @@ upgradeDirectWorkTree = do
|
|||
, fromdirect (fromRawFilePath f) k
|
||||
)
|
||||
Database.Keys.addAssociatedFile k
|
||||
=<< inRepo (toTopFilePath (fromRawFilePath f))
|
||||
=<< inRepo (toTopFilePath f)
|
||||
go _ = noop
|
||||
|
||||
fromdirect f k = ifM (Direct.goodContent k f)
|
||||
|
@ -135,7 +135,7 @@ upgradeDirectWorkTree = do
|
|||
-- is just not populated with it. Since the work tree
|
||||
-- file is recorded as an associated file, things will
|
||||
-- still work that way, it's just not ideal.
|
||||
ic <- withTSDelta (liftIO . genInodeCache f)
|
||||
ic <- withTSDelta (liftIO . genInodeCache (toRawFilePath f))
|
||||
void $ Content.linkToAnnex k f ic
|
||||
, unlessM (Content.inAnnex k) $ do
|
||||
-- Worktree file was deleted or modified;
|
||||
|
|
|
@ -81,7 +81,7 @@ switchHEADBack = maybe noop switch =<< inRepo Git.Branch.currentUnsafe
|
|||
associatedFiles :: Key -> Annex [FilePath]
|
||||
associatedFiles key = do
|
||||
files <- associatedFilesRelative key
|
||||
top <- fromRepo Git.repoPath
|
||||
top <- fromRawFilePath <$> fromRepo Git.repoPath
|
||||
return $ map (top </>) files
|
||||
|
||||
{- List of files in the tree that are associated with a key, relative to
|
||||
|
@ -107,7 +107,9 @@ removeAssociatedFiles key = do
|
|||
- expected mtime and inode.
|
||||
-}
|
||||
goodContent :: Key -> FilePath -> Annex Bool
|
||||
goodContent key file = sameInodeCache file =<< recordedInodeCache key
|
||||
goodContent key file =
|
||||
sameInodeCache (toRawFilePath file)
|
||||
=<< recordedInodeCache key
|
||||
|
||||
{- Gets the recorded inode cache for a key.
|
||||
-
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue