diff options
author | Joey Hess <joey@kitenet.net> | 2012-10-09 14:24:17 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2012-10-09 14:24:17 -0400 |
commit | adb0cccb6c438145c53b0a8ebfff168522692e87 (patch) | |
tree | e42cfd5e0a237cbda24809319bca605426a55e3c | |
parent | c56c0554643cf64d1083ef2693ecff787a4731c3 (diff) |
webapp automatic grouping
webapp: Adds newly created repositories to one of these groups:
clients, drives, servers
This is heuristic, but it's a pretty good heuristic, and can always be
configured.
-rw-r--r-- | Assistant/MakeRemote.hs | 3 | ||||
-rw-r--r-- | Assistant/Pairing/MakeRemote.hs | 2 | ||||
-rw-r--r-- | debian/changelog | 4 | ||||
-rw-r--r-- | doc/design/assistant/transfer_control.mdwn | 15 |
4 files changed, 19 insertions, 5 deletions
diff --git a/Assistant/MakeRemote.hs b/Assistant/MakeRemote.hs index 9184cb529..cce2da0af 100644 --- a/Assistant/MakeRemote.hs +++ b/Assistant/MakeRemote.hs @@ -28,11 +28,12 @@ import qualified Data.Map as M import Data.Char {- Sets up and begins syncing with a new ssh or rsync remote. -} -makeSshRemote :: ThreadState -> DaemonStatusHandle -> ScanRemoteMap -> Bool -> SshData -> IO () +makeSshRemote :: ThreadState -> DaemonStatusHandle -> ScanRemoteMap -> Bool -> SshData -> IO Remote makeSshRemote st dstatus scanremotes forcersync sshdata = do r <- runThreadState st $ addRemote $ maker (sshRepoName sshdata) sshurl syncNewRemote st dstatus scanremotes r + return r where rsync = forcersync || rsyncOnly sshdata maker diff --git a/Assistant/Pairing/MakeRemote.hs b/Assistant/Pairing/MakeRemote.hs index fae8c5ee3..ab0bef13c 100644 --- a/Assistant/Pairing/MakeRemote.hs +++ b/Assistant/Pairing/MakeRemote.hs @@ -46,7 +46,7 @@ finishedPairing st dstatus scanremotes msg keypair = do , "git-annex-shell -c configlist " ++ T.unpack (sshDirectory sshdata) ] "" - makeSshRemote st dstatus scanremotes False sshdata + void $ makeSshRemote st dstatus scanremotes False sshdata {- Mostly a straightforward conversion. Except: - * Determine the best hostname to use to contact the host. diff --git a/debian/changelog b/debian/changelog index ed3cf9ebc..02ebae810 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,10 +1,12 @@ git-annex (3.20121002) UNRELEASED; urgency=low - * group, ungroup: New commands to indicate groups of repositories. * watch, assistant: It's now safe to git annex unlock files while the watcher is running, as well as modify files checked into git as normal files. Additionally, .gitignore settings are now honored. Closes: #689979 + * group, ungroup: New commands to indicate groups of repositories. + * webapp: Adds newly created repositories to one of these groups: + clients, drives, servers * vicfg: New command, allows editing (or simply viewing) most of the repository configuration settings stored in the git-annex branch. * Added preferred content expressions, configurable using vicfg. diff --git a/doc/design/assistant/transfer_control.mdwn b/doc/design/assistant/transfer_control.mdwn index 609329907..c506f3e64 100644 --- a/doc/design/assistant/transfer_control.mdwn +++ b/doc/design/assistant/transfer_control.mdwn @@ -6,8 +6,19 @@ it doesn't currently have, is covered by the [[partial_content]] page. But often the remote is just a removable drive or a cloud remote, that has a limited size. This page is about making the assistant do -something smart with such remotes. (Which it now does.. **done** except for -an easy way to configure this.) +something smart with such remotes. + +## TODO + +* easy configuration of preferred content +* Drop no longer preferred content. + - When a file is renamed, it might stop being preferred, so + could be checked and dropped. (If there's multiple links to + the same content, this gets tricky.) + - When a file is sent or received, the sender's preferred content + settings may change, causing it to be dropped from the sender. + - May also want to check for things to drop, from both local and remotes, + when doing the expensive trasfer scan. ## specifying what data a remote prefers to contain **done** |