jump right to v8, don't stop part way
* init --version: When the version given is one that automatically upgrades to a newer version, use the newer version instead. * Auto upgrades from older repo versions, like v5, now jump right to v8.
This commit is contained in:
parent
08d0b44f4d
commit
1bb32098d6
5 changed files with 36 additions and 5 deletions
|
@ -36,11 +36,11 @@ upgradableVersions = map RepoVersion [2..7]
|
||||||
|
|
||||||
autoUpgradeableVersions :: M.Map RepoVersion RepoVersion
|
autoUpgradeableVersions :: M.Map RepoVersion RepoVersion
|
||||||
autoUpgradeableVersions = M.fromList
|
autoUpgradeableVersions = M.fromList
|
||||||
[ (RepoVersion 3, RepoVersion 5)
|
[ (RepoVersion 3, latestVersion)
|
||||||
, (RepoVersion 4, RepoVersion 5)
|
, (RepoVersion 4, latestVersion)
|
||||||
, (RepoVersion 5, RepoVersion 6)
|
, (RepoVersion 5, latestVersion)
|
||||||
, (RepoVersion 6, RepoVersion 7)
|
, (RepoVersion 6, latestVersion)
|
||||||
, (RepoVersion 7, RepoVersion 8)
|
, (RepoVersion 7, latestVersion)
|
||||||
]
|
]
|
||||||
|
|
||||||
versionField :: ConfigKey
|
versionField :: ConfigKey
|
||||||
|
|
|
@ -29,6 +29,9 @@ git-annex (8.20200221) UNRELEASED; urgency=medium
|
||||||
on the locale.
|
on the locale.
|
||||||
* annex.maxextensionlength used to be the number of characters, not
|
* annex.maxextensionlength used to be the number of characters, not
|
||||||
bytes, when in a utf-8 locale. It's now always the number of bytes.
|
bytes, when in a utf-8 locale. It's now always the number of bytes.
|
||||||
|
* init --version: When the version given is one that automatically
|
||||||
|
upgrades to a newer version, use the newer version instead.
|
||||||
|
* Auto upgrades from older repo versions, like v5, now jump right to v8.
|
||||||
|
|
||||||
-- Joey Hess <id@joeyh.name> Wed, 19 Feb 2020 12:48:58 -0400
|
-- Joey Hess <id@joeyh.name> Wed, 19 Feb 2020 12:48:58 -0400
|
||||||
|
|
||||||
|
|
|
@ -49,3 +49,5 @@ lucky and it's passable Haskell, I'd be happy to send a patch.
|
||||||
|
|
||||||
[[!meta author=kyle]]
|
[[!meta author=kyle]]
|
||||||
[[!tag projects/datalad]]
|
[[!tag projects/datalad]]
|
||||||
|
|
||||||
|
> [[fixed|done]] --[[Joey]]
|
||||||
|
|
|
@ -0,0 +1,23 @@
|
||||||
|
[[!comment format=mdwn
|
||||||
|
username="joey"
|
||||||
|
subject="""comment 1"""
|
||||||
|
date="2020-02-24T17:13:45Z"
|
||||||
|
content="""
|
||||||
|
Your patch is perfectly fine haskell code.
|
||||||
|
|
||||||
|
But, looking at it, the problem is deeper than init --version.
|
||||||
|
Running git-annex in a v3 repo produces a v5 repo,
|
||||||
|
then running git-annex again produces a v6 repo,
|
||||||
|
then v7, then v8.
|
||||||
|
|
||||||
|
So the problem is really that autoUpgradeableVersions
|
||||||
|
should map everything to latestVersion. At least currently,
|
||||||
|
since all versions should be upgraded to v8.
|
||||||
|
|
||||||
|
(Really it could just be a list of versions that all
|
||||||
|
are assumed to upgrade to latestVersion, but I left it a map
|
||||||
|
in case at some point there are two concurrent version
|
||||||
|
tracks without an autoupgrade between them.)
|
||||||
|
|
||||||
|
Anyway, attach a git format-patch next time so I can git am it. :)
|
||||||
|
"""]]
|
|
@ -36,6 +36,9 @@ to the user who tries to run git-annex init.
|
||||||
Force the repository to be initialized using a different annex.version
|
Force the repository to be initialized using a different annex.version
|
||||||
than the current default.
|
than the current default.
|
||||||
|
|
||||||
|
When the version given is one that automatically upgrades to a newer
|
||||||
|
version, it will automatically use the newer version instead.
|
||||||
|
|
||||||
# SEE ALSO
|
# SEE ALSO
|
||||||
|
|
||||||
[[git-annex]](1)
|
[[git-annex]](1)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue