diff --git a/Assistant/DaemonStatus.hs b/Assistant/DaemonStatus.hs index af072d8aeb..a6893e5a28 100644 --- a/Assistant/DaemonStatus.hs +++ b/Assistant/DaemonStatus.hs @@ -57,8 +57,7 @@ calcSyncRemotes = do return $ \dstatus -> dstatus { syncRemotes = syncable - , syncGitRemotes = - filter (not . Remote.specialRemote) syncable + , syncGitRemotes = filter Remote.syncableRemote syncable , syncDataRemotes = syncdata , syncingToCloudRemote = any iscloud syncdata } diff --git a/Command/Sync.hs b/Command/Sync.hs index 567e3146bb..e7da229a0b 100644 --- a/Command/Sync.hs +++ b/Command/Sync.hs @@ -67,12 +67,12 @@ syncRemotes rs = ifM (Annex.getState Annex.fast) ( nub <$> pickfast , wanted ) | otherwise = listed listed = do l <- catMaybes <$> mapM (Remote.byName . Just) rs - let s = filter Remote.specialRemote l + let s = filter (not . Remote.syncableRemote) l unless (null s) $ error $ "cannot sync special remotes: " ++ unwords (map Types.Remote.name s) return l - available = filter (not . Remote.specialRemote) + available = filter Remote.syncableRemote . filter (remoteAnnexSync . Types.Remote.gitconfig) <$> Remote.remoteList good = filterM $ Remote.Git.repoAvail . Types.Remote.repo diff --git a/Remote.hs b/Remote.hs index b524a9f9e2..25a46b1cb2 100644 --- a/Remote.hs +++ b/Remote.hs @@ -19,7 +19,7 @@ module Remote ( remoteTypes, remoteList, - specialRemote, + syncableRemote, remoteMap, uuidDescriptions, byName, diff --git a/Remote/Git.hs b/Remote/Git.hs index 1491466168..795823ca68 100644 --- a/Remote/Git.hs +++ b/Remote/Git.hs @@ -125,6 +125,14 @@ gen r u c gc repoAvail :: Git.Repo -> Annex Bool repoAvail r | Git.repoIsHttp r = return True + | Git.GCrypt.isEncrypted r = do + g <- gitRepo + liftIO $ do + er <- Git.GCrypt.encryptedRepo g r + if Git.repoIsLocal er || Git.repoIsLocalUnknown er + then catchBoolIO $ + void (Git.Config.read er) >> return True + else return True | Git.repoIsUrl r = return True | Git.repoIsLocalUnknown r = return False | otherwise = liftIO $ catchBoolIO $ onLocal r $ return True diff --git a/Remote/List.hs b/Remote/List.hs index c106e9ad92..f38c1daaaf 100644 --- a/Remote/List.hs +++ b/Remote/List.hs @@ -100,6 +100,7 @@ updateRemote remote = do Remote.Git.configRead r | otherwise = return r -{- Checks if a remote is a special remote -} -specialRemote :: Remote -> Bool -specialRemote r = remotetype r /= Remote.Git.remote +{- Checks if a remote is syncable using git. -} +syncableRemote :: Remote -> Bool +syncableRemote r = remotetype r `elem` + [ Remote.Git.remote, Remote.GCrypt.remote ] diff --git a/debian/changelog b/debian/changelog index 2e537c6dd2..c87d347c1c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -git-annex (4.20130828) UNRELEASED; urgency=low +git-annex (4.20130909) unstable; urgency=low * initremote: Syntax change when setting up an encrypted special remote. Now use keyid=$KEYID rather than the old encryption=$KEYID @@ -9,6 +9,10 @@ git-annex (4.20130828) UNRELEASED; urgency=low have been marked as dead from the git-annex branch. * sync, assistant: Force push of the git-annex branch. Necessary to ensure it gets pushed to remotes after being rewritten by forget. + * Added gcrypt support. This combines a fully encrypted git + repository (using git-remote-gcrypt) with an encrypted git-annex special + remote. + * sync: Support syncing with gcrypt remotes. * importfeed: Also ignore transient problems with downloading content from feeds. * Honor core.sharedrepository when receiving and adding files in direct @@ -24,9 +28,6 @@ git-annex (4.20130828) UNRELEASED; urgency=low * Remind user when annex-ignore is set for some remotes, if unable to get or drop a file, possibly because it's on an ignored remote. * gpg: Force --no-textmode in case the user has it turned on in config. - * Added gcrypt support. This combines a fully encrypted git - repository (using git-remote-gcrypt) with an encrypted git-annex special - remote. * webapp: Improve javascript's handling of longpolling connection failures, by reloading the current page in this case. Works around chromium behavior where ajax connections to urls @@ -34,7 +35,7 @@ git-annex (4.20130828) UNRELEASED; urgency=low a previous page. * Allow building without quvi support. - -- Joey Hess Tue, 27 Aug 2013 11:03:00 -0400 + -- Joey Hess Mon, 09 Sep 2013 09:47:02 -0400 git-annex (4.20130827) unstable; urgency=low diff --git a/git-annex.cabal b/git-annex.cabal index 915f9aabe5..fad2f3d0b5 100644 --- a/git-annex.cabal +++ b/git-annex.cabal @@ -1,5 +1,5 @@ Name: git-annex -Version: 4.20130827 +Version: 4.20130909 Cabal-Version: >= 1.8 License: GPL-3 Maintainer: Joey Hess