summaryrefslogtreecommitdiff
path: root/Types
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2013-03-31 19:00:43 -0400
committerGravatar Joey Hess <joey@kitenet.net>2013-03-31 19:00:43 -0400
commite16377f2a616f7c15106cc6247249c40c5461616 (patch)
tree8ced2e436c4769a0950015236a82d20fb01c58d8 /Types
parent7ff462faa5c50805860db3f5dc40a843d675c160 (diff)
move content from remote when user asks to delete it
Diffstat (limited to 'Types')
-rw-r--r--Types/StandardGroups.hs23
1 files changed, 12 insertions, 11 deletions
diff --git a/Types/StandardGroups.hs b/Types/StandardGroups.hs
index 722136520..2670ec2a4 100644
--- a/Types/StandardGroups.hs
+++ b/Types/StandardGroups.hs
@@ -51,26 +51,27 @@ descStandardGroup SmallArchiveGroup = "small archive: archives files located in
descStandardGroup FullArchiveGroup = "full archive: archives all files not archived elsewhere"
descStandardGroup SourceGroup = "file source: moves files on to other repositories"
descStandardGroup ManualGroup = "manual mode: only stores files you manually choose"
-descStandardGroup UnwantedGroup "unwanted: a repository in the process of being removed"
+descStandardGroup UnwantedGroup = "unwanted: remove content from this repository"
{- See doc/preferred_content.mdwn for explanations of these expressions. -}
preferredContent :: StandardGroup -> String
-preferredContent ClientGroup = normal
+preferredContent ClientGroup = lastResort
"exclude=*/archive/* and exclude=archive/*"
-preferredContent TransferGroup = normal $
+preferredContent TransferGroup = lastResort $
"not (inallgroup=client and copies=client:2) and " ++ preferredContent ClientGroup
preferredContent BackupGroup = "include=*"
-preferredContent IncrementalBackupGroup = normal $
+preferredContent IncrementalBackupGroup = lastResort $
"include=* and (not copies=incrementalbackup:1)"
-preferredContent SmallArchiveGroup = normal $
+preferredContent SmallArchiveGroup = lastResort $
"(include=*/archive/* or include=archive/*) and " ++ preferredContent FullArchiveGroup
-preferredContent FullArchiveGroup = normal $
+preferredContent FullArchiveGroup = lastResort $
"not (copies=archive:1 or copies=smallarchive:1)"
preferredContent SourceGroup = "not (copies=1)"
-preferredContent ManualGroup = normal $
+preferredContent ManualGroup = lastResort $
"present and exclude=*/archive/* and exclude=archive/*"
preferredContent UnwantedGroup = "exclude=*"
- where
- {- Most repositories want any content that is only on untrusted
- - or dead repositories. -}
- normal s = "(" ++ s ++ ") or (not copies=semitrusted:1)"
+
+{- Most repositories want any content that is only on untrusted
+ - or dead repositories. -}
+lastResort :: String -> String
+lastResort s = "(" ++ s ++ ") or (not copies=semitrusted:1)"