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.
This commit is contained in:
parent
33ebdaebd6
commit
3e9db00d2d
3 changed files with 13 additions and 6 deletions
|
@ -25,8 +25,4 @@ start :: CommandStart
|
|||
start = do
|
||||
showStart "upgrade" "."
|
||||
r <- upgrade False
|
||||
ifM isDirect
|
||||
( setVersion directModeVersion
|
||||
, setVersion defaultVersion
|
||||
)
|
||||
next $ next $ return r
|
||||
|
|
12
Upgrade.hs
12
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
|
||||
|
|
3
debian/changelog
vendored
3
debian/changelog
vendored
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue