import qualified Data.Map as M
defaultVersion :: RepoVersion
-defaultVersion = RepoVersion 8
+defaultVersion = RepoVersion 10
latestVersion :: RepoVersion
latestVersion = RepoVersion 10
, (RepoVersion 6, defaultVersion)
, (RepoVersion 7, defaultVersion)
, (RepoVersion 8, defaultVersion)
- , (RepoVersion 9, latestVersion)
+ , (RepoVersion 9, defaultVersion)
]
versionField :: ConfigKey
+git-annex (10.20220725) UNRELEASED; urgency=medium
+
+ * v8 repositories automatically upgrade to v9, which will in turn
+ automatically upgrade to v10 in a year's time.
+ To avoid this upgrade, you can set annex.autoupgraderepository to false.
+ * Use v10 by default for new repositories.
+
+ -- Joey Hess <id@joeyh.name> Mon, 25 Jul 2022 15:35:45 -0400
+
git-annex (10.20220724) upstream; urgency=medium
* filter-process: Fix a bug involving handling of empty files,
needsUpgrade :: RepoVersion -> Annex (Maybe String)
needsUpgrade v
- | v `elem` supportedVersions = ok
+ | v `elem` supportedVersions = case M.lookup v autoUpgradeableVersions of
+ Just newv | newv /= v -> ifM (annexAutoUpgradeRepository <$> Annex.getGitConfig)
+ ( runupgrade newv
+ , ok
+ )
+ _ -> ok
| otherwise = case M.lookup v autoUpgradeableVersions of
Nothing
| v `elem` upgradeableVersions ->
| otherwise ->
err "Upgrade git-annex."
Just newv -> ifM (annexAutoUpgradeRepository <$> Annex.getGitConfig)
- ( tryNonAsync (upgrade True newv) >>= \case
- Right True -> ok
- Right False -> err "Automatic upgrade failed!"
- Left ex -> err $ "Automatic upgrade exception! " ++ show ex
+ ( runupgrade newv
, err "Automatic upgrade is disabled by annex.autoupgraderepository configuration. To upgrade this repository: git-annex upgrade"
)
where
, show (fromRepoVersion v) ++ "."
, msg
]
+
ok = return Nothing
+ runupgrade newv = tryNonAsync (upgrade True newv) >>= \case
+ Right True -> ok
+ Right False -> err "Automatic upgrade failed!"
+ Left ex -> err $ "Automatic upgrade exception! " ++ show ex
+
upgrade :: Bool -> RepoVersion -> Annex Bool
upgrade automatic destversion = do
startversion <- getVersion
* `annex.autoupgraderepository`
- When an old git-annex repository version has become deprecated,
+ When an old git-annex repository version is no longer supported,
git-annex will normally automatically upgrade the repository to
- the new version.
+ the new version. It may also sometimes upgrade from an old repository
+ version that is still supported but that is not as good as a later
+ version.
If this is set to false, git-annex won't automatically upgrade the
- repository. Instead it will exit with an error message. You can run
- `git annex upgrade` yourself when you are ready to upgrade the
+ repository. If the repository version is not supported, git-annex
+ will instead exit with an error message. If it is still supported,
+ git-annex will continue to work.
+
+ You can run `git annex upgrade` yourself when you are ready to upgrade the
repository.
* `annex.crippledfilesystem`
## v8 -> v9 (git-annex version 10.x)
-v8 repositories are not yet automatically upgraded to v9.
+v8 repositories are automatically upgraded to v9.
v9 is a stepping stone to the v10 upgrade. By adding this intermediate
version, old versions of git-annex that only support v8 will not be able to
start new processes in the repository after the v9 upgrade.
+v9 also enables using `git-annex filter-process`. This can significantly
+speed up git operations involving unlocked files.
+
## v7 -> v8 (git-annex version 8.x)
v7 repositories are automatically upgraded to v8.
v6 repositories are automatically upgraded to v7.
The only difference between v6 and v7 is that some additional git hooks
-were added in v7. See below for details about what's new in v6/v7.
+were added in v7.
## v5 -> v6 (git-annex version 6.x)