increase repo version

This commit is contained in:
Joey Hess 2011-03-15 22:08:19 -04:00
parent 4594bd51c1
commit 4651688290
2 changed files with 7 additions and 1 deletions

View file

@ -31,10 +31,16 @@ upgrade = do
version <- getVersion
case version of
Just "0" -> upgradeFrom0
Just "1" -> upgradeFrom1
Nothing -> return True -- repo not initted yet, no version
Just v | v == currentVersion -> return True
Just _ -> error "this version of git-annex is too old for this git repository!"
upgradeFrom1 :: Annex Bool
upgradeFrom1 = do
showSideAction "Upgrading object directory layout..."
error "upgradeFrom1 TODO FIXME"
upgradeFrom0 :: Annex Bool
upgradeFrom0 = do
showSideAction "Upgrading object directory layout..."

View file

@ -16,7 +16,7 @@ import qualified GitRepo as Git
import Locations
currentVersion :: String
currentVersion = "1"
currentVersion = "2"
versionField :: String
versionField = "annex.version"