When auto-upgrading a v3 remote, avoid upgrading to version 6, instead keep it at version 5.

Fixes a bug introduced with v6 mode that I didn't notice until now.
Probably not many v3 repos left out there, and upgrading them to v6 mode
is not disastrous, only a little premature.

This commit was sponsored by Riku Voipio
This commit is contained in:
Joey Hess 2016-10-05 16:23:09 -04:00
parent f23446b60e
commit f867fc157f
No known key found for this signature in database
GPG key ID: C910D9222512E3C7
6 changed files with 14 additions and 11 deletions

View file

@ -19,7 +19,6 @@ import qualified Annex.Queue
import qualified Git
import qualified Git.LsFiles as LsFiles
import Backend
import Annex.Version
import Utility.FileMode
import Utility.Tmp
import qualified Upgrade.V2
@ -52,16 +51,13 @@ upgrade = do
showAction "v1 to v2"
ifM (fromRepo Git.repoIsLocalBare)
( do
moveContent
setVersion latestVersion
( moveContent
, do
moveContent
updateSymlinks
moveLocationLogs
Annex.Queue.flush
setVersion latestVersion
)
Upgrade.V2.upgrade