summaryrefslogtreecommitdiff
path: root/Annex
diff options
context:
space:
mode:
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