New migrate subcommand can be used to switch files to using a different backend, safely and with no duplication of content.
This commit is contained in:
parent
32b0e10390
commit
a78b0555e1
8 changed files with 112 additions and 17 deletions
|
@ -42,11 +42,12 @@ perform (file, backend) = do
|
|||
stored <- Backend.storeFileKey file backend
|
||||
case stored of
|
||||
Nothing -> return Nothing
|
||||
Just (key, _) -> return $ Just $ cleanup file key
|
||||
Just (key, _) -> do
|
||||
moveAnnex key file
|
||||
return $ Just $ cleanup file key
|
||||
|
||||
cleanup :: FilePath -> Key -> CommandCleanup
|
||||
cleanup file key = do
|
||||
moveAnnex key file
|
||||
logStatus key ValuePresent
|
||||
|
||||
link <- calcGitLink file key
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue