summaryrefslogtreecommitdiff
path: root/Remote
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2013-03-15 19:16:13 -0400
committerGravatar Joey Hess <joey@kitenet.net>2013-03-15 19:16:13 -0400
commiteabe9d8c6177318432eb81120f4d5db05898c891 (patch)
tree6fedada070d79a4afec236a63ead893bc41b04e9 /Remote
parent34c604b935e6e3e40796c9132ed19d44442cb809 (diff)
add globallyAvailable to remotes
Diffstat (limited to 'Remote')
-rw-r--r--Remote/Bup.hs1
-rw-r--r--Remote/Directory.hs1
-rw-r--r--Remote/Git.hs1
-rw-r--r--Remote/Glacier.hs1
-rw-r--r--Remote/Hook.hs1
-rw-r--r--Remote/Rsync.hs4
-rw-r--r--Remote/S3.hs1
-rw-r--r--Remote/Web.hs1
-rw-r--r--Remote/WebDAV.hs1
9 files changed, 11 insertions, 1 deletions
diff --git a/Remote/Bup.hs b/Remote/Bup.hs
index 43d28a40f..d168f0715 100644
--- a/Remote/Bup.hs
+++ b/Remote/Bup.hs
@@ -67,6 +67,7 @@ gen r u c gc = do
then Just buprepo
else Nothing
, remotetype = remote
+ , globallyAvailable = not $ bupLocal buprepo
, readonly = False
}
return $ encryptableRemote c
diff --git a/Remote/Directory.hs b/Remote/Directory.hs
index da75fb794..be533d038 100644
--- a/Remote/Directory.hs
+++ b/Remote/Directory.hs
@@ -57,6 +57,7 @@ gen r u c gc = do
gitconfig = gc,
localpath = Just dir,
readonly = False,
+ globallyAvailable = False,
remotetype = remote
}
where
diff --git a/Remote/Git.hs b/Remote/Git.hs
index b08166bfa..207655b4e 100644
--- a/Remote/Git.hs
+++ b/Remote/Git.hs
@@ -111,6 +111,7 @@ gen r u _ gc = go <$> remoteCost gc defcst
, repo = r
, gitconfig = gc
, readonly = Git.repoIsHttp r
+ , globallyAvailable = not $ Git.repoIsLocal r || Git.repoIsLocalUnknown r
, remotetype = remote
}
diff --git a/Remote/Glacier.hs b/Remote/Glacier.hs
index b7e002b3d..ea5df31e5 100644
--- a/Remote/Glacier.hs
+++ b/Remote/Glacier.hs
@@ -63,6 +63,7 @@ gen r u c gc = new <$> remoteCost gc veryExpensiveRemoteCost
gitconfig = gc,
localpath = Nothing,
readonly = False,
+ globallyAvailable = True,
remotetype = remote
}
diff --git a/Remote/Hook.hs b/Remote/Hook.hs
index b6b4d8788..97691d075 100644
--- a/Remote/Hook.hs
+++ b/Remote/Hook.hs
@@ -52,6 +52,7 @@ gen r u c gc = do
repo = r,
gitconfig = gc,
readonly = False,
+ globallyAvailable = False,
remotetype = remote
}
where
diff --git a/Remote/Rsync.hs b/Remote/Rsync.hs
index c303316ab..1425601ad 100644
--- a/Remote/Rsync.hs
+++ b/Remote/Rsync.hs
@@ -60,14 +60,16 @@ gen r u c gc = do
, config = M.empty
, repo = r
, gitconfig = gc
- , localpath = if rsyncUrlIsPath $ rsyncUrl o
+ , localpath = if islocal
then Just $ rsyncUrl o
else Nothing
, readonly = False
+ , globallyAvailable = not $ islocal
, remotetype = remote
}
where
o = RsyncOpts url opts escape
+ islocal = rsyncUrlIsPath $ rsyncUrl o
url = fromMaybe (error "missing rsyncurl") $ remoteAnnexRsyncUrl gc
opts = map Param $ filter safe $ remoteAnnexRsyncOptions gc
escape = M.lookup "shellescape" c /= Just "no"
diff --git a/Remote/S3.hs b/Remote/S3.hs
index 8d487de22..0ca86f1ff 100644
--- a/Remote/S3.hs
+++ b/Remote/S3.hs
@@ -62,6 +62,7 @@ gen r u c gc = new <$> remoteCost gc expensiveRemoteCost
gitconfig = gc,
localpath = Nothing,
readonly = False,
+ globallyAvailable = True,
remotetype = remote
}
diff --git a/Remote/Web.hs b/Remote/Web.hs
index 38546c717..b0d12002c 100644
--- a/Remote/Web.hs
+++ b/Remote/Web.hs
@@ -54,6 +54,7 @@ gen r _ _ gc =
localpath = Nothing,
repo = r,
readonly = True,
+ globallyAvailable = True,
remotetype = remote
}
diff --git a/Remote/WebDAV.hs b/Remote/WebDAV.hs
index a06a4eb11..3b729fe83 100644
--- a/Remote/WebDAV.hs
+++ b/Remote/WebDAV.hs
@@ -69,6 +69,7 @@ gen r u c gc = new <$> remoteCost gc expensiveRemoteCost
gitconfig = gc,
localpath = Nothing,
readonly = False,
+ globallyAvailable = True,
remotetype = remote
}