diff options
-rw-r--r-- | Command/Upgrade.hs | 4 | ||||
-rw-r--r-- | Upgrade.hs | 12 | ||||
-rw-r--r-- | debian/changelog | 3 |
3 files changed, 13 insertions, 6 deletions
diff --git a/Command/Upgrade.hs b/Command/Upgrade.hs index 66ea0e0eb..c6c0f7a8c 100644 --- a/Command/Upgrade.hs +++ b/Command/Upgrade.hs @@ -25,8 +25,4 @@ start :: CommandStart start = do showStart "upgrade" "." r <- upgrade False - ifM isDirect - ( setVersion directModeVersion - , setVersion defaultVersion - ) next $ next $ return r diff --git a/Upgrade.hs b/Upgrade.hs index fe5dd887d..7385268e8 100644 --- a/Upgrade.hs +++ b/Upgrade.hs @@ -1,6 +1,6 @@ {- git-annex upgrade support - - - Copyright 2010 Joey Hess <joey@kitenet.net> + - Copyright 2010, 2013 Joey Hess <joey@kitenet.net> - - Licensed under the GNU GPL version 3 or higher. -} @@ -11,6 +11,7 @@ module Upgrade where import Common.Annex import Annex.Version +import Config #ifndef mingw32_HOST_OS import qualified Upgrade.V0 import qualified Upgrade.V1 @@ -36,7 +37,14 @@ needsUpgrade v ok = return Nothing upgrade :: Bool -> Annex Bool -upgrade automatic = go =<< getVersion +upgrade automatic = do + upgraded <- go =<< getVersion + when upgraded $ + ifM isDirect + ( setVersion directModeVersion + , setVersion defaultVersion + ) + return upgraded where #ifndef mingw32_HOST_OS go (Just "0") = Upgrade.V0.upgrade diff --git a/debian/changelog b/debian/changelog index fdc0bd3fd..ee18b4450 100644 --- a/debian/changelog +++ b/debian/changelog @@ -14,6 +14,9 @@ git-annex (5.20131121) UNRELEASED; urgency=low in the webapp when they use the new guarded direct mode. * Added support for quvi 0.9. Slightly suboptimal due to limitations in its interface compared with the old version. + * Bug fix: annex.version did not get set on automatic + upgrade to v5 direct mode repo, so the upgrade was performed + repeatedly, slowing commands down. -- Joey Hess <joeyh@debian.org> Wed, 20 Nov 2013 18:30:47 -0400 |