diff options
-rw-r--r-- | Annex/Version.hs | 11 | ||||
-rw-r--r-- | Command/Direct.hs | 2 | ||||
-rw-r--r-- | Command/Indirect.hs | 2 | ||||
-rw-r--r-- | Command/Upgrade.hs | 2 | ||||
-rw-r--r-- | Init.hs | 3 | ||||
-rw-r--r-- | Upgrade/V1.hs | 4 | ||||
-rw-r--r-- | debian/changelog | 3 | ||||
-rw-r--r-- | doc/upgrades.mdwn | 5 |
8 files changed, 23 insertions, 9 deletions
diff --git a/Annex/Version.hs b/Annex/Version.hs index 6149e6fb7..31c6501be 100644 --- a/Annex/Version.hs +++ b/Annex/Version.hs @@ -1,6 +1,6 @@ {- git-annex repository versioning - - - Copyright 2010 Joey Hess <joey@kitenet.net> + - Copyright 2010,2013 Joey Hess <joey@kitenet.net> - - Licensed under the GNU GPL version 3 or higher. -} @@ -16,8 +16,11 @@ type Version = String defaultVersion :: Version defaultVersion = "3" +directModeVersion :: Version +directModeVersion = "4" + supportedVersions :: [Version] -supportedVersions = [defaultVersion] +supportedVersions = [defaultVersion, directModeVersion] upgradableVersions :: [Version] upgradableVersions = ["0", "1", "2"] @@ -28,8 +31,8 @@ versionField = annexConfig "version" getVersion :: Annex (Maybe Version) getVersion = annexVersion <$> Annex.getGitConfig -setVersion :: Annex () -setVersion = setConfig versionField defaultVersion +setVersion :: Version -> Annex () +setVersion = setConfig versionField removeVersion :: Annex () removeVersion = unsetConfig versionField diff --git a/Command/Direct.hs b/Command/Direct.hs index 0c007bb10..d847a3270 100644 --- a/Command/Direct.hs +++ b/Command/Direct.hs @@ -14,6 +14,7 @@ import qualified Git.Command import qualified Git.LsFiles import Config import Annex.Direct +import Annex.Version def :: [Command] def = [notBareRepo $ @@ -53,4 +54,5 @@ cleanup :: CommandCleanup cleanup = do showStart "direct" "" setDirect True + setVersion directModeVersion return True diff --git a/Command/Indirect.hs b/Command/Indirect.hs index ac97be753..8bf228a80 100644 --- a/Command/Indirect.hs +++ b/Command/Indirect.hs @@ -17,6 +17,7 @@ import qualified Annex import Annex.Direct import Annex.Content import Annex.CatFile +import Annex.Version import Init def :: [Command] @@ -88,6 +89,7 @@ perform = do cleanup :: CommandCleanup cleanup = do + setVersion defaultVersion showStart "indirect" "" showEndOk return True diff --git a/Command/Upgrade.hs b/Command/Upgrade.hs index b39fcd99c..d1c1eb3b0 100644 --- a/Command/Upgrade.hs +++ b/Command/Upgrade.hs @@ -23,5 +23,5 @@ start :: CommandStart start = do showStart "upgrade" "." r <- upgrade - setVersion + setVersion defaultVersion next $ next $ return r @@ -42,9 +42,9 @@ genDescription Nothing = do initialize :: Maybe String -> Annex () initialize mdescription = do prepUUID + setVersion defaultVersion checkCrippledFileSystem Annex.Branch.create - setVersion gitPreCommitHookWrite createInodeSentinalFile u <- getUUID @@ -143,3 +143,4 @@ checkCrippledFileSystem = whenM (probeCrippledFileSystem) $ do maybe noop (`toDirect` f) =<< isAnnexLink f void $ liftIO clean setDirect True + setVersion directModeVersion diff --git a/Upgrade/V1.hs b/Upgrade/V1.hs index 966b51a44..72e105d16 100644 --- a/Upgrade/V1.hs +++ b/Upgrade/V1.hs @@ -53,14 +53,14 @@ upgrade = do ifM (fromRepo Git.repoIsLocalBare) ( do moveContent - setVersion + setVersion defaultVersion , do moveContent updateSymlinks moveLocationLogs Annex.Queue.flush - setVersion + setVersion defaultVersion ) Upgrade.V2.upgrade diff --git a/debian/changelog b/debian/changelog index 4d63ef9b8..091d16d1d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,5 +1,6 @@ -git-annex (3.20130217) UNRELEASED; urgency=low +git-annex (4.20130217) UNRELEASED; urgency=low + * annex.version is now set to 4 for direct mode repositories. * Should now fully support git repositories with core.symlinks=false; always using git's pseudosymlink files in such repositories. * webapp: Allow creating repositories on filesystems that lack support for diff --git a/doc/upgrades.mdwn b/doc/upgrades.mdwn index c4aac5348..6cf54477c 100644 --- a/doc/upgrades.mdwn +++ b/doc/upgrades.mdwn @@ -18,6 +18,11 @@ conflicts first before upgrading git-annex. ## Upgrade events, so far +### v3 -> v4 (git-annex version 4.x) + +v4 is only used for [[direct_mode]], and no upgrade needs to be done from +existing v3 repositories, they will continue to work. + ### v2 -> v3 (git-annex version 3.x) Involved moving the .git-annex/ directory into a separate git-annex branch. |