sync: support gcrypt
This commit is contained in:
parent
51ee077d58
commit
b64f5baf2d
7 changed files with 23 additions and 14 deletions
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -19,7 +19,7 @@ module Remote (
|
|||
|
||||
remoteTypes,
|
||||
remoteList,
|
||||
specialRemote,
|
||||
syncableRemote,
|
||||
remoteMap,
|
||||
uuidDescriptions,
|
||||
byName,
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 ]
|
||||
|
|
11
debian/changelog
vendored
11
debian/changelog
vendored
|
@ -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
|
||||
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in a new issue