summaryrefslogtreecommitdiff
path: root/Remote/Rsync.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2013-09-12 15:54:35 -0400
committerGravatar Joey Hess <joey@kitenet.net>2013-09-12 15:54:35 -0400
commitb2ffbaf43ca2773e51ff2d5665db67f86f8ccdd7 (patch)
tree5b98d88bf1cbaf9e0d41458f6b9469f1895d6bdf /Remote/Rsync.hs
parent4515c27f4273969ef2fae1dc0f90dbe98a905eae (diff)
Support hot-swapping of removable drives containing gcrypt repositories.
To support this, a core.gcrypt-id is stored by git-annex inside the git config of a local gcrypt repository, when setting it up. That is compared with the remote's cached gcrypt-id. When different, a drive has been changed. git-annex then looks up the remote config for the uuid mapped from the core.gcrypt-id, and tweaks the configuration appropriately. When there is no known config for the uuid, it will refuse to use the remote.
Diffstat (limited to 'Remote/Rsync.hs')
-rw-r--r--Remote/Rsync.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/Remote/Rsync.hs b/Remote/Rsync.hs
index b328f6560..f1e6fd85e 100644
--- a/Remote/Rsync.hs
+++ b/Remote/Rsync.hs
@@ -58,14 +58,14 @@ remote = RemoteType {
setup = rsyncSetup
}
-gen :: Git.Repo -> UUID -> RemoteConfig -> RemoteGitConfig -> Annex Remote
+gen :: Git.Repo -> UUID -> RemoteConfig -> RemoteGitConfig -> Annex (Maybe Remote)
gen r u c gc = do
cst <- remoteCost gc expensiveRemoteCost
(transport, url) <- rsyncTransport gc $
fromMaybe (error "missing rsyncurl") $ remoteAnnexRsyncUrl gc
let o = genRsyncOpts c gc transport url
let islocal = rsyncUrlIsPath $ rsyncUrl o
- return $ encryptableRemote c
+ return $ Just $ encryptableRemote c
(storeEncrypted o $ getGpgEncParams (c,gc))
(retrieveEncrypted o)
Remote