increase repo version
This commit is contained in:
parent
4594bd51c1
commit
4651688290
2 changed files with 7 additions and 1 deletions
|
@ -31,10 +31,16 @@ upgrade = do
|
||||||
version <- getVersion
|
version <- getVersion
|
||||||
case version of
|
case version of
|
||||||
Just "0" -> upgradeFrom0
|
Just "0" -> upgradeFrom0
|
||||||
|
Just "1" -> upgradeFrom1
|
||||||
Nothing -> return True -- repo not initted yet, no version
|
Nothing -> return True -- repo not initted yet, no version
|
||||||
Just v | v == currentVersion -> return True
|
Just v | v == currentVersion -> return True
|
||||||
Just _ -> error "this version of git-annex is too old for this git repository!"
|
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 :: Annex Bool
|
||||||
upgradeFrom0 = do
|
upgradeFrom0 = do
|
||||||
showSideAction "Upgrading object directory layout..."
|
showSideAction "Upgrading object directory layout..."
|
||||||
|
|
|
@ -16,7 +16,7 @@ import qualified GitRepo as Git
|
||||||
import Locations
|
import Locations
|
||||||
|
|
||||||
currentVersion :: String
|
currentVersion :: String
|
||||||
currentVersion = "1"
|
currentVersion = "2"
|
||||||
|
|
||||||
versionField :: String
|
versionField :: String
|
||||||
versionField = "annex.version"
|
versionField = "annex.version"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue