2013-11-05 20:42:59 +00:00
|
|
|
{- git-annex v4 -> v5 uppgrade support
|
|
|
|
-
|
2015-01-21 16:50:09 +00:00
|
|
|
- Copyright 2013 Joey Hess <id@joeyh.name>
|
2013-11-05 20:42:59 +00:00
|
|
|
-
|
|
|
|
- Licensed under the GNU GPL version 3 or higher.
|
|
|
|
-}
|
|
|
|
|
|
|
|
module Upgrade.V4 where
|
|
|
|
|
|
|
|
import Common.Annex
|
|
|
|
import Config
|
|
|
|
import Annex.Direct
|
|
|
|
|
2013-12-29 17:06:23 +00:00
|
|
|
{- Direct mode only upgrade. v4 to v5 indirect update is a no-op -}
|
2013-11-05 20:42:59 +00:00
|
|
|
upgrade :: Bool -> Annex Bool
|
|
|
|
upgrade automatic = ifM isDirect
|
|
|
|
( do
|
|
|
|
unless automatic $
|
|
|
|
showAction "v4 to v5"
|
|
|
|
setDirect True
|
|
|
|
return True
|
2013-12-29 17:06:23 +00:00
|
|
|
, return True
|
2013-11-05 20:42:59 +00:00
|
|
|
)
|