diff options
author | Joey Hess <joeyh@joeyh.name> | 2016-01-07 14:21:12 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2016-01-07 14:21:12 -0400 |
commit | 3729ee0549993ccb648b7f798c9c400661350cdf (patch) | |
tree | 2aa2ca2dfb48b0724bf1bb6fde4040e9d06fdcc9 /Command/Migrate.hs | |
parent | 4a05793349c55477cde81455810bfe57444ae9bf (diff) |
migrate: Copy over metadata to new key.
Diffstat (limited to 'Command/Migrate.hs')
-rw-r--r-- | Command/Migrate.hs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Command/Migrate.hs b/Command/Migrate.hs index b8d2eea87..ad3a5efa1 100644 --- a/Command/Migrate.hs +++ b/Command/Migrate.hs @@ -17,6 +17,7 @@ import Annex.Content import qualified Command.ReKey import qualified Command.Fsck import qualified Annex +import Logs.MetaData cmd :: Command cmd = notDirect $ withGlobalOptions annexedMatchingOptions $ @@ -73,7 +74,8 @@ perform file oldkey oldbackend newbackend = go =<< genkey | knowngoodcontent = finish newkey | otherwise = stopUnless checkcontent $ finish newkey checkcontent = Command.Fsck.checkBackend oldbackend oldkey Command.Fsck.KeyLocked $ Just file - finish newkey = stopUnless (Command.ReKey.linkKey oldkey newkey) $ + finish newkey = stopUnless (Command.ReKey.linkKey oldkey newkey) $ do + copyMetaData oldkey newkey next $ Command.ReKey.cleanup file oldkey newkey genkey = case maybe Nothing (\fm -> fm oldkey newbackend (Just file)) (fastMigrate oldbackend) of Just newkey -> return $ Just (newkey, True) |