Don't list S3 as a remote type when built without S3 support.

This commit is contained in:
Joey Hess 2012-01-05 23:10:19 -04:00
parent ad43f03626
commit c371c40a88
4 changed files with 13 additions and 18 deletions

View file

@ -55,14 +55,14 @@ import qualified Remote.Web
import qualified Remote.Hook import qualified Remote.Hook
remoteTypes :: [RemoteType] remoteTypes :: [RemoteType]
remoteTypes = remoteTypes = catMaybes
[ Remote.Git.remote [ Just Remote.Git.remote
, Remote.S3.remote , Remote.S3.remote
, Remote.Bup.remote , Just Remote.Bup.remote
, Remote.Directory.remote , Just Remote.Directory.remote
, Remote.Rsync.remote , Just Remote.Rsync.remote
, Remote.Web.remote , Just Remote.Web.remote
, Remote.Hook.remote , Just Remote.Hook.remote
] ]
{- Builds a list of all available Remotes. {- Builds a list of all available Remotes.

View file

@ -28,8 +28,8 @@ import Crypto
import Annex.Content import Annex.Content
import Utility.Base64 import Utility.Base64
remote :: RemoteType remote :: Maybe RemoteType
remote = RemoteType { remote = Just $ RemoteType {
typename = "S3", typename = "S3",
enumerate = findSpecialRemotes "s3", enumerate = findSpecialRemotes "s3",
generate = gen, generate = gen,
@ -58,7 +58,7 @@ gen' r u c cst =
hasKeyCheap = False, hasKeyCheap = False,
config = c, config = c,
repo = r, repo = r,
remotetype = remote remotetype = fromJust remote
} }
s3Setup :: UUID -> RemoteConfig -> Annex RemoteConfig s3Setup :: UUID -> RemoteConfig -> Annex RemoteConfig

View file

@ -1,13 +1,7 @@
-- stub for when hS3 is not available -- stub for when hS3 is not available
module Remote.S3 (remote) where module Remote.S3 (remote) where
import Types.Remote
import Types import Types
remote :: RemoteType remote :: Maybe RemoteType
remote = RemoteType { remote = Nothing
typename = "S3",
enumerate = return [],
generate = error "S3 not enabled",
setup = error "S3 not enabled"
}

1
debian/changelog vendored
View file

@ -1,6 +1,7 @@
git-annex (3.20120106) UNRELEASED; urgency=low git-annex (3.20120106) UNRELEASED; urgency=low
* Support unescaped repository urls, like git does. * Support unescaped repository urls, like git does.
* Don't list S3 as a remote type when built without S3 support.
-- Joey Hess <joeyh@debian.org> Thu, 05 Jan 2012 14:29:30 -0400 -- Joey Hess <joeyh@debian.org> Thu, 05 Jan 2012 14:29:30 -0400