migrate: Copy url logs for keys when migrating.
This commit is contained in:
parent
b4015064e1
commit
ec169f84b1
5 changed files with 19 additions and 8 deletions
|
@ -14,6 +14,7 @@ import qualified Types.Key
|
|||
import Annex.Content
|
||||
import qualified Command.Add
|
||||
import Backend
|
||||
import Logs.Web
|
||||
|
||||
command :: [Command]
|
||||
command = [repoCommand "migrate" paramPaths seek
|
||||
|
@ -65,6 +66,14 @@ perform file oldkey newbackend = do
|
|||
then do
|
||||
-- Update symlink to use the new key.
|
||||
liftIO $ removeFile file
|
||||
|
||||
-- If the old key had some
|
||||
-- associated urls, record them for
|
||||
-- the new key as well.
|
||||
urls <- getUrls oldkey
|
||||
when (not $ null urls) $
|
||||
mapM_ (setUrlPresent newkey) urls
|
||||
|
||||
next $ Command.Add.cleanup file newkey True
|
||||
else stop
|
||||
where
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue