summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2013-09-09 09:58:17 -0400
committerGravatar Joey Hess <joey@kitenet.net>2013-09-09 10:02:15 -0400
commit6d3c84755bc79f04724a0f88975d7e9400395f10 (patch)
treee7cd10c5a1040a8044aa65b29891416c7a59733d
parent62dc499541761d43f9938b34561bc93bb3f67e4e (diff)
sync: support gcrypt4.20130909
-rw-r--r--Assistant/DaemonStatus.hs3
-rw-r--r--Command/Sync.hs4
-rw-r--r--Remote.hs2
-rw-r--r--Remote/Git.hs8
-rw-r--r--Remote/List.hs7
-rw-r--r--debian/changelog11
-rw-r--r--git-annex.cabal2
7 files changed, 23 insertions, 14 deletions
diff --git a/Assistant/DaemonStatus.hs b/Assistant/DaemonStatus.hs
index af072d8ae..a6893e5a2 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 567e3146b..e7da229a0 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 b524a9f9e..25a46b1cb 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 149146616..795823ca6 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 c106e9ad9..f38c1daaa 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 2e537c6dd..c87d347c1 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 <joeyh@debian.org> Tue, 27 Aug 2013 11:03:00 -0400
+ -- Joey Hess <joeyh@debian.org> 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 915f9aabe..fad2f3d0b 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 <joey@kitenet.net>