aboutsummaryrefslogtreecommitdiff
path: root/Types/StandardGroups.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2015-06-16 17:17:51 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2015-06-16 17:18:53 -0400
commita69545c910375b8697b4729926974e180413c362 (patch)
tree5fbf2c87fe493c1a4d77a4697399113350d95c84 /Types/StandardGroups.hs
parent05ca2c4826371c1a9e484a887dec608be0e9c5f6 (diff)
adjust standard preferred content to work better with git annex sync --all --content
backup: Use new "anything" terminal. This means that content that is not unused, but has no associated file will be wanted by backup repos. unwanted: "not anything" will result in any and all content moving off of these repos. incremental backup: Remove the "(include=* or unused)", so it matches content that has no associated files but is not unused. client: Add a include=* to the expression. This limits it to matching only files in the work tree. Without this change, sync --all --content would match a key against the expression, and since it matches exclude=archive/*, the client repo would have wanted the file content. The "and not unused" would have kept unused objects out, but not objects that were not known to be unused, or objects that another branch referred to. In practice, everything would have flooded into client repos without this change.
Diffstat (limited to 'Types/StandardGroups.hs')
-rw-r--r--Types/StandardGroups.hs8
1 files changed, 4 insertions, 4 deletions
diff --git a/Types/StandardGroups.hs b/Types/StandardGroups.hs
index 11d2201e2..2d24024d8 100644
--- a/Types/StandardGroups.hs
+++ b/Types/StandardGroups.hs
@@ -80,19 +80,19 @@ specialRemoteOnly _ = False
{- See doc/preferred_content.mdwn for explanations of these expressions. -}
standardPreferredContent :: StandardGroup -> PreferredContentExpression
standardPreferredContent ClientGroup = lastResort $
- "((exclude=*/archive/* and exclude=archive/*) or (" ++ notArchived ++ ")) and not unused"
+ "include=* and ((exclude=*/archive/* and exclude=archive/*) or (" ++ notArchived ++ "))"
standardPreferredContent TransferGroup = lastResort $
"not (inallgroup=client and copies=client:2) and (" ++ standardPreferredContent ClientGroup ++ ")"
-standardPreferredContent BackupGroup = "include=* or unused"
+standardPreferredContent BackupGroup = "anything"
standardPreferredContent IncrementalBackupGroup = lastResort
- "(include=* or unused) and (not copies=backup:1) and (not copies=incrementalbackup:1)"
+ "(not copies=backup:1) and (not copies=incrementalbackup:1)"
standardPreferredContent SmallArchiveGroup = lastResort $
"(include=*/archive/* or include=archive/*) and (" ++ standardPreferredContent FullArchiveGroup ++ ")"
standardPreferredContent FullArchiveGroup = lastResort notArchived
standardPreferredContent SourceGroup = "not (copies=1)"
standardPreferredContent ManualGroup = "present and (" ++ standardPreferredContent ClientGroup ++ ")"
standardPreferredContent PublicGroup = "inpreferreddir"
-standardPreferredContent UnwantedGroup = "exclude=*"
+standardPreferredContent UnwantedGroup = "not anything"
notArchived :: String
notArchived = "not (copies=archive:1 or copies=smallarchive:1)"