glacier: Do not try to run glacier value create when an existing glacier remote is enabled.
This commit is contained in:
parent
3029179fb5
commit
7d288d83c9
2 changed files with 7 additions and 5 deletions
|
@ -73,11 +73,12 @@ gen r u c gc = new <$> remoteCost gc veryExpensiveRemoteCost
|
||||||
glacierSetup :: Maybe UUID -> Maybe CredPair -> RemoteConfig -> Annex (RemoteConfig, UUID)
|
glacierSetup :: Maybe UUID -> Maybe CredPair -> RemoteConfig -> Annex (RemoteConfig, UUID)
|
||||||
glacierSetup mu mcreds c = do
|
glacierSetup mu mcreds c = do
|
||||||
u <- maybe (liftIO genUUID) return mu
|
u <- maybe (liftIO genUUID) return mu
|
||||||
glacierSetup' u mcreds c
|
glacierSetup' (isJust mu) u mcreds c
|
||||||
glacierSetup' :: UUID -> Maybe CredPair -> RemoteConfig -> Annex (RemoteConfig, UUID)
|
glacierSetup' :: Bool -> UUID -> Maybe CredPair -> RemoteConfig -> Annex (RemoteConfig, UUID)
|
||||||
glacierSetup' u mcreds c = do
|
glacierSetup' enabling u mcreds c = do
|
||||||
c' <- encryptionSetup c
|
c' <- encryptionSetup c
|
||||||
let fullconfig = c' `M.union` defaults
|
let fullconfig = c' `M.union` defaults
|
||||||
|
unless enabling $
|
||||||
genVault fullconfig u
|
genVault fullconfig u
|
||||||
gitConfigSpecialRemote u fullconfig "glacier" "true"
|
gitConfigSpecialRemote u fullconfig "glacier" "true"
|
||||||
c'' <- setRemoteCredPair fullconfig (AWS.creds u) mcreds
|
c'' <- setRemoteCredPair fullconfig (AWS.creds u) mcreds
|
||||||
|
@ -245,7 +246,6 @@ archive r k = fileprefix ++ key2file k
|
||||||
where
|
where
|
||||||
fileprefix = M.findWithDefault "" "fileprefix" $ config r
|
fileprefix = M.findWithDefault "" "fileprefix" $ config r
|
||||||
|
|
||||||
-- glacier vault create will succeed even if the vault already exists.
|
|
||||||
genVault :: RemoteConfig -> UUID -> Annex ()
|
genVault :: RemoteConfig -> UUID -> Annex ()
|
||||||
genVault c u = unlessM (runGlacier c u params) $
|
genVault c u = unlessM (runGlacier c u params) $
|
||||||
error "Failed creating glacier vault."
|
error "Failed creating glacier vault."
|
||||||
|
|
2
debian/changelog
vendored
2
debian/changelog
vendored
|
@ -18,6 +18,8 @@ git-annex (5.20140211) UNRELEASED; urgency=medium
|
||||||
and the annex.numcopies git config setting.
|
and the annex.numcopies git config setting.
|
||||||
* trust, untrust, semitrust, dead: Warn when the trust level is
|
* trust, untrust, semitrust, dead: Warn when the trust level is
|
||||||
overridden in .git/config.
|
overridden in .git/config.
|
||||||
|
* glacier: Do not try to run glacier value create when an existing glacier
|
||||||
|
remote is enabled.
|
||||||
* Windows webapp: Can set up box.com, Amazon S3, and rsync.net remotes
|
* Windows webapp: Can set up box.com, Amazon S3, and rsync.net remotes
|
||||||
* Windows webapp: Can create repos on removable drives.
|
* Windows webapp: Can create repos on removable drives.
|
||||||
* Windows: Ensure HOME is set, as needed by bundled cygwin utilities.
|
* Windows: Ensure HOME is set, as needed by bundled cygwin utilities.
|
||||||
|
|
Loading…
Add table
Reference in a new issue