reorg
This commit is contained in:
parent
ae4d20d157
commit
76ba2d0030
2 changed files with 11 additions and 8 deletions
|
@ -221,14 +221,7 @@ describeCmd description = do
|
||||||
gitAdd log $ Just $ "description for UUID " ++ (show u)
|
gitAdd log $ Just $ "description for UUID " ++ (show u)
|
||||||
liftIO $ putStrLn "description set"
|
liftIO $ putStrLn "description set"
|
||||||
|
|
||||||
{- Updates the LocationLog when a key's presence changes. -}
|
-- helpers
|
||||||
logStatus :: Key -> LogStatus -> Annex ()
|
|
||||||
logStatus key status = do
|
|
||||||
g <- Annex.gitRepo
|
|
||||||
u <- getUUID g
|
|
||||||
f <- liftIO $ logChange g key u status
|
|
||||||
gitAdd f Nothing -- all logs are committed at end
|
|
||||||
|
|
||||||
inBackend file yes no = do
|
inBackend file yes no = do
|
||||||
r <- Backend.lookupFile file
|
r <- Backend.lookupFile file
|
||||||
case (r) of
|
case (r) of
|
||||||
|
|
10
Core.hs
10
Core.hs
|
@ -10,6 +10,7 @@ import System.Path
|
||||||
|
|
||||||
import Types
|
import Types
|
||||||
import Locations
|
import Locations
|
||||||
|
import LocationLog
|
||||||
import UUID
|
import UUID
|
||||||
import qualified GitRepo as Git
|
import qualified GitRepo as Git
|
||||||
import qualified Annex
|
import qualified Annex
|
||||||
|
@ -94,3 +95,12 @@ calcGitLink file key = do
|
||||||
Nothing -> error $ "unable to normalize " ++ file
|
Nothing -> error $ "unable to normalize " ++ file
|
||||||
return $ (relPathDirToDir (parentDir absfile) (Git.workTree g)) ++
|
return $ (relPathDirToDir (parentDir absfile) (Git.workTree g)) ++
|
||||||
annexLocationRelative g key
|
annexLocationRelative g key
|
||||||
|
|
||||||
|
{- Updates the LocationLog when a key's presence changes. -}
|
||||||
|
logStatus :: Key -> LogStatus -> Annex ()
|
||||||
|
logStatus key status = do
|
||||||
|
g <- Annex.gitRepo
|
||||||
|
u <- getUUID g
|
||||||
|
f <- liftIO $ logChange g key u status
|
||||||
|
gitAdd f Nothing -- all logs are committed at end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue