summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2011-03-29 18:21:05 -0400
committerGravatar Joey Hess <joey@kitenet.net>2011-03-29 18:21:05 -0400
commit3adb48f46a553e8de926e2ce93ea5162dd589111 (patch)
tree16eca2edd55e6788bf9d9cd24ccd42f9ca37c438
parentd8154eaad3f39e045d7abba187a7d2c1399b89dc (diff)
more S3 docs
-rw-r--r--Remote/S3.hs11
-rw-r--r--doc/install.mdwn1
-rw-r--r--doc/walkthrough/using_Amazon_S3.mdwn6
3 files changed, 15 insertions, 3 deletions
diff --git a/Remote/S3.hs b/Remote/S3.hs
index 3265ced78..b3a910639 100644
--- a/Remote/S3.hs
+++ b/Remote/S3.hs
@@ -71,7 +71,7 @@ genRemote r u c cst = this
name = Git.repoDescribe r,
storeKey = s3Store this,
retrieveKeyFile = s3Retrieve this,
- removeKey = error "TODO removekey",
+ removeKey = s3Remove this,
hasKey = s3CheckPresent this,
hasKeyCheap = False,
config = c
@@ -178,3 +178,12 @@ s3Retrieve r k f = s3Action r $ \(conn, bucket) -> do
Left e -> do
warning $ prettyReqError e
return False
+
+s3Remove :: Remote Annex -> Key -> Annex Bool
+s3Remove r k = s3Action r $ \(conn, bucket) -> do
+ res <- liftIO $ deleteObject conn $ bucketKey bucket k L.empty
+ case res of
+ Right _ -> return True
+ Left e -> do
+ warning $ prettyReqError e
+ return False
diff --git a/doc/install.mdwn b/doc/install.mdwn
index 050166323..7b2c536c9 100644
--- a/doc/install.mdwn
+++ b/doc/install.mdwn
@@ -13,6 +13,7 @@ To build and use git-annex, you will need:
* MissingH: <http://github.com/jgoerzen/missingh/wiki>
* pcre-light: <http://hackage.haskell.org/package/pcre-light>
* utf8-string: <http://hackage.haskell.org/package/utf8-string>
+* hS3: <http://hackage.haskell.org/package/hS3>
* `uuid`: <http://www.ossp.org/pkg/lib/uuid/>
(or uuidgen from util-linux)
* `xargs`: <http://savannah.gnu.org/projects/findutils/>
diff --git a/doc/walkthrough/using_Amazon_S3.mdwn b/doc/walkthrough/using_Amazon_S3.mdwn
index e0d229662..b8eb7da53 100644
--- a/doc/walkthrough/using_Amazon_S3.mdwn
+++ b/doc/walkthrough/using_Amazon_S3.mdwn
@@ -10,12 +10,14 @@ First, export your S3 credentials:
# export ANNEX_S3_ACCESS_KEY_ID="08TJMT99S3511WOZEP91"
# export ANNEX_S3_SECRET_ACCESS_KEY="s3kr1t"
-Next, create the S3 remote.
+Next, create the S3 remote, and describe it.
# git annex initremote mys3 type=S3 encryption=none
initremote mys3 (checking bucket) (creating bucket in US) ok
+ # git annex describe mys3 "at Amazon's US datacenter"
+ describe mys3 ok
-The configuration for the S3 remote is stored in git. So to make a different
+The configuration for the S3 remote is stored in git. So to make another
repository use the same S3 remote is easy:
# cd /media/usb/annex