init --version=6 upgrade to 8 not yet 10

autoUpgradeableVersions had latestVersion (10), but it did not make
sense for asking for old version 6 to get version 10, while asking for
version 8 got version 8. So use defaultVersion (8) instead.

Sponsored-by: Dartmouth College's Datalad project
This commit is contained in:
Joey Hess 2022-01-25 13:52:42 -04:00
parent fa57da0f34
commit a27776f602
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
3 changed files with 19 additions and 7 deletions

View file

@ -36,13 +36,13 @@ upgradeableVersions = map RepoVersion [2..10]
autoUpgradeableVersions :: M.Map RepoVersion RepoVersion
autoUpgradeableVersions = M.fromList
[ (RepoVersion 3, latestVersion)
, (RepoVersion 4, latestVersion)
, (RepoVersion 5, latestVersion)
, (RepoVersion 6, latestVersion)
, (RepoVersion 7, latestVersion)
, (RepoVersion 8, latestVersion)
, (RepoVersion 9, latestVersion)
[ (RepoVersion 3, defaultVersion)
, (RepoVersion 4, defaultVersion)
, (RepoVersion 5, defaultVersion)
, (RepoVersion 6, defaultVersion)
, (RepoVersion 7, defaultVersion)
, (RepoVersion 8, defaultVersion)
, (RepoVersion 9, defaultVersion)
]
versionField :: ConfigKey

View file

@ -65,3 +65,5 @@ supported repository versions: 8 9 10
upgrade supported from repository versions: 0 1 2 3 4 5 6 7 8 9 10
local repository version: 8
```
> [[fixed|done]] --[[Joey]]

View file

@ -0,0 +1,10 @@
[[!comment format=mdwn
username="joey"
subject="""comment 2"""
date="2022-01-25T17:42:32Z"
content="""
Scratch that about `git-annex init --version`; v8 does not automatically
upgrade to v10 yet, so why should v6? I agree that seems like a bug.
fixed
"""]]