Merge branch 'master' into git-remote-annex
This commit is contained in:
commit
ff5193c6ad
137 changed files with 2031 additions and 325 deletions
|
@ -174,11 +174,14 @@ needsUpgrade key = or
|
|||
]
|
||||
|
||||
trivialMigrate :: Key -> Backend -> AssociatedFile -> Bool -> Annex (Maybe Key)
|
||||
trivialMigrate oldkey newbackend afile _inannex = trivialMigrate' oldkey newbackend afile
|
||||
<$> (annexMaxExtensionLength <$> Annex.getGitConfig)
|
||||
trivialMigrate oldkey newbackend afile _inannex = do
|
||||
c <- Annex.getGitConfig
|
||||
return $ trivialMigrate' oldkey newbackend afile
|
||||
(annexMaxExtensionLength c)
|
||||
(annexMaxExtensions c)
|
||||
|
||||
trivialMigrate' :: Key -> Backend -> AssociatedFile -> Maybe Int -> Maybe Key
|
||||
trivialMigrate' oldkey newbackend afile maxextlen
|
||||
trivialMigrate' :: Key -> Backend -> AssociatedFile -> Maybe Int -> Maybe Int -> Maybe Key
|
||||
trivialMigrate' oldkey newbackend afile maxextlen maxexts
|
||||
{- Fast migration from hashE to hash backend. -}
|
||||
| migratable && hasExt oldvariety = Just $ alterKey oldkey $ \d -> d
|
||||
{ keyName = S.toShort (keyHash oldkey)
|
||||
|
@ -189,7 +192,7 @@ trivialMigrate' oldkey newbackend afile maxextlen
|
|||
AssociatedFile Nothing -> Nothing
|
||||
AssociatedFile (Just file) -> Just $ alterKey oldkey $ \d -> d
|
||||
{ keyName = S.toShort $ keyHash oldkey
|
||||
<> selectExtension maxextlen file
|
||||
<> selectExtension maxextlen maxexts file
|
||||
, keyVariety = newvariety
|
||||
}
|
||||
{- Upgrade to fix bad previous migration that created a
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue