lost some bookkeeping info
I forgot to convert this to use Annex.Ingest, todo later.
This commit is contained in:
parent
9d3474ef1b
commit
7c02f070b1
1 changed files with 7 additions and 3 deletions
|
@ -14,6 +14,7 @@ import Annex.Link
|
||||||
import Annex.MetaData
|
import Annex.MetaData
|
||||||
import Annex.FileMatcher
|
import Annex.FileMatcher
|
||||||
import Annex.InodeSentinal
|
import Annex.InodeSentinal
|
||||||
|
import Annex.Ingest
|
||||||
import Utility.InodeCache
|
import Utility.InodeCache
|
||||||
import Types.KeySource
|
import Types.KeySource
|
||||||
import Backend
|
import Backend
|
||||||
|
@ -74,7 +75,7 @@ clean file = do
|
||||||
if isJust (parseLinkOrPointer b)
|
if isJust (parseLinkOrPointer b)
|
||||||
then liftIO $ B.hPut stdout b
|
then liftIO $ B.hPut stdout b
|
||||||
else ifM (shouldAnnex file)
|
else ifM (shouldAnnex file)
|
||||||
( liftIO . emitPointer =<< ingest file
|
( liftIO . emitPointer =<< ingestLocal file
|
||||||
, liftIO $ B.hPut stdout b
|
, liftIO $ B.hPut stdout b
|
||||||
)
|
)
|
||||||
stop
|
stop
|
||||||
|
@ -84,8 +85,9 @@ shouldAnnex file = do
|
||||||
matcher <- largeFilesMatcher
|
matcher <- largeFilesMatcher
|
||||||
checkFileMatcher matcher file
|
checkFileMatcher matcher file
|
||||||
|
|
||||||
ingest :: FilePath -> Annex Key
|
-- TODO: Use main ingest code instead?
|
||||||
ingest file = do
|
ingestLocal :: FilePath -> Annex Key
|
||||||
|
ingestLocal file = do
|
||||||
backend <- chooseBackend file
|
backend <- chooseBackend file
|
||||||
ic <- withTSDelta (liftIO . genInodeCache file)
|
ic <- withTSDelta (liftIO . genInodeCache file)
|
||||||
let source = KeySource
|
let source = KeySource
|
||||||
|
@ -105,6 +107,8 @@ ingest file = do
|
||||||
LinkAnnexNoop -> noop
|
LinkAnnexNoop -> noop
|
||||||
genMetaData k file
|
genMetaData k file
|
||||||
=<< liftIO (getFileStatus file)
|
=<< liftIO (getFileStatus file)
|
||||||
|
cleanOldKeys file k
|
||||||
|
Database.Keys.addAssociatedFile k file
|
||||||
return k
|
return k
|
||||||
|
|
||||||
emitPointer :: Key -> IO ()
|
emitPointer :: Key -> IO ()
|
||||||
|
|
Loading…
Add table
Reference in a new issue