summaryrefslogtreecommitdiff
path: root/Annex
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-10-10 15:27:25 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-10-10 15:27:25 -0400
commit3a9d1edb4ce0c0b1c2b71598ad7000875ad82828 (patch)
tree758134204aa4eb9110dc5c27697ede1fa07c96bc /Annex
parent2d1e48b3547b4df855d7166e7cee9fd3c00b8ec5 (diff)
webapp: put new repos in standard groups
I'm using transfer for most things, both removable drives and cloud storage, because it's the safest choice. We'll see if it makes sense to prompt for the group when setting this up, or let the user pick something else after the fact.
Diffstat (limited to 'Annex')
-rw-r--r--Annex/StandardGroups.hs (renamed from Annex/Groups.hs)10
1 files changed, 9 insertions, 1 deletions
diff --git a/Annex/Groups.hs b/Annex/StandardGroups.hs
index 3b4449514..e94185fbf 100644
--- a/Annex/Groups.hs
+++ b/Annex/StandardGroups.hs
@@ -5,7 +5,12 @@
- Licensed under the GNU GPL version 3 or higher.
-}
-module Annex.Groups where
+module Annex.StandardGroups where
+
+import Common.Annex
+import Logs.Group
+
+import qualified Data.Set as S
data StandardGroup = ClientGroup | TransferGroup | ArchiveGroup | BackupGroup
@@ -28,3 +33,6 @@ preferredContent ClientGroup = "exclude=*/archive/*"
preferredContent TransferGroup = "not inallgroup=client and " ++ preferredContent ClientGroup
preferredContent ArchiveGroup = "not copies=archive:1"
preferredContent BackupGroup = "" -- all content is preferred
+
+setStandardGroup :: UUID -> StandardGroup -> Annex ()
+setStandardGroup u = groupSet u . S.singleton . fromStandardGroup